[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-4562-gefaac80

Jeremy Allison jra at samba.org
Mon Dec 1 19:13:19 GMT 2008


The branch, v3-3-test has been updated
       via  efaac8049e43279266b5ea35dab8a866a96205b4 (commit)
      from  263c1ca96bd68dced4577a2504073e1140fa26a1 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-3-test


- Log -----------------------------------------------------------------
commit efaac8049e43279266b5ea35dab8a866a96205b4
Author: Steven Danneman <steven.danneman at isilon.com>
Date:   Mon Dec 1 11:12:59 2008 -0800

    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.

-----------------------------------------------------------------------

Summary of changes:
 source/smbd/nttrans.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/smbd/nttrans.c b/source/smbd/nttrans.c
index 671b9e9..91d896c 100644
--- a/source/smbd/nttrans.c
+++ b/source/smbd/nttrans.c
@@ -1594,12 +1594,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));


-- 
Samba Shared Repository


More information about the samba-cvs mailing list