diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-06-30 01:57:57 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:18:58 -0500 |
commit | c645eba60b611b0dd1ee5a5c96c0ed1d188bf91d (patch) | |
tree | edaa507846c7177efa4f890d8862962f9c19c593 /source4/lib | |
parent | f792261654dd11a2f903227705fe0cd9c09c5ebc (diff) | |
download | samba-c645eba60b611b0dd1ee5a5c96c0ed1d188bf91d.tar.gz samba-c645eba60b611b0dd1ee5a5c96c0ed1d188bf91d.tar.bz2 samba-c645eba60b611b0dd1ee5a5c96c0ed1d188bf91d.zip |
r8005: escape '"' characters in ldap expressions. Makes scripting easier.
(This used to be commit 2de986455c9b616132f06a69c2f135019da2bb8b)
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/ldb/common/ldb_parse.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/lib/ldb/common/ldb_parse.c b/source4/lib/ldb/common/ldb_parse.c index 501b82f635..841a785de5 100644 --- a/source4/lib/ldb/common/ldb_parse.c +++ b/source4/lib/ldb/common/ldb_parse.c @@ -172,7 +172,7 @@ 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])) { + if (!isprint(buf[i]) || strchr(" *()\\&|!\"", buf[i])) { len += 2; } } @@ -181,7 +181,7 @@ 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])) { + if (!isprint(buf[i]) || strchr(" *()\\&|!\"", buf[i])) { snprintf(ret+len, 4, "\\%02X", buf[i]); len += 3; } else { |