The branch, master has been updated
       via  205acab5803 smbd: remove initial stat() EACCES handling from 
unix_convert()
      from  fdfc480a563 ctdb-scripts: Update nfs-ganesha-callout

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


- Log -----------------------------------------------------------------
commit 205acab580379e351222de4fa2879ea44f59fc05
Author: Ralph Boehme <[email protected]>
Date:   Thu Apr 23 10:48:51 2020 +0200

    smbd: remove initial stat() EACCES handling from unix_convert()
    
    This was added by bd90ca6f00b (my bad) but it breaks filesystems with NFS4
    permissions.
    
    Signed-off-by: Ralph Boehme <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>
    
    Autobuild-User(master): Jeremy Allison <[email protected]>
    Autobuild-Date(master): Thu Apr 23 19:50:38 UTC 2020 on sn-devel-184

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

Summary of changes:
 source3/smbd/filename.c | 17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c
index 8030e504317..1bf09053bbc 100644
--- a/source3/smbd/filename.c
+++ b/source3/smbd/filename.c
@@ -700,17 +700,12 @@ NTSTATUS unix_convert(TALLOC_CTX *ctx,
                /* Stat failed - ensure we don't use it. */
                SET_STAT_INVALID(smb_fname->st);
 
-               if (errno == EACCES) {
-                       /*
-                        * Early exit on access denied. Walking
-                        * the path won't fix that.
-                        */
-                       DBG_DEBUG("stat [%s]: %s\n",
-                                 smb_fname_str_dbg(smb_fname),
-                                 strerror(errno));
-                       status = NT_STATUS_ACCESS_DENIED;
-                       goto fail;
-               }
+               /*
+                * Note: we must continue processing a path if we get EACCES
+                * from stat. With NFS4 permissions the file might be lacking
+                * READ_ATTR, but if the parent has LIST permissions we can
+                * resolve the path in the path traversal loop down below.
+                */
 
                if (errno == ENOENT) {
                        /* Optimization when creating a new file - only


-- 
Samba Shared Repository

Reply via email to