diff options
author | Andrew Bartlett <abartlet@samba.org> | 2012-09-04 17:56:38 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2012-09-04 11:30:17 +0200 |
commit | 4437547afab2def2b53f2be1b10ac7b376f5ee8f (patch) | |
tree | dbea11003cf5e2fa0556a7d3de29617f90170144 /source4 | |
parent | 97a1f8d20be2068e3214361f844a6282e10ab28d (diff) | |
download | samba-4437547afab2def2b53f2be1b10ac7b376f5ee8f.tar.gz samba-4437547afab2def2b53f2be1b10ac7b376f5ee8f.tar.bz2 samba-4437547afab2def2b53f2be1b10ac7b376f5ee8f.zip |
s4-selftest: Try a more complex ACL - this example from a GPO
Andrew Bartlett
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Sep 4 11:30:17 CEST 2012 on sn-devel-104
Diffstat (limited to 'source4')
-rw-r--r-- | source4/scripting/python/samba/tests/posixacl.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source4/scripting/python/samba/tests/posixacl.py b/source4/scripting/python/samba/tests/posixacl.py index 7f7971cac0..ba0911d78c 100644 --- a/source4/scripting/python/samba/tests/posixacl.py +++ b/source4/scripting/python/samba/tests/posixacl.py @@ -92,6 +92,20 @@ class PosixAclMappingTests(TestCase): self.assertEquals(facl.as_sddl(anysid),acl) os.unlink(tempf) + def test_setntacl_smbd_getntacl_smbd_gpo(self): + random.seed() + lp = LoadParm() + path = None + path = os.environ['SELFTEST_PREFIX'] + acl = "O:DAG:DUD:P(A;OICI;0x001f01ff;;;DA)(A;OICI;0x001f01ff;;;EA)(A;OICIIO;0x001f01ff;;;CO)(A;OICI;0x001f01ff;;;DA)(A;OICI;0x001f01ff;;;SY)(A;OICI;0x001200a9;;;AU)(A;OICI;0x001200a9;;;ED)S:AI(OU;CIIDSA;WP;f30e3bbe-9ff0-11d1-b603-0000f80367c1;bf967aa5-0de6-11d0-a285-00aa003049e2;WD)(OU;CIIDSA;WP;f30e3bbf-9ff0-11d1-b603-0000f80367c1;bf967aa5-0de6-11d0-a285-00aa003049e2;WD)" + tempf = os.path.join(path,"pytests"+str(int(100000*random.random()))) + open(tempf, 'w').write("empty") + setntacl(lp,tempf,acl,"S-1-5-21-2212615479-2695158682-2101375467", use_ntvfs=False) + facl = getntacl(lp,tempf, direct_db_access=False) + domsid = security.dom_sid("S-1-5-21-2212615479-2695158682-2101375467") + self.assertEquals(facl.as_sddl(domsid),acl) + os.unlink(tempf) + def test_setntacl_getposixacl(self): random.seed() lp = LoadParm() |