summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2011-11-29 16:31:18 -0800
committerKarolin Seeger <kseeger@samba.org>2012-01-23 21:44:04 +0100
commitd6f0ddae114ed77e0afec4f9c72b55a41fd800eb (patch)
tree39e5536ba9f48fec956bf1099489e65c33d9d01c
parent3af134540cdf12276f677502a1090170d8b25d70 (diff)
downloadsamba-d6f0ddae114ed77e0afec4f9c72b55a41fd800eb.tar.gz
Fix bug 8636 - When returning an ACL without SECINFO_DACL requested, we still set SEC_DESC_DACL_PRESENT in the type field.
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Nov 30 04:59:07 CET 2011 on sn-devel-104 (cherry picked from commit da992be64f39364fbb8bca26e9421c7a36c49ac6) (cherry picked from commit c0ad67c1888e44be77d8f34681f12fc8b4f19f86)
-rw-r--r--source3/modules/vfs_acl_common.c2
-rw-r--r--source3/smbd/nttrans.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/source3/modules/vfs_acl_common.c b/source3/modules/vfs_acl_common.c
index 4554dc82a7d..75917b7c09e 100644
--- a/source3/modules/vfs_acl_common.c
+++ b/source3/modules/vfs_acl_common.c
@@ -413,9 +413,11 @@ static NTSTATUS get_nt_acl_internal(vfs_handle_struct *handle,
psd->group_sid = NULL;
}
if (!(security_info & SECINFO_DACL)) {
+ psd->type &= ~SEC_DESC_DACL_PRESENT;
psd->dacl = NULL;
}
if (!(security_info & SECINFO_SACL)) {
+ psd->type &= ~SEC_DESC_SACL_PRESENT;
psd->sacl = NULL;
}
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index 81e850c984f..de508eb0cac 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -1901,9 +1901,11 @@ NTSTATUS smbd_do_query_security_desc(connection_struct *conn,
psd->group_sid = NULL;
}
if (!(security_info_wanted & SECINFO_DACL)) {
+ psd->type &= ~SEC_DESC_DACL_PRESENT;
psd->dacl = NULL;
}
if (!(security_info_wanted & SECINFO_SACL)) {
+ psd->type &= ~SEC_DESC_SACL_PRESENT;
psd->sacl = NULL;
}