diff options
author | Andrew Bartlett <abartlet@samba.org> | 2017-02-28 14:15:12 +1300 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2017-06-10 21:48:20 +0200 |
commit | fa3c026983d597769f600e50b7e2b0e8772f3fd6 (patch) | |
tree | 0bf672a2625109d78dbe7e938b6b472cd3b0e314 /python | |
parent | e7bc97433377daaf9cb8fde7fdea79f5848ec535 (diff) | |
download | samba-fa3c026983d597769f600e50b7e2b0e8772f3fd6.tar.gz |
python: Allow sd_utils to take a Dn object, not just a string DN
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Diffstat (limited to 'python')
-rw-r--r-- | python/samba/sd_utils.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/python/samba/sd_utils.py b/python/samba/sd_utils.py index 7592a2982a4..568829f9c36 100644 --- 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) |