diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2009-04-20 15:10:17 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2009-04-20 15:10:29 +0200 |
commit | 5df2795ffc57f510cda0eb07a9e589cf8daf6de5 (patch) | |
tree | 4c6140d532141bf875a83125bf5154917acc5ef9 /source4 | |
parent | 294359b7bcb84b2284c5a76e1a453c3483dd3bb2 (diff) | |
download | samba-5df2795ffc57f510cda0eb07a9e589cf8daf6de5.tar.gz samba-5df2795ffc57f510cda0eb07a9e589cf8daf6de5.tar.bz2 samba-5df2795ffc57f510cda0eb07a9e589cf8daf6de5.zip |
Add a unit test for security_descriptor.as_sddl() without arguments.
Diffstat (limited to 'source4')
-rw-r--r-- | source4/libcli/security/tests/bindings.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source4/libcli/security/tests/bindings.py b/source4/libcli/security/tests/bindings.py index 24ee01c37f..5c153050be 100644 --- a/source4/libcli/security/tests/bindings.py +++ b/source4/libcli/security/tests/bindings.py @@ -67,6 +67,16 @@ class SecurityDescriptorTests(unittest.TestCase): self.assertEquals(desc1.sacl, desc2.sacl) self.assertEquals(desc1.type, desc2.type) + def test_as_sddl_no_domainsid(self): + dom = security.dom_sid("S-2-0-0") + text = "O:AOG:DAD:(A;;RPWPCCDCLCSWRCWDWOGA;;;S-1-0-0)" + desc1 = security.descriptor.from_sddl(text, dom) + desc2 = security.descriptor.from_sddl(desc1.as_sddl(), dom) + self.assertEquals(desc1.group_sid, desc2.group_sid) + self.assertEquals(desc1.owner_sid, desc2.owner_sid) + self.assertEquals(desc1.sacl, desc2.sacl) + self.assertEquals(desc1.type, desc2.type) + class DomSidTests(unittest.TestCase): def test_parse_sid(self): |