summaryrefslogtreecommitdiffstats
path: root/source/lib/util_unixsd.c
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>2000-05-27 09:19:57 +0000
committerLuke Leighton <lkcl@samba.org>2000-05-27 09:19:57 +0000
commit9805e17cd0ce427c329a8b5a8318d5f75227e283 (patch)
tree479c5cb16db6c206a6ff71d1cedefbc4b52ba7ce /source/lib/util_unixsd.c
parentcff62bb10aa8d897bf48119f959d426d9052bc23 (diff)
downloadsamba-9805e17cd0ce427c329a8b5a8318d5f75227e283.tar.gz
samba-9805e17cd0ce427c329a8b5a8318d5f75227e283.tar.xz
samba-9805e17cd0ce427c329a8b5a8318d5f75227e283.zip
prs_give_memory in wrong place, also poss. was losing mem.
Diffstat (limited to 'source/lib/util_unixsd.c')
-rw-r--r--source/lib/util_unixsd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/lib/util_unixsd.c b/source/lib/util_unixsd.c
index 1bfc56a2dac..bee9f696414 100644
--- a/source/lib/util_unixsd.c
+++ b/source/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);