]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: remove unused cwdfsp from non_widelink_open()
authorRalph Boehme <slow@samba.org>
Tue, 13 Oct 2020 14:47:51 +0000 (16:47 +0200)
committerRalph Boehme <slow@samba.org>
Wed, 16 Dec 2020 09:08:30 +0000 (09:08 +0000)
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/open.c

index 06e5da9037fec0483bd03f4e7ba93ccdb67c8a6d..04e7d5d94b74f5d10b9cf6830092db87c152ed8b 100644 (file)
@@ -656,7 +656,6 @@ static int non_widelink_open(const struct files_struct *dirfsp,
        int saved_errno = 0;
        struct smb_filename *oldwd_fname = NULL;
        struct smb_filename *parent_dir_fname = NULL;
-       struct files_struct *cwdfsp = NULL;
        bool have_opath = false;
        bool ok;
 
@@ -709,14 +708,6 @@ static int non_widelink_open(const struct files_struct *dirfsp,
                goto out;
        }
 
-       status = vfs_at_fspcwd(talloc_tos(),
-                              conn,
-                              &cwdfsp);
-       if (!NT_STATUS_IS_OK(status)) {
-               saved_errno = map_errno_from_nt_status(status);
-               goto out;
-       }
-
        flags |= O_NOFOLLOW;
 
        fsp->fsp_name = smb_fname_rel;
@@ -821,7 +812,6 @@ static int non_widelink_open(const struct files_struct *dirfsp,
   out:
 
        TALLOC_FREE(parent_dir_fname);
-       TALLOC_FREE(cwdfsp);
 
        if (oldwd_fname != NULL) {
                int ret = vfs_ChDir(conn, oldwd_fname);