smbd: remove redundant conn arg from non_widelink_open()
authorRalph Boehme <slow@samba.org>
Fri, 8 May 2020 13:46:02 +0000 (15:46 +0200)
committerRalph Boehme <slow@samba.org>
Thu, 21 May 2020 06:43:04 +0000 (06:43 +0000)
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Thu May 21 06:43:04 UTC 2020 on sn-devel-184

source3/smbd/open.c

index adcc2490a67c4ba8dba6dd2e145d09aad76bdaf7..e4628a75e72c0d605b173ee977f05a91f0fb31e3 100644 (file)
@@ -459,8 +459,7 @@ static int link_errno_convert(int err)
        return err;
 }
 
-static int non_widelink_open(struct connection_struct *conn,
-                       files_struct *fsp,
+static int non_widelink_open(files_struct *fsp,
                        struct smb_filename *smb_fname,
                        int flags,
                        mode_t mode,
@@ -590,8 +589,7 @@ static int process_symlink_open(struct connection_struct *conn,
        }
 
        /* And do it all again.. */
-       fd = non_widelink_open(conn,
-                               fsp,
+       fd = non_widelink_open(fsp,
                                smb_fname,
                                flags,
                                mode,
@@ -621,13 +619,13 @@ static int process_symlink_open(struct connection_struct *conn,
  Non-widelink open.
 ****************************************************************************/
 
-static int non_widelink_open(struct connection_struct *conn,
-                            files_struct *fsp,
+static int non_widelink_open(files_struct *fsp,
                             struct smb_filename *smb_fname,
                             int flags,
                             mode_t mode,
                             unsigned int link_depth)
 {
+       struct connection_struct *conn = fsp->conn;
        NTSTATUS status;
        int fd = -1;
        struct smb_filename *smb_fname_rel = NULL;
@@ -781,12 +779,11 @@ NTSTATUS fd_open(files_struct *fsp,
         * Only follow symlinks within a share
         * definition.
         */
-       fsp->fh->fd = non_widelink_open(conn,
-                               fsp,
-                               smb_fname,
-                               flags,
-                               mode,
-                               0);
+       fsp->fh->fd = non_widelink_open(fsp,
+                                       smb_fname,
+                                       flags,
+                                       mode,
+                                       0);
        if (fsp->fh->fd == -1) {
                saved_errno = errno;
        }