From: Ralph Boehme Date: Fri, 2 Oct 2020 14:30:03 +0000 (+0200) Subject: smbd: remove dirsp arg from open_directory() X-Git-Tag: talloc-2.3.2~330 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a7544661816a3d06cdc67e1e08a9afca81d7cf9b;p=thirdparty%2Fsamba.git smbd: remove dirsp arg from open_directory() Prepares for removing the dirfsp arg from SMB_VFS_CREATE_FILE() again. In the future open_directory() will open the dirfsp itself. Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 1a75856a1ea..b22ed954f06 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -4307,7 +4307,6 @@ static NTSTATUS mkdir_internal(connection_struct *conn, static NTSTATUS open_directory(connection_struct *conn, struct smb_request *req, - struct files_struct **dirfsp, uint32_t access_mask, uint32_t share_access, uint32_t create_disposition, @@ -4325,8 +4324,6 @@ static NTSTATUS open_directory(connection_struct *conn, int flags; bool ok; - SMB_ASSERT(*dirfsp == conn->cwd_fsp); - if (is_ntfs_stream_smb_fname(smb_dname)) { DEBUG(2, ("open_directory: %s is a stream name!\n", smb_fname_str_dbg(smb_dname))); @@ -4350,7 +4347,7 @@ static NTSTATUS open_directory(connection_struct *conn, file_attributes); status = smbd_calculate_access_mask(conn, - *dirfsp, + conn->cwd_fsp, smb_dname, false, access_mask, @@ -4481,7 +4478,7 @@ static NTSTATUS open_directory(connection_struct *conn, if (info == FILE_WAS_OPENED) { status = smbd_check_access_rights(conn, - *dirfsp, + conn->cwd_fsp, smb_dname, false, access_mask); @@ -5696,7 +5693,6 @@ static NTSTATUS create_file_unixpath(connection_struct *conn, oplock_request = 0; status = open_directory(conn, req, - dirfsp, access_mask, share_access, create_disposition, @@ -5749,7 +5745,6 @@ static NTSTATUS create_file_unixpath(connection_struct *conn, oplock_request = 0; status = open_directory(conn, req, - dirfsp, access_mask, share_access, create_disposition,