]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
r2548: Fix for bug reported by Edward Spragins <spragins@gmail.com> - don't try to
authorJeremy Allison <jra@samba.org>
Thu, 23 Sep 2004 00:19:18 +0000 (00:19 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:52:46 +0000 (10:52 -0500)
set security descriptors on shares where this has been turned off.
Jeremy.

source/smbd/nttrans.c

index 5e17f76e697c0a4805d83c45b8592fb4ec17c855..d9e321fd96875a2b61b8a1401b086515d03182da 100644 (file)
@@ -1080,7 +1080,7 @@ static NTSTATUS set_sd(files_struct *fsp, char *data, uint32 sd_len, uint32 secu
        TALLOC_CTX *mem_ctx;
        BOOL ret;
        
-       if (sd_len == 0) {
+       if (sd_len == 0 || !lp_nt_acl_support(SNUM(fsp->conn))) {
                return NT_STATUS_OK;
        }
 
@@ -1414,7 +1414,8 @@ static int call_nt_transact_create(connection_struct *conn, char *inbuf, char *o
         * Now try and apply the desired SD.
         */
 
-       if (sd_len && !NT_STATUS_IS_OK(status = set_sd( fsp, data, sd_len, ALL_SECURITY_INFORMATION))) {
+       if (lp_nt_acl_support(SNUM(conn)) && sd_len &&
+                       !NT_STATUS_IS_OK(status = set_sd( fsp, data, sd_len, ALL_SECURITY_INFORMATION))) {
                close_file(fsp,False);
                restore_case_semantics(conn, file_attributes);
                return ERROR_NT(status);