summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/ldb_tdb/ldb_index.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-10-25 22:02:31 +1100
committerAndrew Tridgell <tridge@samba.org>2009-10-25 22:02:31 +1100
commit12c9af78179b71721e30b03ae9fc0edd7cda940b (patch)
treeb17ce216dbd3a58e2d263f843774964015d0bda5 /source4/lib/ldb/ldb_tdb/ldb_index.c
parent54bd30f70632b8fcbe164133d2479092b7262a29 (diff)
downloadsamba-12c9af78179b71721e30b03ae9fc0edd7cda940b.tar.gz
samba-12c9af78179b71721e30b03ae9fc0edd7cda940b.tar.bz2
samba-12c9af78179b71721e30b03ae9fc0edd7cda940b.zip
s4-ldb: allow for unescaped '=' in a index DN
The ldb_dn_explode code normally enforces all special characters, including a '=', must be escaped. Unfortunately this conflicts with the ltdb index DNs, which for binary attributes may be base64 encoded. This allows a unescaped '=' as a special case for index DNs.
Diffstat (limited to 'source4/lib/ldb/ldb_tdb/ldb_index.c')
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_index.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/source4/lib/ldb/ldb_tdb/ldb_index.c b/source4/lib/ldb/ldb_tdb/ldb_index.c
index 252154ffd9..5002de527b 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_index.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_index.c
@@ -401,10 +401,6 @@ static struct ldb_dn *ltdb_index_key(struct ldb_context *ldb,
if (ldb_should_b64_encode(ldb, &v)) {
char *vstr = ldb_base64_encode(ldb, (char *)v.data, v.length);
if (!vstr) return NULL;
- /* remove trailing '=' to make it a valid DN */
- if (vstr[strlen(vstr)-1] == '=') {
- vstr[strlen(vstr)-1] = 0;
- }
ret = ldb_dn_new_fmt(ldb, ldb, "%s:%s::%s", LTDB_INDEX, attr_folded, vstr);
talloc_free(vstr);
} else {