git.samba.org
/
nivanova
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e7bc974
)
python: Allow sd_utils to take a Dn object, not just a string DN
author
Andrew Bartlett
<abartlet@samba.org>
Tue, 28 Feb 2017 01:15:12 +0000
(14:15 +1300)
committer
Andrew Bartlett
<abartlet@samba.org>
Sat, 10 Jun 2017 19:48:20 +0000
(21:48 +0200)
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
python/samba/sd_utils.py
patch
|
blob
|
history
diff --git
a/python/samba/sd_utils.py
b/python/samba/sd_utils.py
index 7592a2982a4c08e80c82fecf41d5303e8affae58..568829f9c366fe6dd27df9245c0cbdaffc5fb52b 100644
(file)
--- a/
python/samba/sd_utils.py
+++ b/
python/samba/sd_utils.py
@@
-37,7
+37,11
@@
class SDUtils(object):
or security.descriptor object
"""
m = Message()
- m.dn = Dn(self.ldb, object_dn)
+ if isinstance(object_dn, Dn):
+ m.dn = object_dn
+ else:
+ m.dn = Dn(self.ldb, object_dn)
+
assert(isinstance(sd, str) or isinstance(sd, security.descriptor))
if isinstance(sd, str):
tmp_desc = security.descriptor.from_sddl(sd, self.domain_sid)