summaryrefslogtreecommitdiff
path: root/source4/libcli/security
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2009-01-22 14:49:51 +0100
committerJelmer Vernooij <jelmer@samba.org>2009-01-22 14:49:51 +0100
commita4afed1e9a28498885382daf96ab7b8997821dca (patch)
tree072b663d6975e697d7b5c7a1e80883db00bbb90b /source4/libcli/security
parentfc50f7ecbab4bf273697f2114a723eae917251bb (diff)
downloadsamba-a4afed1e9a28498885382daf96ab7b8997821dca.tar.gz
samba-a4afed1e9a28498885382daf96ab7b8997821dca.tar.bz2
samba-a4afed1e9a28498885382daf96ab7b8997821dca.zip
Implement as_sddl.
Diffstat (limited to 'source4/libcli/security')
-rw-r--r--source4/libcli/security/tests/bindings.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/source4/libcli/security/tests/bindings.py b/source4/libcli/security/tests/bindings.py
index f556a23e01..24ee01c37f 100644
--- a/source4/libcli/security/tests/bindings.py
+++ b/source4/libcli/security/tests/bindings.py
@@ -57,6 +57,16 @@ class SecurityDescriptorTests(unittest.TestCase):
self.assertEquals(desc.sacl, None)
self.assertEquals(desc.type, 0x8004)
+ def test_as_sddl(self):
+ text = "O:AOG:DAD:(A;;RPWPCCDCLCSWRCWDWOGA;;;S-1-0-0)"
+ dom = security.dom_sid("S-2-0-0")
+ desc1 = security.descriptor.from_sddl(text, dom)
+ desc2 = security.descriptor.from_sddl(desc1.as_sddl(dom), 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):