]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: non_widelink_open(), parent_smb_fname() -> SMB_VFS_PARENT_PATHNAME().
authorJeremy Allison <jra@samba.org>
Wed, 26 May 2021 18:43:16 +0000 (11:43 -0700)
committerRalph Boehme <slow@samba.org>
Wed, 2 Jun 2021 05:39:30 +0000 (05:39 +0000)
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/open.c

index bd42eb62f126cf0c526ac1a22f43ab5ac9b401f6..9f7a64cdebafaf65cbf093866f11ad775e176b18 100644 (file)
@@ -712,7 +712,6 @@ static NTSTATUS non_widelink_open(const struct files_struct *dirfsp,
        struct smb_filename *parent_dir_fname = NULL;
        bool have_opath = false;
        int ret;
-       bool ok;
 
 #ifdef O_PATH
        have_opath = true;
@@ -737,12 +736,12 @@ static NTSTATUS non_widelink_open(const struct files_struct *dirfsp,
                                goto out;
                        }
                } else {
-                       ok = parent_smb_fname(talloc_tos(),
-                                             smb_fname,
-                                             &parent_dir_fname,
-                                             &smb_fname_rel);
-                       if (!ok) {
-                               status = NT_STATUS_NO_MEMORY;
+                       status = SMB_VFS_PARENT_PATHNAME(fsp->conn,
+                                                        talloc_tos(),
+                                                        smb_fname,
+                                                        &parent_dir_fname,
+                                                        &smb_fname_rel);
+                       if (!NT_STATUS_IS_OK(status)) {
                                goto out;
                        }
                }