diff options
author | Steven Danneman <steven.danneman@isilon.com> | 2008-11-30 15:51:38 -0800 |
---|---|---|
committer | Steven Danneman <steven.danneman@isilon.com> | 2008-11-30 15:56:17 -0800 |
commit | 8340d100f6048776f6fd87704a10e7c103714ae7 (patch) | |
tree | b386a354185304afbe360c0931347299323e4733 | |
parent | 8fc15ab96d198dce6da2324bbd589a5e9e66740e (diff) | |
download | samba-8340d100f6048776f6fd87704a10e7c103714ae7.tar.gz samba-8340d100f6048776f6fd87704a10e7c103714ae7.tar.bz2 samba-8340d100f6048776f6fd87704a10e7c103714ae7.zip |
Set PRESENT flag when returning NULL [SD]ACL like Windows does.
This could also be handled inside each ACL VFS module, by setting the PRESENT
flag when a NULL [SD]ACL is created.
-rw-r--r-- | source3/smbd/nttrans.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index 18dd7d5c26..777073e6ba 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -1587,12 +1587,20 @@ static void call_nt_transact_query_security_desc(connection_struct *conn, status = SMB_VFS_FGET_NT_ACL( fsp, security_info_wanted, &psd); } - if (!NT_STATUS_IS_OK(status)) { reply_nterror(req, status); return; } + /* If the SACL/DACL is NULL, but was requested, we mark that it is + * present in the reply to match Windows behavior */ + if (psd->sacl == NULL && + security_info_wanted & SACL_SECURITY_INFORMATION) + psd->type |= SEC_DESC_SACL_PRESENT; + if (psd->dacl == NULL && + security_info_wanted & DACL_SECURITY_INFORMATION) + psd->type |= SEC_DESC_DACL_PRESENT; + sd_size = ndr_size_security_descriptor(psd, 0); DEBUG(3,("call_nt_transact_query_security_desc: sd_size = %lu.\n",(unsigned long)sd_size)); |