]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:smbd: don't pass an unused smb_fname to reopen_from_procfd()
authorStefan Metzmacher <metze@samba.org>
Wed, 23 Dec 2020 15:03:37 +0000 (16:03 +0100)
committerStefan Metzmacher <metze@samba.org>
Thu, 14 Jan 2021 11:30:38 +0000 (11:30 +0000)
Both callers pass in a helper variable that points to
fsp->fsp_name and it was only used for a debug message,
so we can simply use fsp_str_dgb() instead.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/open.c

index e839f406abc86b3adb0c7cf5c5edd82d7dd63768..9a79577ce69bdbed153b3c678b7cbf4685f249c7 100644 (file)
@@ -1164,7 +1164,6 @@ static NTSTATUS fd_open_atomic(files_struct *fsp,
 }
 
 static NTSTATUS reopen_from_procfd(struct files_struct *fsp,
-                                  struct smb_filename *smb_fname,
                                   int flags,
                                   mode_t mode)
 {
@@ -1187,7 +1186,7 @@ static NTSTATUS reopen_from_procfd(struct files_struct *fsp,
 
        if (!fsp->fsp_flags.is_pathref) {
                DBG_ERR("[%s] is not a pathref\n",
-                       smb_fname_str_dbg(smb_fname));
+                       fsp_str_dbg(fsp));
 #ifdef DEVELOPER
                smb_panic("Not a pathref");
 #endif
@@ -1411,7 +1410,6 @@ static NTSTATUS open_file(files_struct *fsp,
                 * below under the share mode lock.
                 */
                status = reopen_from_procfd(fsp,
-                                           smb_fname,
                                            local_flags & ~O_TRUNC,
                                            unx_mode);
                if (NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED))
@@ -4647,7 +4645,7 @@ static NTSTATUS open_directory(connection_struct *conn,
        flags |= O_DIRECTORY;
 #endif
 
-       status = reopen_from_procfd(fsp, smb_dname, flags, 0);
+       status = reopen_from_procfd(fsp, flags, 0);
        if (NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED)) {
                bool __unused_file_created = false;