[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Thu Apr 7 17:31:01 UTC 2022


The branch, master has been updated
       via  6e6ced4b8cb smbd: Use dirfsp and atname passed to open_file()
       via  0d05bc2e42d smbd: Align open_file() argument order with reopen_from_fsp()
       via  ef341e0f2df modules: Use conn->cwd_fsp in fruit_open_rsrc_adouble()
      from  6dc463d3e2e s3:auth: Fix user_in_list() for UNIX groups

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


- Log -----------------------------------------------------------------
commit 6e6ced4b8cbddd9a04e69cb1865fa75ba7b4f8b7
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Apr 7 11:31:33 2022 +0200

    smbd: Use dirfsp and atname passed to open_file()
    
    Give non_widelink_open() to use the cheaper path without the full
    chdir() logic when called via open_file_ntcreate()/open_file().
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Thu Apr  7 17:30:29 UTC 2022 on sn-devel-184

commit 0d05bc2e42d7d5600a49ef1c121ab88ae2e56121
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Apr 7 11:26:59 2022 +0200

    smbd: Align open_file() argument order with reopen_from_fsp()
    
    dirfsp first, then dirfsp-relative atname, then fsp. smb_fname_atname
    will be used soon.
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit ef341e0f2df6bc5ae210fb597bfa4aa9c5ca2505
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Feb 23 09:30:06 2022 +0000

    modules: Use conn->cwd_fsp in fruit_open_rsrc_adouble()
    
    None of the adouble infrastructure is really prepared for a dirfsp
    that is not conn->cwd_fsp, there are quite a few direct references to
    it in adouble.c. This needs conversion, but at this point we need to
    make fruit_openat() robust against a non-cwd_fsp dirfsp argument.
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

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

Summary of changes:
 source3/modules/vfs_fruit.c |  2 +-
 source3/smbd/open.c         | 14 ++++++++------
 2 files changed, 9 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c
index 995c869d10f..81bc0cf4cc2 100644
--- a/source3/modules/vfs_fruit.c
+++ b/source3/modules/vfs_fruit.c
@@ -1586,7 +1586,7 @@ static int fruit_open_rsrc_adouble(vfs_handle_struct *handle,
 		goto exit;
 	}
 
-	status = adouble_open_from_base_fsp(dirfsp,
+	status = adouble_open_from_base_fsp(fsp->conn->cwd_fsp,
 					    fsp->base_fsp,
 					    ADOUBLE_RSRC,
 					    flags,
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 1644d867566..c534ccd183a 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -1296,9 +1296,10 @@ static NTSTATUS reopen_from_fsp(struct files_struct *dirfsp,
  Open a file.
 ****************************************************************************/
 
-static NTSTATUS open_file(files_struct *fsp,
-			  struct smb_request *req,
+static NTSTATUS open_file(struct smb_request *req,
 			  struct files_struct *dirfsp,
+			  struct smb_filename *smb_fname_atname,
+			  files_struct *fsp,
 			  int flags,
 			  mode_t unx_mode,
 			  uint32_t access_mask, /* client requested access mask. */
@@ -1478,8 +1479,8 @@ static NTSTATUS open_file(files_struct *fsp,
 		 * Actually do the open - if O_TRUNC is needed handle it
 		 * below under the share mode lock.
 		 */
-		status = reopen_from_fsp(fsp->conn->cwd_fsp,
-					 fsp->fsp_name,
+		status = reopen_from_fsp(dirfsp,
+					 smb_fname_atname,
 					 fsp,
 					 local_flags & ~O_TRUNC,
 					 unx_mode,
@@ -3848,9 +3849,10 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn,
 		 (unsigned int)unx_mode, (unsigned int)access_mask,
 		 (unsigned int)open_access_mask));
 
-	fsp_open = open_file(fsp,
-			     req,
+	fsp_open = open_file(req,
 			     parent_dir_fname->fsp,
+			     smb_fname_atname,
+			     fsp,
 			     flags|flags2,
 			     unx_mode,
 			     access_mask,


-- 
Samba Shared Repository



More information about the samba-cvs mailing list