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

index e79ca25ab34df196eab75c2bfb77a1d277d37e75..12662774cd1c242417f2f374dd05d48e7d34c013 100644 (file)
@@ -1144,19 +1144,17 @@ NTSTATUS check_reduced_name_with_privilege(connection_struct *conn,
        int ret;
        struct smb_filename *parent_name = NULL;
        struct smb_filename *file_name = NULL;
-       bool ok;
 
        DEBUG(3,("check_reduced_name_with_privilege [%s] [%s]\n",
                        smb_fname->base_name,
                        conn->connectpath));
 
-
-       ok = parent_smb_fname(ctx,
-                             smb_fname,
-                             &parent_name,
-                             &file_name);
-       if (!ok) {
-               status = NT_STATUS_NO_MEMORY;
+       status = SMB_VFS_PARENT_PATHNAME(conn,
+                                        ctx,
+                                        smb_fname,
+                                        &parent_name,
+                                        &file_name);
+       if (!NT_STATUS_IS_OK(status)) {
                goto err;
        }