mirror of
https://github.com/samba-team/samba.git
synced 2025-07-19 04:59:10 +03:00
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
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user