1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

libadouble: call vfs_stat() in ad_convert_finderinfo()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Ralph Boehme 2021-01-12 11:59:33 +01:00 committed by Jeremy Allison
parent c77140fd65
commit 93f4cb9786

View File

@ -1205,6 +1205,7 @@ static bool ad_convert_finderinfo(vfs_handle_struct *handle,
NTSTATUS status;
int saved_errno = 0;
int cmp;
int rc;
cmp = memcmp(ad->ad_filler, AD_FILLER_TAG_OSX, ADEDLEN_FILLER);
if (cmp != 0) {
@ -1249,6 +1250,11 @@ static bool ad_convert_finderinfo(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) {
return false;
}
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))