summaryrefslogtreecommitdiff
path: root/source4/libcli/security
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2009-01-22 14:37:59 +0100
committerJelmer Vernooij <jelmer@samba.org>2009-01-22 14:37:59 +0100
commitfc50f7ecbab4bf273697f2114a723eae917251bb (patch)
treea1d8d0b4e2fac1502ca83c1a6ba5995578a90e03 /source4/libcli/security
parent8f68a716fdefb153811d7d930fdd73df9963246a (diff)
downloadsamba-fc50f7ecbab4bf273697f2114a723eae917251bb.tar.gz
samba-fc50f7ecbab4bf273697f2114a723eae917251bb.tar.bz2
samba-fc50f7ecbab4bf273697f2114a723eae917251bb.zip
Support parsing sddl for security descriptors.
Diffstat (limited to 'source4/libcli/security')
-rw-r--r--source4/libcli/security/tests/bindings.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/source4/libcli/security/tests/bindings.py b/source4/libcli/security/tests/bindings.py
index 2b23ecf05f..f556a23e01 100644
--- a/source4/libcli/security/tests/bindings.py
+++ b/source4/libcli/security/tests/bindings.py
@@ -49,6 +49,14 @@ class SecurityDescriptorTests(unittest.TestCase):
def setUp(self):
self.descriptor = security.descriptor()
+ def test_from_sddl(self):
+ desc = security.descriptor.from_sddl("O:AOG:DAD:(A;;RPWPCCDCLCSWRCWDWOGA;;;S-1-0-0)", security.dom_sid("S-2-0-0"))
+ self.assertEquals(desc.group_sid, security.dom_sid('S-2-0-0-512'))
+ self.assertEquals(desc.owner_sid, security.dom_sid('S-1-5-32-548'))
+ self.assertEquals(desc.revision, 1)
+ self.assertEquals(desc.sacl, None)
+ self.assertEquals(desc.type, 0x8004)
+
class DomSidTests(unittest.TestCase):
def test_parse_sid(self):