]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
samba-tool group move: use binary encoded group name
authorBjörn Baumbach <bb@sernet.de>
Wed, 26 Feb 2020 12:40:50 +0000 (13:40 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 28 Feb 2020 03:08:45 +0000 (03:08 +0000)
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>
python/samba/netcmd/group.py

index c56eb2d335413356a6b53c4d3edd8ae7daf7c021..f0af886a58e136b80d7d4a2e984bae0ceba301e8 100644 (file)
@@ -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,