From: Ralph Boehme Date: Tue, 12 Jan 2021 10:59:02 +0000 (+0100) Subject: libadouble: call vfs_stat() in ad_convert_xattr() X-Git-Tag: samba-4.14.0rc1~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c77140fd6513b0115e70d257cee156e2c76964c2;p=thirdparty%2Fsamba.git libadouble: call vfs_stat() in ad_convert_xattr() Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/source3/lib/adouble.c b/source3/lib/adouble.c index 0155c2ccc8d..060caa97ede 100644 --- a/source3/lib/adouble.c +++ b/source3/lib/adouble.c @@ -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))