diff options
Diffstat (limited to 'source3/lib/util_unixsd.c')
-rw-r--r-- | source3/lib/util_unixsd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/lib/util_unixsd.c b/source3/lib/util_unixsd.c index 1bfc56a2da..bee9f69641 100644 --- a/source3/lib/util_unixsd.c +++ b/source3/lib/util_unixsd.c @@ -136,7 +136,7 @@ size_t convertperms_unix_to_sd(const SMB_STRUCT_STAT * sbuf, (*ppdesc) = NULL; - if (!lp_nt_acl_support()) + if (!lp_nt_acl_support() || sbuf == NULL) { sid_copy(&owner_sid, global_sid_everyone); sid_copy(&group_sid, global_sid_everyone); @@ -302,7 +302,7 @@ size_t convertperms_unix_to_sd(const SMB_STRUCT_STAT * sbuf, sec_desc_size = make_sec_desc((*ppdesc), 1, SEC_DESC_SELF_RELATIVE | - SEC_DESC_DACL_PRESENT, + (sbuf?SEC_DESC_DACL_PRESENT:0), sid_dup(&owner_sid), sid_dup(&group_sid), NULL, psa); |