summaryrefslogtreecommitdiff
path: root/python/samba/netcmd
diff options
context:
space:
mode:
authorBjörn Baumbach <bb@sernet.de>2020-02-26 13:40:50 +0100
committerAndrew Bartlett <abartlet@samba.org>2020-02-28 03:08:45 +0000
commit626209beab2fc9b0fdb7e90338cdfec5cfa48dd7 (patch)
tree2d439bfe59a3e983c84c7f3b65bf9096dc5dcd24 /python/samba/netcmd
parentd0f8e833653df652df01a472c4bbfd256f10f810 (diff)
downloadsamba-626209beab2fc9b0fdb7e90338cdfec5cfa48dd7.tar.gz
samba-tool group move: use binary encoded group name
Allows to move groups with names like e.g. 'group1 (xy)'. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14296 Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'python/samba/netcmd')
-rw-r--r--python/samba/netcmd/group.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/samba/netcmd/group.py b/python/samba/netcmd/group.py
index c56eb2d3354..f0af886a58e 100644
--- a/python/samba/netcmd/group.py
+++ b/python/samba/netcmd/group.py
@@ -607,7 +607,7 @@ class cmd_group_move(Command):
domain_dn = ldb.Dn(samdb, samdb.domain_dn())
filter = ("(&(sAMAccountName=%s)(objectClass=group))" %
- groupname)
+ ldb.binary_encode(groupname))
try:
res = samdb.search(base=domain_dn,
expression=filter,