]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
tests: prepare reparsepoints.py for using POSIX on the SMB2 connection
authorRalph Boehme <slow@samba.org>
Tue, 26 Nov 2024 13:53:45 +0000 (14:53 +0100)
committerRalph Boehme <slow@samba.org>
Wed, 27 Nov 2024 18:22:28 +0000 (18:22 +0000)
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
python/samba/tests/reparsepoints.py

index 40d7de3f63b4f299bc22363d52e108787e52f795..42f301f4e24e34ecef4f6f31b618298002256c03 100644 (file)
@@ -22,9 +22,12 @@ from samba import reparse_symlink
 import samba.tests.libsmb
 import stat
 
+def posix_context(mode):
+    return (libsmb.SMB2_CREATE_TAG_POSIX, mode.to_bytes(4, 'little'))
+
 class ReparsePoints(samba.tests.libsmb.LibsmbTests):
 
-    def connection(self):
+    def connection(self, posix=False):
         share = samba.tests.env_get_var_value("SHARENAME", allow_missing=True)
         if not share:
             share = "tmp"
@@ -34,6 +37,7 @@ class ReparsePoints(samba.tests.libsmb.LibsmbTests):
             share,
             self.lp,
             self.creds,
+            posix=posix,
             force_smb1=smb1)
         return conn