]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libadouble: call vfs_stat() in ad_convert_xattr()
authorRalph Boehme <slow@samba.org>
Tue, 12 Jan 2021 10:59:02 +0000 (11:59 +0100)
committerJeremy Allison <jra@samba.org>
Thu, 14 Jan 2021 17:55:33 +0000 (17:55 +0000)
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/lib/adouble.c

index 0155c2ccc8dd837fb013a3e213511efa379920f2..060caa97edebf902252ac66b76b567496b1b6985 100644 (file)
@@ -1106,6 +1106,12 @@ static bool ad_convert_xattr(vfs_handle_struct *handle,
 
                DBG_DEBUG("stream_name: %s\n", smb_fname_str_dbg(stream_name));
 
+               rc = vfs_stat(handle->conn, stream_name);
+               if (rc == -1 && errno != ENOENT) {
+                       ok = false;
+                       goto fail;
+               }
+
                status = openat_pathref_fsp(handle->conn->cwd_fsp, stream_name);
                if (!NT_STATUS_IS_OK(status) &&
                    !NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_NOT_FOUND))