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

index fa2fa81eec03d3c75542cf8c26e7fb6c81e3298e..a05bb0f3c7a21b9c11df1bf92cca00ef3c567dd4 100644 (file)
@@ -1721,18 +1721,19 @@ static int stat_with_capability(struct vfs_handle_struct *handle,
 {
 #if defined(HAVE_FSTATAT)
        int fd = -1;
-       bool ok;
+       NTSTATUS status;
        struct smb_filename *dir_name = NULL;
        struct smb_filename *rel_name = NULL;
        struct stat st;
        int ret = -1;
 
-       ok = parent_smb_fname(talloc_tos(),
-                             smb_fname,
-                             &dir_name,
-                             &rel_name);
-       if (!ok) {
-               errno = ENOMEM;
+       status = SMB_VFS_PARENT_PATHNAME(handle->conn,
+                                        talloc_tos(),
+                                        smb_fname,
+                                        &dir_name,
+                                        &rel_name);
+       if (!NT_STATUS_IS_OK(status)) {
+               errno = map_errno_from_nt_status(status);
                return -1;
        }