summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules/entryUUID.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-09-14 03:15:30 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:18:38 -0500
commit1e4f5a096cb75f0db0219fc55a6f654c485b0427 (patch)
tree2a1724130e34798309ba6a2b840fa15dc2a01e82 /source4/dsdb/samdb/ldb_modules/entryUUID.c
parent48615ca0da4a4521fdf632ec3cbc45286919f996 (diff)
downloadsamba-1e4f5a096cb75f0db0219fc55a6f654c485b0427.tar.gz
samba-1e4f5a096cb75f0db0219fc55a6f654c485b0427.tar.bz2
samba-1e4f5a096cb75f0db0219fc55a6f654c485b0427.zip
r18495: More work on the LDAP backend (which now passes a lot of our tests!)
This adds a list of attributes that are in our wildcard seaches, but the remote server requires to be explicitly listed. This also cleans up the handling of wildcards in ldb_map to be more consistant. Also fix the partitions module to rebase the search, if on the GC port, we do a subtree search. (Otherwise backends can rightly complain that the search is not in their scope). Andrew Bartlett (This used to be commit bc58792b7102f086b19353635d5d5ef9d40a0aae)
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules/entryUUID.c')
-rw-r--r--source4/dsdb/samdb/ldb_modules/entryUUID.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/entryUUID.c b/source4/dsdb/samdb/ldb_modules/entryUUID.c
index 109e9be2f9..f7701b7652 100644
--- a/source4/dsdb/samdb/ldb_modules/entryUUID.c
+++ b/source4/dsdb/samdb/ldb_modules/entryUUID.c
@@ -303,6 +303,15 @@ const struct ldb_map_attribute entryUUID_attributes[] =
}
};
+/* These things do not show up in wildcard searches in OpenLDAP, but
+ * we need them to show up in the AD-like view */
+const char * const wildcard_attributes[] = {
+ "objectGUID",
+ "whenCreated",
+ "whenChanged",
+ NULL
+};
+
static struct ldb_dn *find_schema_dn(struct ldb_context *ldb, TALLOC_CTX *mem_ctx)
{
const char *rootdse_attrs[] = {"schemaNamingContext", NULL};
@@ -372,7 +381,7 @@ static int entryUUID_init(struct ldb_module *module)
struct entryUUID_private *entryUUID_private;
struct ldb_dn *schema_dn;
- ret = ldb_map_init(module, entryUUID_attributes, NULL, NULL);
+ ret = ldb_map_init(module, entryUUID_attributes, NULL, wildcard_attributes, NULL);
if (ret != LDB_SUCCESS)
return ret;
@@ -387,7 +396,8 @@ static int entryUUID_init(struct ldb_module *module)
return LDB_SUCCESS;
}
- ret = fetch_objectclass_schema(module->ldb, schema_dn, entryUUID_private, &entryUUID_private->objectclass_res);
+ ret = fetch_objectclass_schema(module->ldb, schema_dn, entryUUID_private,
+ &entryUUID_private->objectclass_res);
if (ret != LDB_SUCCESS) {
ldb_asprintf_errstring(module->ldb, "Failed to fetch objectClass schema elements: %s\n", ldb_errstring(module->ldb));
return ret;