diff options
author | Andrew Bartlett <abartlet@samba.org> | 2012-10-25 20:18:28 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2012-10-25 22:18:50 +1100 |
commit | 1008f6fbf49d5b797c7d968ea7ffdcb29d623644 (patch) | |
tree | 035fa44029b1a06dca11b1e01c8e3c0611fb931d /source4/scripting/python | |
parent | 117d5f4c372c02d69106df45e12ac69d1c047f50 (diff) | |
download | samba-1008f6fbf49d5b797c7d968ea7ffdcb29d623644.tar.gz samba-1008f6fbf49d5b797c7d968ea7ffdcb29d623644.tar.bz2 samba-1008f6fbf49d5b797c7d968ea7ffdcb29d623644.zip |
selftest: Always unlink the tempf in posixacl test
Diffstat (limited to 'source4/scripting/python')
-rw-r--r-- | source4/scripting/python/samba/tests/posixacl.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/scripting/python/samba/tests/posixacl.py b/source4/scripting/python/samba/tests/posixacl.py index cf7a40f031..482b48ba4c 100644 --- a/source4/scripting/python/samba/tests/posixacl.py +++ b/source4/scripting/python/samba/tests/posixacl.py @@ -278,9 +278,11 @@ class PosixAclMappingTests(TestCase): smbd.set_simple_acl(tempf, 0750) try: facl = getntacl(lp,tempf) + self.assertTrue(False) except TypeError: # We don't expect the xattr to be filled in in this case pass + os.unlink(tempf) def test_setposixacl_getntacl_smbd(self): random.seed() @@ -294,10 +296,10 @@ class PosixAclMappingTests(TestCase): user_SID = s4_passdb.uid_to_sid(os.stat(tempf).st_uid) smbd.set_simple_acl(tempf, 0640) facl = getntacl(lp, tempf, direct_db_access=False) - domsid = passdb.get_global_sam_sid() acl = "O:%sG:%sD:(A;;0x001f019f;;;%s)(A;;0x00120089;;;%s)(A;;WO;;;WD)" % (user_SID, group_SID, user_SID, group_SID) anysid = security.dom_sid(security.SID_NT_SELF) self.assertEquals(acl, facl.as_sddl(anysid)) + os.unlink(tempf) def test_setposixacl_group_getntacl_smbd(self): random.seed() @@ -318,6 +320,7 @@ class PosixAclMappingTests(TestCase): acl = "O:%sG:%sD:(A;;0x001f019f;;;%s)(A;;0x00120089;;;BA)(A;;0x00120089;;;%s)(A;;WO;;;WD)" % (user_SID, group_SID, user_SID, group_SID) anysid = security.dom_sid(security.SID_NT_SELF) self.assertEquals(acl, facl.as_sddl(anysid)) + os.unlink(tempf) def test_setposixacl_getposixacl(self): random.seed() |