diff options
author | Nadezhda Ivanova <nivanova@samba.org> | 2010-11-25 19:57:51 +0200 |
---|---|---|
committer | Nadezhda Ivanova <nivanova@samba.org> | 2010-11-25 19:46:42 +0100 |
commit | 1e9a7882bead2a87eedcd5ddfe2b4df6a2b57306 (patch) | |
tree | e2ac591d5c20218ccc34cec1d3025b94341b2a4c /source4/scripting/python | |
parent | db403ac35dde415231498aee41b2306dfbe6a983 (diff) | |
download | samba-1e9a7882bead2a87eedcd5ddfe2b4df6a2b57306.tar.gz samba-1e9a7882bead2a87eedcd5ddfe2b4df6a2b57306.tar.bz2 samba-1e9a7882bead2a87eedcd5ddfe2b4df6a2b57306.zip |
s4-tests: Modified create_ou to only accept security.descriptor type for sd to avoid confusion
It used to work with sddl as well, but this is confusing and could lead to errors. It also caused a message about tallocing a security descriptor to appear.
Autobuild-User: Nadezhda Ivanova <nivanova@samba.org>
Autobuild-Date: Thu Nov 25 19:46:42 CET 2010 on sn-devel-104
Diffstat (limited to 'source4/scripting/python')
-rw-r--r-- | source4/scripting/python/samba/samdb.py | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/source4/scripting/python/samba/samdb.py b/source4/scripting/python/samba/samdb.py index 109e948d5c..df1af165ac 100644 --- a/source4/scripting/python/samba/samdb.py +++ b/source4/scripting/python/samba/samdb.py @@ -663,16 +663,10 @@ accountExpires: %u "objectClass": "organizationalUnit"} if description: - m["description"] = description + m["description"] = description if name: - m["name"] = name + m["name"] = name if sd: - assert(isinstance(sd, str) or isinstance(sd, security.descriptor)) - if isinstance(sd, str): - sid = security.dom_sid(self.get_domain_sid()) - tmp_desc = security.descriptor.from_sddl(sd, sid) - m["nTSecurityDescriptor"] = ndr_pack(tmp_desc) - elif isinstance(sd, security.descriptor): - m["nTSecurityDescriptor"] = ndr_pack(sd) + m["nTSecurityDescriptor"] = ndr_pack(sd) self.add(m) |