summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2007-04-24 05:57:56 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:51:33 -0500
commit17078a46b899c8af2f38479391094a0b2b1a3d5b (patch)
treec3662254c1b86503d9b7946d07351fd2a1835b97 /source4/dsdb
parentf1851e7abc3d019253f679deed31c6e948127037 (diff)
downloadsamba-17078a46b899c8af2f38479391094a0b2b1a3d5b.tar.gz
samba-17078a46b899c8af2f38479391094a0b2b1a3d5b.tar.bz2
samba-17078a46b899c8af2f38479391094a0b2b1a3d5b.zip
r22497: Support renaming objectclasses and attributes for the LDAP backend.
OpenLDAP is fussy about operational attributes in user-supplied schema. Andrew Bartlett (This used to be commit d7cd4b768a7f56ced8ed94b9a63d01865ba7d10a)
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/samdb/ldb_modules/entryUUID.c27
1 files changed, 24 insertions, 3 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/entryUUID.c b/source4/dsdb/samdb/ldb_modules/entryUUID.c
index 3196069fa8..314e44111a 100644
--- a/source4/dsdb/samdb/ldb_modules/entryUUID.c
+++ b/source4/dsdb/samdb/ldb_modules/entryUUID.c
@@ -352,6 +352,15 @@ const struct ldb_map_attribute entryUUID_attributes[] =
}
},
{
+ .local_name = "objectClasses",
+ .type = MAP_RENAME,
+ .u = {
+ .rename = {
+ .remote_name = "sambaObjectClasses"
+ }
+ }
+ },
+ {
.local_name = "sambaPassword",
.type = MAP_RENAME,
.u = {
@@ -446,9 +455,21 @@ const struct ldb_map_attribute entryUUID_attributes[] =
}
};
+/* This objectClass conflicts with builtin classes on OpenLDAP */
+const struct ldb_map_objectclass entryUUID_objectclasses[] =
+{
+ {
+ .local_name = "subSchema",
+ .remote_name = "samba4SubSchema"
+ },
+ {
+ .local_name = NULL
+ }
+};
+
/* 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[] = {
+const char * const entryUUID_wildcard_attributes[] = {
"objectGUID",
"whenCreated",
"whenChanged",
@@ -471,7 +492,7 @@ const struct ldb_map_attribute nsuniqueid_attributes[] =
},
},
},
- /* objectSid */
+ /* objectSid */
{
.local_name = "objectSid",
.type = MAP_CONVERT,
@@ -751,7 +772,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, wildcard_attributes, NULL);
+ ret = ldb_map_init(module, entryUUID_attributes, entryUUID_objectclasses, entryUUID_wildcard_attributes, NULL);
if (ret != LDB_SUCCESS)
return ret;