The branch, master has been updated
       via  2ec4826 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  074239a Note that check_parent_exists() doesn't change the contents 
of smb_fname (add const).
      from  a217ec6 s3-net: add command "net idmap check"

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 2ec48260ee377e499fe7f0fc2ca18b8a078c6aaa
Author: Jeremy Allison <j...@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 <j...@samba.org>
    Autobuild-Date: Mon Apr  4 20:08:45 CEST 2011 on sn-devel-104

commit 074239ac2eec666abb892b5eef46ca70691ed41f
Author: Jeremy Allison <j...@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).

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

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 912e3a4..08bc79d 100644
--- a/source3/smbd/filename.c
+++ b/source3/smbd/filename.c
@@ -114,7 +114,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)
 {
@@ -440,6 +440,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. */
@@ -506,9 +509,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

Reply via email to