]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: VFS: acl_common. parent_smb_fname() -> SMB_VFS_PARENT_PATHNAME().
authorJeremy Allison <jra@samba.org>
Wed, 26 May 2021 18:00:49 +0000 (11:00 -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/modules/vfs_acl_common.c

index 39afdcb1cf3d557816e7124d3cbc908f9936d2d8..0615c06c81b49d3e1c8f8626fa8bc76a897f877f 100644 (file)
@@ -1200,7 +1200,7 @@ static int acl_common_remove_object(vfs_handle_struct *handle,
        struct smb_filename *parent_dir_fname = NULL;
        int saved_errno = 0;
        struct smb_filename *saved_dir_fname = NULL;
-       bool ok;
+       NTSTATUS status;
 
        saved_dir_fname = vfs_GetWd(talloc_tos(),conn);
        if (saved_dir_fname == NULL) {
@@ -1215,12 +1215,13 @@ static int acl_common_remove_object(vfs_handle_struct *handle,
                goto out;
        }
 
-       ok = parent_smb_fname(talloc_tos(),
-                             full_fname,
-                             &parent_dir_fname,
-                             &local_fname);
-       if (!ok) {
-               saved_errno = ENOMEM;
+       status = SMB_VFS_PARENT_PATHNAME(conn,
+                                        talloc_tos(),
+                                        full_fname,
+                                        &parent_dir_fname,
+                                        &local_fname);
+       if (!NT_STATUS_IS_OK(status)) {
+               saved_errno = map_errno_from_nt_status(status);
                goto out;
        }