From: Jeremy Allison Date: Mon, 10 Sep 2012 16:30:49 +0000 (-0700) Subject: Fix bug #9147 - winbind can't fetch user or group info from AD via LDAP X-Git-Tag: samba-4.0.0rc1~92 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cfeac09fc0796ecf77593244e9e72c1521fd251c;p=thirdparty%2Fsamba.git Fix bug #9147 - winbind can't fetch user or group info from AD via LDAP Don't use "isprint" in ldb_binary_encode(). This is locale specific. Restrict to ASCII only, hex encode everything else. --- diff --git a/lib/ldb/common/ldb_parse.c b/lib/ldb/common/ldb_parse.c index cfa29591940..f47ef433761 100644 --- a/lib/ldb/common/ldb_parse.c +++ b/lib/ldb/common/ldb_parse.c @@ -124,7 +124,8 @@ char *ldb_binary_encode(TALLOC_CTX *mem_ctx, struct ldb_val val) unsigned char *buf = val.data; for (i=0;i 0x7E || strchr(" *()\\&|!\"", buf[i])) { len += 2; } } @@ -133,7 +134,8 @@ char *ldb_binary_encode(TALLOC_CTX *mem_ctx, struct ldb_val val) len = 0; for (i=0;i 0x7E || strchr(" *()\\&|!\"", buf[i])) { snprintf(ret+len, 4, "\\%02X", buf[i]); len += 3; } else {