summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/ldb_tdb/ldb_index.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2007-09-18 22:43:06 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:06:56 -0500
commitc64116e158080c7cd7304cdd3b80c8666f78c7c6 (patch)
tree085c09bd111eb1277e2d054b71042f7460fa44c5 /source4/lib/ldb/ldb_tdb/ldb_index.c
parent425cb6733cf25a79fae79744ddffe06ac1b11f6b (diff)
downloadsamba-c64116e158080c7cd7304cdd3b80c8666f78c7c6.tar.gz
samba-c64116e158080c7cd7304cdd3b80c8666f78c7c6.tar.bz2
samba-c64116e158080c7cd7304cdd3b80c8666f78c7c6.zip
r25218: After discussion with Simo, remove the subclass support from LDB.
Subclass support was designed to avoid needing to spell out the full list of objectClasses that an entry was in. However, Samba4 now enforces this restriction in the objectClass module, and the way subclass matching was handled was complex and counter-intuitive in my opinion (and did not match LDAP). Andrew Bartlett (This used to be commit f5ce04b904e14445a2a7e7f92e7e1f64b645c6f2)
Diffstat (limited to 'source4/lib/ldb/ldb_tdb/ldb_index.c')
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_index.c64
1 files changed, 0 insertions, 64 deletions
diff --git a/source4/lib/ldb/ldb_tdb/ldb_index.c b/source4/lib/ldb/ldb_tdb/ldb_index.c
index bcab3acafe..cf9380f8c0 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_index.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_index.c
@@ -258,67 +258,6 @@ static int ltdb_index_dn_simple(struct ldb_module *module,
static int list_union(struct ldb_context *, struct dn_list *, const struct dn_list *);
/*
- return a list of dn's that might match a simple indexed search on
- the special objectclass attribute
- */
-static int ltdb_index_dn_objectclass(struct ldb_module *module,
- const struct ldb_parse_tree *tree,
- const struct ldb_message *index_list,
- struct dn_list *list)
-{
- struct ldb_context *ldb = module->ldb;
- unsigned int i;
- int ret;
- const char *target = (const char *)tree->u.equality.value.data;
- const char **subclasses;
-
- list->count = 0;
- list->dn = NULL;
-
- ret = ltdb_index_dn_simple(module, tree, index_list, list);
-
- subclasses = ldb_subclass_list(module->ldb, target);
-
- if (subclasses == NULL) {
- return ret;
- }
-
- for (i=0;subclasses[i];i++) {
- struct ldb_parse_tree tree2;
- struct dn_list *list2;
- tree2.operation = LDB_OP_EQUALITY;
- tree2.u.equality.attr = LTDB_OBJECTCLASS;
- if (!tree2.u.equality.attr) {
- return LDB_ERR_OPERATIONS_ERROR;
- }
- tree2.u.equality.value.data =
- (uint8_t *)talloc_strdup(list, subclasses[i]);
- if (tree2.u.equality.value.data == NULL) {
- return LDB_ERR_OPERATIONS_ERROR;
- }
- tree2.u.equality.value.length = strlen(subclasses[i]);
- list2 = talloc(list, struct dn_list);
- if (list2 == NULL) {
- talloc_free(tree2.u.equality.value.data);
- return LDB_ERR_OPERATIONS_ERROR;
- }
- if (ltdb_index_dn_objectclass(module, &tree2,
- index_list, list2) == LDB_SUCCESS) {
- if (list->count == 0) {
- *list = *list2;
- ret = LDB_SUCCESS;
- } else {
- list_union(ldb, list, list2);
- talloc_free(list2);
- }
- }
- talloc_free(tree2.u.equality.value.data);
- }
-
- return ret;
-}
-
-/*
return a list of dn's that might match a leaf indexed search
*/
static int ltdb_index_dn_leaf(struct ldb_module *module,
@@ -326,9 +265,6 @@ static int ltdb_index_dn_leaf(struct ldb_module *module,
const struct ldb_message *index_list,
struct dn_list *list)
{
- if (ldb_attr_cmp(tree->u.equality.attr, LTDB_OBJECTCLASS) == 0) {
- return ltdb_index_dn_objectclass(module, tree, index_list, list);
- }
if (ldb_attr_dn(tree->u.equality.attr) == 0) {
list->dn = talloc_array(list, char *, 1);
if (list->dn == NULL) {