summaryrefslogtreecommitdiff
path: root/source4/lib/ldb
diff options
context:
space:
mode:
authorKamen Mazdrashki <kamenim@samba.org>2011-01-18 00:49:17 +0200
committerKamen Mazdrashki <kamenim@samba.org>2011-01-18 00:57:05 +0200
commitfb0df534f46ccee8d541d5512abbcc9cd8247e53 (patch)
tree249bf3716d825d89799c223506196d8ebccfd8cd /source4/lib/ldb
parent622ef6aed82a2f2f7748c2a88535486af77487de (diff)
downloadsamba-fb0df534f46ccee8d541d5512abbcc9cd8247e53.tar.gz
samba-fb0df534f46ccee8d541d5512abbcc9cd8247e53.tar.bz2
samba-fb0df534f46ccee8d541d5512abbcc9cd8247e53.zip
s4-ldb_ldif: Don't check for LDB_FLG_SHOW_BINARY in ldb_should_b64_encode
LDB_FLG_SHOW_BINARY is data representation flag and should not modify behavior of data checking functions. This lead to a bug in lib/ldb/ldb_tdb/ldb_index.c as ltdb_index_key() function relies on ldb_should_b64_encode function to determine how to process index keys. Found using following test search: bin/ldbsearch -H st/dc/private/sam.ldb -b "CN=Deleted Objects,DC=samba,DC=example,DC=com" \ "(objectGUID=97b52eac-6d89-434d-b935-1e5f2e086ffc)" replPropertyMetaData --show-deleted --show-binary
Diffstat (limited to 'source4/lib/ldb')
-rw-r--r--source4/lib/ldb/common/ldb_ldif.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/source4/lib/ldb/common/ldb_ldif.c b/source4/lib/ldb/common/ldb_ldif.c
index 2628d4d5da..9be49fb73b 100644
--- a/source4/lib/ldb/common/ldb_ldif.c
+++ b/source4/lib/ldb/common/ldb_ldif.c
@@ -190,10 +190,6 @@ int ldb_should_b64_encode(struct ldb_context *ldb, const struct ldb_val *val)
unsigned int i;
uint8_t *p = val->data;
- if (ldb->flags & LDB_FLG_SHOW_BINARY) {
- return 0;
- }
-
if (val->length == 0) {
return 0;
}