From: Joe Guo Date: Thu, 5 Apr 2018 02:49:25 +0000 (+1200) Subject: selftest: enable py3 for samba.tests.posixacl X-Git-Tag: talloc-2.1.13~16 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cf8578537726d7239cb2c79fbe8282035569c864;p=thirdparty%2Fsamba.git selftest: enable py3 for samba.tests.posixacl Fix bytes and str issue. Signed-off-by: Joe Guo Reviewed-by: Andrew Bartlett Reviewed-by: Douglas Bagnall --- diff --git a/python/samba/tests/posixacl.py b/python/samba/tests/posixacl.py index ef4ed77f13e..74cabf1bb70 100644 --- a/python/samba/tests/posixacl.py +++ b/python/samba/tests/posixacl.py @@ -82,7 +82,7 @@ class PosixAclMappingTests(TestCaseInTempDir): # This should invalidate the ACL, as we include the posix ACL in the hash (backend_obj, dbname) = checkset_backend(self.lp, None, None) backend_obj.wrap_setxattr(dbname, - self.tempf, "system.fake_access_acl", "") + self.tempf, "system.fake_access_acl", b"") #however, as this is direct DB access, we do not notice it facl = getntacl(self.lp, self.tempf, direct_db_access=True) @@ -96,7 +96,7 @@ class PosixAclMappingTests(TestCaseInTempDir): # This should invalidate the ACL, as we include the posix ACL in the hash (backend_obj, dbname) = checkset_backend(self.lp, None, None) backend_obj.wrap_setxattr(dbname, - self.tempf, "system.fake_access_acl", "") + self.tempf, "system.fake_access_acl", b"") #the hash would break, and we return an ACL based only on the mode, except we set the ACL using the 'ntvfs' mode that doesn't include a hash facl = getntacl(self.lp, self.tempf) @@ -112,7 +112,7 @@ class PosixAclMappingTests(TestCaseInTempDir): # This should invalidate the ACL, as we include the posix ACL in the hash (backend_obj, dbname) = checkset_backend(self.lp, None, None) backend_obj.wrap_setxattr(dbname, - self.tempf, "system.fake_access_acl", "") + self.tempf, "system.fake_access_acl", b"") #the hash will break, and we return an ACL based only on the mode facl = getntacl(self.lp, self.tempf, direct_db_access=False)