From 712a30ed51ca2b58e00d38a5d6d70d564b1da11b Mon Sep 17 00:00:00 2001 From: Luke Leighton Date: Sat, 27 May 2000 09:19:57 +0000 Subject: prs_give_memory in wrong place, also poss. was losing mem. (This used to be commit 9805e17cd0ce427c329a8b5a8318d5f75227e283) --- source3/lib/util_unixsd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/lib/util_unixsd.c') 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); -- cgit