mirror of
https://github.com/samba-team/samba.git
synced 2025-12-04 08:23:50 +03:00
r22497: Support renaming objectclasses and attributes for the LDAP backend.
OpenLDAP is fussy about operational attributes in user-supplied schema. Andrew Bartlett
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
65327a0e4d
commit
d7cd4b768a
@@ -351,6 +351,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,
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user