summaryrefslogtreecommitdiff
path: root/python/samba/tests/reparsepoints.py
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2024-05-09 11:54:31 +0200
committerJeremy Allison <jra@samba.org>2024-05-14 22:29:36 +0000
commit44b3eadacb3df92238b30c38abe4abf48c60a971 (patch)
treec6b7eacad91b014d47452aef0de321e758b865af /python/samba/tests/reparsepoints.py
parentba40d97087bed742eb6178b2e5e03a77e040f343 (diff)
downloadsamba-44b3eadacb3df92238b30c38abe4abf48c60a971.tar.gz
samba-44b3eadacb3df92238b30c38abe4abf48c60a971.tar.bz2
samba-44b3eadacb3df92238b30c38abe4abf48c60a971.zip
tests: get TAG_INFORMATION
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'python/samba/tests/reparsepoints.py')
-rw-r--r--python/samba/tests/reparsepoints.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/python/samba/tests/reparsepoints.py b/python/samba/tests/reparsepoints.py
index 96ca6eefdd5..1f74c61bc64 100644
--- a/python/samba/tests/reparsepoints.py
+++ b/python/samba/tests/reparsepoints.py
@@ -118,6 +118,30 @@ class ReparsePoints(samba.tests.libsmb.LibsmbTests):
self.assertEqual(e.exception.args[0],
ntstatus.NT_STATUS_IO_REPARSE_TAG_MISMATCH)
+ def test_query_reparse_tag(self):
+ conn = self.connection()
+ filename = 'reparse'
+ self.clean_file(conn, filename)
+
+ fd = conn.create(
+ filename,
+ DesiredAccess=sec.SEC_FILE_READ_ATTRIBUTE |
+ sec.SEC_FILE_WRITE_ATTRIBUTE |
+ sec.SEC_STD_DELETE,
+ CreateDisposition=libsmb.FILE_CREATE)
+
+ conn.delete_on_close(fd, 1)
+
+ info = conn.qfileinfo(fd, libsmb.FSCC_FILE_ATTRIBUTE_TAG_INFORMATION);
+ self.assertEqual(info['tag'], 0)
+
+ b = reparse_symlink.put(0x80000026, 0, b'asdf')
+ conn.fsctl(fd, libsmb.FSCTL_SET_REPARSE_POINT, b, 0)
+
+ info = conn.qfileinfo(fd, libsmb.FSCC_FILE_ATTRIBUTE_TAG_INFORMATION);
+ self.assertEqual(info['tag'], 0x80000026)
+
+
# Show that we can write to a reparse point when opened properly
def test_write_reparse(self):
conn = self.connection()