summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/ldb_tdb/ldb_search.c
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2005-07-12 12:04:54 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:20:13 -0500
commitc9b0e86a436b5b169a4c33bd25eac379cb622b17 (patch)
tree7b3662e7b11aa57a7624e46b369858262dc1bfae /source4/lib/ldb/ldb_tdb/ldb_search.c
parentadb7fd18e5e58bc466bdd31d68423e5f958a1d5d (diff)
downloadsamba-c9b0e86a436b5b169a4c33bd25eac379cb622b17.tar.gz
samba-c9b0e86a436b5b169a4c33bd25eac379cb622b17.tar.bz2
samba-c9b0e86a436b5b169a4c33bd25eac379cb622b17.zip
r8373: New wildcard matching code.
This code applies correct ldap standard wildcard matching code removes WILDCARD matching from tdb @ATTRIBUTES, that's now handled independently adds some more tests for wildcard matching fixes dn comparison code in ldb_match (This used to be commit 4eb5863042011988d85092d7dde3d809aa15bd59)
Diffstat (limited to 'source4/lib/ldb/ldb_tdb/ldb_search.c')
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_search.c30
1 files changed, 1 insertions, 29 deletions
diff --git a/source4/lib/ldb/ldb_tdb/ldb_search.c b/source4/lib/ldb/ldb_tdb/ldb_search.c
index e48043da88..3ecb2d9b39 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_search.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_search.c
@@ -188,34 +188,6 @@ static struct ldb_message *ltdb_pull_attrs(struct ldb_module *module,
}
-
-/*
- see if a ldb_val is a wildcard
- return 1 if yes, 0 if no
-*/
-int ltdb_has_wildcard(struct ldb_module *module, const char *attr_name,
- const struct ldb_val *val)
-{
- const struct ldb_attrib_handler *h;
-
- /* 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;
- }
-
- h = ldb_attrib_handler(module->ldb, attr_name);
- if (h->flags & LDB_ATTR_FLAG_WILDCARD) {
- return 1;
- }
-
- return 0;
-}
-
-
/*
search the database for a single simple dn, returning all attributes
in a single message
@@ -416,7 +388,7 @@ static int search_func(struct tdb_context *tdb, TDB_DATA key, TDB_DATA data, voi
}
/* see if it matches the given expression */
- if (!ldb_match_message(sinfo->module->ldb, msg, sinfo->tree,
+ if (!ldb_match_msg(sinfo->module->ldb, msg, sinfo->tree,
sinfo->base, sinfo->scope)) {
talloc_free(msg);
return 0;