Jonathan Doron : ntdll: Apply owner and group regardless of the SE_OWNER_DEFAULTED or SE_GROUP_DEFAULTED flags.
Alexandre Julliard
julliard at winehq.org
Wed Sep 13 14:47:03 CDT 2017
Module: wine
Branch: master
Commit: fbf2631dcba08ac3084823ae2df83a35b80a670b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=fbf2631dcba08ac3084823ae2df83a35b80a670b
Author: Jonathan Doron <jond at wizery.com>
Date: Tue Sep 12 15:33:37 2017 +0300
ntdll: Apply owner and group regardless of the SE_OWNER_DEFAULTED or SE_GROUP_DEFAULTED flags.
Signed-off-by: Jonathan Doron <jond at wizery.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ntdll/sync.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/dlls/ntdll/sync.c b/dlls/ntdll/sync.c
index cfb5cbc..8e406ce 100644
--- a/dlls/ntdll/sync.c
+++ b/dlls/ntdll/sync.c
@@ -77,9 +77,9 @@ NTSTATUS alloc_object_attributes( const OBJECT_ATTRIBUTES *attr, struct object_a
data_size_t *ret_len )
{
unsigned int len = sizeof(**ret);
- PSID owner, group;
+ PSID owner = NULL, group = NULL;
ACL *dacl, *sacl;
- BOOLEAN owner_present, group_present, dacl_present, sacl_present, defaulted;
+ BOOLEAN dacl_present, sacl_present, defaulted;
PSECURITY_DESCRIPTOR sd;
NTSTATUS status;
@@ -94,12 +94,12 @@ NTSTATUS alloc_object_attributes( const OBJECT_ATTRIBUTES *attr, struct object_a
{
len += sizeof(struct security_descriptor);
- if ((status = RtlGetOwnerSecurityDescriptor( sd, &owner, &owner_present ))) return status;
- if ((status = RtlGetGroupSecurityDescriptor( sd, &group, &group_present ))) return status;
+ if ((status = RtlGetOwnerSecurityDescriptor( sd, &owner, &defaulted ))) return status;
+ if ((status = RtlGetGroupSecurityDescriptor( sd, &group, &defaulted ))) return status;
if ((status = RtlGetSaclSecurityDescriptor( sd, &sacl_present, &sacl, &defaulted ))) return status;
if ((status = RtlGetDaclSecurityDescriptor( sd, &dacl_present, &dacl, &defaulted ))) return status;
- if (owner_present) len += RtlLengthSid( owner );
- if (group_present) len += RtlLengthSid( group );
+ if (owner) len += RtlLengthSid( owner );
+ if (group) len += RtlLengthSid( group );
if (sacl_present && sacl) len += sacl->AclSize;
if (dacl_present && dacl) len += dacl->AclSize;
@@ -126,8 +126,8 @@ NTSTATUS alloc_object_attributes( const OBJECT_ATTRIBUTES *attr, struct object_a
unsigned char *ptr = (unsigned char *)(descr + 1);
descr->control = ((SECURITY_DESCRIPTOR *)sd)->Control & ~SE_SELF_RELATIVE;
- if (owner_present) descr->owner_len = RtlLengthSid( owner );
- if (group_present) descr->group_len = RtlLengthSid( group );
+ if (owner) descr->owner_len = RtlLengthSid( owner );
+ if (group) descr->group_len = RtlLengthSid( group );
if (sacl_present && sacl) descr->sacl_len = sacl->AclSize;
if (dacl_present && dacl) descr->dacl_len = dacl->AclSize;
More information about the wine-cvs
mailing list