summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-06-30 01:57:57 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:18:58 -0500
commitc645eba60b611b0dd1ee5a5c96c0ed1d188bf91d (patch)
treeedaa507846c7177efa4f890d8862962f9c19c593 /source4
parentf792261654dd11a2f903227705fe0cd9c09c5ebc (diff)
downloadsamba-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')
-rw-r--r--source4/lib/ldb/common/ldb_parse.c4
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 {