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

pylibsmb: Return reparse_tag from directory listing

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke 2024-04-28 16:21:44 +02:00 committed by Jeremy Allison
parent ceea95af63
commit 8ef24d670b

View File

@ -1895,7 +1895,7 @@ static NTSTATUS list_posix_helper(struct file_info *finfo,
"s:K,s:K," "s:K,s:K,"
"s:l,s:l,s:l,s:l," "s:l,s:l,s:l,s:l,"
"s:i,s:K,s:i,s:i,s:I," "s:i,s:K,s:i,s:i,s:I,"
"s:s,s:s}", "s:s,s:s,s:k}",
"name", finfo->name, "name", finfo->name,
"attrib", finfo->attr, "attrib", finfo->attr,
@ -1920,7 +1920,8 @@ static NTSTATUS list_posix_helper(struct file_info *finfo,
"owner_sid", "owner_sid",
dom_sid_string(finfo, &finfo->owner_sid), dom_sid_string(finfo, &finfo->owner_sid),
"group_sid", "group_sid",
dom_sid_string(finfo, &finfo->group_sid)); dom_sid_string(finfo, &finfo->group_sid),
"reparse_tag", (unsigned long)finfo->reparse_tag);
if (file == NULL) { if (file == NULL) {
return NT_STATUS_NO_MEMORY; return NT_STATUS_NO_MEMORY;
} }
@ -1954,13 +1955,14 @@ static NTSTATUS list_helper(struct file_info *finfo,
* Build a dictionary representing the file info. * Build a dictionary representing the file info.
* Note: Windows does not always return short_name (so it may be None) * Note: Windows does not always return short_name (so it may be None)
*/ */
file = Py_BuildValue("{s:s,s:i,s:s,s:O,s:l}", file = Py_BuildValue("{s:s,s:i,s:s,s:O,s:l,s:k}",
"name", finfo->name, "name", finfo->name,
"attrib", (int)finfo->attr, "attrib", (int)finfo->attr,
"short_name", finfo->short_name, "short_name", finfo->short_name,
"size", size, "size", size,
"mtime", "mtime",
convert_timespec_to_time_t(finfo->mtime_ts)); convert_timespec_to_time_t(finfo->mtime_ts),
"reparse_tag", (unsigned long)finfo->reparse_tag);
Py_CLEAR(size); Py_CLEAR(size);