Module: wine Branch: master Commit: 8d6093e6248baab1228e92272b3de15a8a6d29f9 URL: http://source.winehq.org/git/wine.git/?a=commit;h=8d6093e6248baab1228e92272b...
Author: Rob Shearman rob@codeweavers.com Date: Sat Oct 20 16:21:05 2007 +0100
server: Fix file_set_sd to handle NULL DACLs.
These mean that the file should have full permissions for everyone.
---
server/file.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/server/file.c b/server/file.c index 7a62b64..b5f6a87 100644 --- a/server/file.c +++ b/server/file.c @@ -435,9 +435,10 @@ static int file_set_sd( struct object *obj, const struct security_descriptor *sd
if (set_info & DACL_SECURITY_INFORMATION) { - if (sd->control & SE_DACL_PRESENT) + int present; + const ACL *dacl = sd_get_dacl( sd, &present ); + if (present && dacl) { - const ACL *dacl = (const ACL *)((char *)sd + sd->owner_len + sd->group_len + sd->sacl_len); const ACE_HEADER *ace = (const ACE_HEADER *)(dacl + 1); ULONG i; for (i = 0; i < dacl->AceCount; i++)