summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2011-11-29 16:31:18 -0800
committerJeremy Allison <jra@samba.org>2011-11-30 04:59:07 +0100
commitda992be64f39364fbb8bca26e9421c7a36c49ac6 (patch)
tree20fa38c22b61a5a7647cd09e4313aacf4cfaf03b
parent12ce07e53b9453f35a1483d941bfce9c23f790a0 (diff)
downloadsamba-da992be64f39364fbb8bca26e9421c7a36c49ac6.tar.gz
samba-da992be64f39364fbb8bca26e9421c7a36c49ac6.tar.bz2
samba-da992be64f39364fbb8bca26e9421c7a36c49ac6.zip
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
-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 799de98520..00ac2a1932 100644
--- a/source3/modules/vfs_acl_common.c
+++ b/source3/modules/vfs_acl_common.c
@@ -426,9 +426,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 05d42a2e89..ddabdda4d6 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -1900,9 +1900,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;
}