]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
samba-tool group delete: use binary encoded group name
authorBjörn Baumbach <bb@sernet.de>
Wed, 26 Feb 2020 12:55:01 +0000 (13:55 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 28 Feb 2020 03:08:45 +0000 (03:08 +0000)
Allows to delete 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 f0af886a58e136b80d7d4a2e984bae0ceba301e8..c063657a5ae39ebd85f882d5601ec44b2c579a8a 100644 (file)
@@ -179,7 +179,7 @@ Example2 deletes group Group2 from the local server.  The command is run under r
                       credentials=creds, lp=lp)
 
         filter = ("(&(sAMAccountName=%s)(objectClass=group))" %
-                  groupname)
+                  ldb.binary_encode(groupname))
 
         try:
             res = samdb.search(base=samdb.domain_dn(),