From: Björn Baumbach Date: Wed, 26 Feb 2020 12:55:01 +0000 (+0100) Subject: samba-tool group delete: use binary encoded group name X-Git-Tag: ldb-2.2.0~1551 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=104582b73caf008600e15d76d57424263a0f28d4;p=thirdparty%2Fsamba.git samba-tool group delete: use binary encoded group name 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 Reviewed-by: Andrew Bartlett --- diff --git a/python/samba/netcmd/group.py b/python/samba/netcmd/group.py index f0af886a58e..c063657a5ae 100644 --- a/python/samba/netcmd/group.py +++ b/python/samba/netcmd/group.py @@ -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(),