The Samba-Bugzilla – Attachment 7874 Details for
Bug 9147
winbind can't fetch user or group info from AD via LDAP
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am fix for 3.6.x
0001-Fix-bug-9147-winbind-can-t-fetch-user-or-group-info-.patch (text/plain), 2.20 KB, created by
Jeremy Allison
on 2012-09-10 22:17:55 UTC
(
hide
)
Description:
git-am fix for 3.6.x
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2012-09-10 22:17:55 UTC
Size:
2.20 KB
patch
obsolete
>From 77089242638d937ca4a9b431708a12bdbc36467e Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Mon, 10 Sep 2012 15:17:14 -0700 >Subject: [PATCH] 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. >--- > source3/lib/ldb_compat.c | 6 ++++-- > source4/lib/ldb/common/ldb_parse.c | 6 ++++-- > 2 files changed, 8 insertions(+), 4 deletions(-) > >diff --git a/source3/lib/ldb_compat.c b/source3/lib/ldb_compat.c >index 36a29e6..34e37e7 100644 >--- a/source3/lib/ldb_compat.c >+++ b/source3/lib/ldb_compat.c >@@ -99,7 +99,8 @@ char *ldb_binary_encode(void *mem_ctx, struct ldb_val val) > unsigned char *buf = val.data; > > for (i=0;i<val.length;i++) { >- if (!isprint(buf[i]) || strchr(" *()\\&|!\"", buf[i])) { >+ unsigned int cval = buf[i]; >+ if (cval < 0x20 || cval > 0x7E || strchr(" *()\\&|!\"", buf[i])) { > len += 2; > } > } >@@ -108,7 +109,8 @@ char *ldb_binary_encode(void *mem_ctx, struct ldb_val val) > > len = 0; > for (i=0;i<val.length;i++) { >- if (!isprint(buf[i]) || strchr(" *()\\&|!\"", buf[i])) { >+ unsigned int cval = buf[i]; >+ if (cval < 0x20 || cval > 0x7E || strchr(" *()\\&|!\"", buf[i])) { > snprintf(ret+len, 4, "\\%02X", buf[i]); > len += 3; > } else { >diff --git a/source4/lib/ldb/common/ldb_parse.c b/source4/lib/ldb/common/ldb_parse.c >index b4eabf8..2a48d99 100644 >--- a/source4/lib/ldb/common/ldb_parse.c >+++ b/source4/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<val.length;i++) { >- if (!isprint(buf[i]) || strchr(" *()\\&|!\"", buf[i])) { >+ unsigned int cval = buf[i]; >+ if (cval < 0x20 || cval > 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<val.length;i++) { >- if (!isprint(buf[i]) || strchr(" *()\\&|!\"", buf[i])) { >+ unsigned int cval = buf[i]; >+ if (cval < 0x20 || cval > 0x7E || strchr(" *()\\&|!\"", buf[i])) { > snprintf(ret+len, 4, "\\%02X", buf[i]); > len += 3; > } else { >-- >1.7.7.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 9147
:
7864
|
7865
|
7866
|
7874
|
7876
|
7879
|
7880
|
7881
|
7882
|
7883
|
7884
|
7885