From 5df2795ffc57f510cda0eb07a9e589cf8daf6de5 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 20 Apr 2009 15:10:17 +0200 Subject: Add a unit test for security_descriptor.as_sddl() without arguments. --- source4/libcli/security/tests/bindings.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source4') 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): -- cgit