Fix bug 8636 - When returning an ACL without SECINFO_DACL requested, we still set...
authorJeremy Allison <jra@samba.org>
Wed, 30 Nov 2011 00:31:18 +0000 (16:31 -0800)
committerJeremy Allison <jra@samba.org>
Wed, 30 Nov 2011 03:59:07 +0000 (04:59 +0100)
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Nov 30 04:59:07 CET 2011 on sn-devel-104

source3/modules/vfs_acl_common.c
source3/smbd/nttrans.c

index 799de98520dcc4bbff8a9231167002d6434d1514..00ac2a193206537136bc349239289f56547023db 100644 (file)
@@ -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;
        }
 
index 05d42a2e89019ea64a382a0cd3fcc8b389e235ae..ddabdda4d6e7b9c54b1d5284cdd5011b7ad3ed22 100644 (file)
@@ -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;
        }