From 29bc1f5c605b53635eea805cdd3ca6b2873bc792 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 1 May 2004 14:04:33 +0000 Subject: r437: fixed handling of a corner case with multi-valued indexing (This used to be commit b38612185657512419c4b3dc806cf1183e0db0cb) --- source4/lib/ldb/ldb_tdb/ldb_search.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source4/lib/ldb/ldb_tdb/ldb_search.c') diff --git a/source4/lib/ldb/ldb_tdb/ldb_search.c b/source4/lib/ldb/ldb_tdb/ldb_search.c index 7059030212..1dce8f83a2 100644 --- a/source4/lib/ldb/ldb_tdb/ldb_search.c +++ b/source4/lib/ldb/ldb_tdb/ldb_search.c @@ -204,12 +204,18 @@ static struct ldb_message *ltdb_pull_attrs(struct ldb_context *ldb, /* see if a ldb_val is a wildcard + return 1 if yes, 0 if no */ int ltdb_has_wildcard(struct ldb_context *ldb, const char *attr_name, const struct ldb_val *val) { int flags; + /* all attribute types recognise the "*" wildcard */ + if (val->length == 1 && strncmp((char *)val->data, "*", 1) == 0) { + return 1; + } + if (strpbrk(val->data, "*?") == NULL) { return 0; } -- cgit