pylibsmb: Get reparse tag when listing directories
authorVolker Lendecke <vl@samba.org>
Mon, 2 Jan 2023 13:29:12 +0000 (14:29 +0100)
committerRalph Boehme <slow@samba.org>
Wed, 4 Jan 2023 08:54:32 +0000 (08:54 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/libsmb/pylibsmb.c

index 0990e2dc995af441abd736e41a8c7b7fc399358b..159e3c9d3432115db72dd9886c1a92643fb7f8cf 100644 (file)
@@ -1970,6 +1970,18 @@ static NTSTATUS list_helper(struct file_info *finfo,
                return NT_STATUS_NO_MEMORY;
        }
 
+       if (finfo->attr & FILE_ATTRIBUTE_REPARSE_POINT) {
+               unsigned long tag = finfo->reparse_tag;
+
+               ret = PyDict_SetItemString(
+                       file,
+                       "reparse_tag",
+                       PyLong_FromUnsignedLong(tag));
+               if (ret == -1) {
+                       return NT_STATUS_INTERNAL_ERROR;
+               }
+       }
+
        ret = PyList_Append(result, file);
        Py_CLEAR(file);
        if (ret == -1) {