1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-14 00:58:38 +03:00

smbd: Return reparse tag in smb311 unix query dir

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
Volker Lendecke 2024-09-20 19:16:17 +02:00 committed by Ralph Boehme
parent 677a6125bc
commit 13a9417f0d

View File

@ -1746,6 +1746,7 @@ static NTSTATUS smbd_marshall_dir_entry(TALLOC_CTX *ctx,
.fixed_buf_size = true,
};
enum ndr_err_code ndr_err;
uint32_t tag = 0;
DBG_DEBUG("SMB2_FILE_POSIX_INFORMATION\n");
@ -1756,8 +1757,20 @@ static NTSTATUS smbd_marshall_dir_entry(TALLOC_CTX *ctx,
return NT_STATUS_INVALID_LEVEL;
}
if (mode & FILE_ATTRIBUTE_REPARSE_POINT) {
status = fsctl_get_reparse_tag(smb_fname->fsp,
&tag);
if (!NT_STATUS_IS_OK(status)) {
DBG_DEBUG("Could not get reparse "
"tag for %s: %s\n",
smb_fname_str_dbg(smb_fname),
nt_errstr(status));
return status;
}
}
smb3_file_posix_information_init(
conn, &smb_fname->st, 0, mode, &info);
conn, &smb_fname->st, tag, mode, &info);
ndr_err = ndr_push_smb3_file_posix_information(
&ndr, NDR_SCALARS|NDR_BUFFERS, &info);