summaryrefslogtreecommitdiffstats
path: root/source/smbd/posix_acls.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-03-15 03:19:01 +0000
committerJeremy Allison <jra@samba.org>2001-03-15 03:19:01 +0000
commit45e96777d0eeafbbf40759f02cd3f5e15b12c288 (patch)
tree35e367e2b87ebe83fc613d32b5bd7a901bd84689 /source/smbd/posix_acls.c
parent58dd295882a944934014a31c61eed35bf04fc2bd (diff)
downloadsamba-45e96777d0eeafbbf40759f02cd3f5e15b12c288.tar.gz
samba-45e96777d0eeafbbf40759f02cd3f5e15b12c288.tar.xz
samba-45e96777d0eeafbbf40759f02cd3f5e15b12c288.zip
Last tweak (I promise :-). Fallback to returning our SID if we're a domain
member but can't get the domain sid. Jeremy.
Diffstat (limited to 'source/smbd/posix_acls.c')
-rw-r--r--source/smbd/posix_acls.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/source/smbd/posix_acls.c b/source/smbd/posix_acls.c
index fe2974b235d..5c0878b9ca4 100644
--- a/source/smbd/posix_acls.c
+++ b/source/smbd/posix_acls.c
@@ -961,9 +961,18 @@ static canon_ace *unix_canonicalise_acl(files_struct *fsp, SMB_STRUCT_STAT *psbu
other_ace->perms = unix_perms_to_acl_perms(mode, S_IROTH, S_IWOTH, S_IXOTH);
}
- DLIST_ADD(list_head, other_ace);
- DLIST_ADD(list_head, group_ace);
- DLIST_ADD(list_head, owner_ace);
+ if (other_ace->perms) {
+ DLIST_ADD(list_head, other_ace);
+ } else
+ safe_free(other_ace);
+ if (group_ace->perms) {
+ DLIST_ADD(list_head, group_ace);
+ } else
+ safe_free(group_ace);
+ if (owner_ace->perms) {
+ DLIST_ADD(list_head, owner_ace);
+ } else
+ safe_free(owner_ace);
return list_head;