diff options
author | nadezhda ivanova <nivanova@ved.salsa.postpath.local> | 2009-04-23 17:18:23 +0300 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2009-04-23 18:21:25 +0200 |
commit | 90cc5e72ba0cf4b5261be2f2aa9db87bd011fbb0 (patch) | |
tree | 3ca9402fe8df738b8305d6391983882db51914e6 /source4/libcli/security/tests | |
parent | 3cf48ee05ae99fb99d1b7b7204f9b8c444907a4a (diff) | |
download | samba-90cc5e72ba0cf4b5261be2f2aa9db87bd011fbb0.tar.gz samba-90cc5e72ba0cf4b5261be2f2aa9db87bd011fbb0.tar.bz2 samba-90cc5e72ba0cf4b5261be2f2aa9db87bd011fbb0.zip |
Fix of a bug in the security.descriptor.as_sddl() method
security.descriptor.as_sddl() method did not work correctly when invoked without
supplying the domain sid. Returned the same value as when the sid was provided.
Test added for this case in libcli/security/tests/bindings.py
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Diffstat (limited to 'source4/libcli/security/tests')
-rw-r--r-- | source4/libcli/security/tests/bindings.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/libcli/security/tests/bindings.py b/source4/libcli/security/tests/bindings.py index 5c153050be..f0d55f12ca 100644 --- a/source4/libcli/security/tests/bindings.py +++ b/source4/libcli/security/tests/bindings.py @@ -77,6 +77,12 @@ class SecurityDescriptorTests(unittest.TestCase): self.assertEquals(desc1.sacl, desc2.sacl) self.assertEquals(desc1.type, desc2.type) + def test_domsid_nodomsid_as_sddl(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) + self.assertNotEqual(desc1.as_sddl(), desc1.as_sddl(dom)) + class DomSidTests(unittest.TestCase): def test_parse_sid(self): |