[SCM] Samba Shared Repository - branch v3-6-test updated

Jeremy Allison jra at samba.org
Mon Apr 4 15:29:20 MDT 2011


The branch, v3-6-test has been updated
       via  25312f6 Move SET_STAT_INVALID call added by Volker as fix for bug 8042 - Newly create files are always failed with NT_STATUS_FILE_IS_A_DIRECTORY
       via  f1bae42 Note that check_parent_exists() doesn't change the contents of smb_fname (add const). (cherry picked from commit 074239ac2eec666abb892b5eef46ca70691ed41f)
      from  702c32d Fix bug #7987 - ACL can get lost when files are being renamed.

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


- Log -----------------------------------------------------------------
commit 25312f62f373ce426318c72366638881fd99f158
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Apr 4 10:22:03 2011 -0700

    Move SET_STAT_INVALID call added by Volker as fix for bug 8042 - Newly create files are always failed with NT_STATUS_FILE_IS_A_DIRECTORY
    
    Ensure we do this for all cases where the stat fails.
    
    Jeremy
    
    Autobuild-User: Jeremy Allison <jra at samba.org>
    Autobuild-Date: Mon Apr  4 20:08:45 CEST 2011 on sn-devel-104
    (cherry picked from commit 2ec48260ee377e499fe7f0fc2ca18b8a078c6aaa)

commit f1bae428abf552470a41650f628e43840dbd1ea1
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Apr 4 10:15:16 2011 -0700

    Note that check_parent_exists() doesn't change the contents of smb_fname (add const).
    (cherry picked from commit 074239ac2eec666abb892b5eef46ca70691ed41f)

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

Summary of changes:
 source3/smbd/filename.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c
index 8b0c42a..cce1c44 100644
--- a/source3/smbd/filename.c
+++ b/source3/smbd/filename.c
@@ -112,7 +112,7 @@ static NTSTATUS check_for_dot_component(const struct smb_filename *smb_fname)
 static NTSTATUS check_parent_exists(TALLOC_CTX *ctx,
 				connection_struct *conn,
 				bool posix_pathnames,
-				struct smb_filename *smb_fname,
+				const struct smb_filename *smb_fname,
 				char **pp_dirpath,
 				char **pp_start)
 {
@@ -438,6 +438,9 @@ NTSTATUS unix_convert(TALLOC_CTX *ctx,
 			goto done;
 		}
 
+		/* Stat failed - ensure we don't use it. */
+		SET_STAT_INVALID(smb_fname->st);
+
 		if (errno == ENOENT) {
 			/* Optimization when creating a new file - only
 			   the last component doesn't exist. */
@@ -504,9 +507,6 @@ NTSTATUS unix_convert(TALLOC_CTX *ctx,
 					}
 				}
 
-				/* Stat failed - ensure we don't use it. */
-				SET_STAT_INVALID(smb_fname->st);
-
 				/*
 				 * Missing last component is ok - new file.
 				 * Also deal with permission denied elsewhere.


-- 
Samba Shared Repository


More information about the samba-cvs mailing list