summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2009-10-23 20:09:07 -0500
committerAndrew Bartlett <abartlet@samba.org>2009-11-02 16:36:53 +1100
commit8097280b468b7bcf26a0e17fdcaaccfb34d06415 (patch)
treece7ceb937a32e4e18b3507caafd0b9f322ba7026 /source4/dsdb/samdb/ldb_modules
parent1fc19ee7d0021e963923911bb440463aa79184fc (diff)
downloadsamba-8097280b468b7bcf26a0e17fdcaaccfb34d06415.tar.gz
samba-8097280b468b7bcf26a0e17fdcaaccfb34d06415.tar.bz2
samba-8097280b468b7bcf26a0e17fdcaaccfb34d06415.zip
s4 - Mapped AD schema to existing FDS schema.
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules')
-rw-r--r--source4/dsdb/samdb/ldb_modules/simple_ldap_map.c161
1 files changed, 159 insertions, 2 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/simple_ldap_map.c b/source4/dsdb/samdb/ldb_modules/simple_ldap_map.c
index de88178e39..d923e55484 100644
--- a/source4/dsdb/samdb/ldb_modules/simple_ldap_map.c
+++ b/source4/dsdb/samdb/ldb_modules/simple_ldap_map.c
@@ -530,7 +530,7 @@ static const struct ldb_map_attribute nsuniqueid_attributes[] =
.type = LDB_MAP_CONVERT,
.u = {
.convert = {
- .remote_name = "groupType",
+ .remote_name = "sambaGroupType",
.convert_local = normalise_to_signed32,
.convert_remote = val_copy,
}
@@ -592,6 +592,123 @@ static const struct ldb_map_attribute nsuniqueid_attributes[] =
}
},
{
+ .local_name = "unixHomeDirectory",
+ .type = MAP_RENAME,
+ .u = {
+ .rename = {
+ .remote_name = "homeDirectory"
+ }
+ }
+ },
+ {
+ .local_name = "pwdLastSet",
+ .type = MAP_RENAME,
+ .u = {
+ .rename = {
+ .remote_name = "sambaPwdLastSet"
+ }
+ }
+ },
+ {
+ .local_name = "lastLogon",
+ .type = MAP_RENAME,
+ .u = {
+ .rename = {
+ .remote_name = "sambaLogonTime"
+ }
+ }
+ },
+ {
+ .local_name = "lastLogoff",
+ .type = MAP_RENAME,
+ .u = {
+ .rename = {
+ .remote_name = "sambaLogoffTime"
+ }
+ }
+ },
+ {
+ .local_name = "badPwdCount",
+ .type = MAP_RENAME,
+ .u = {
+ .rename = {
+ .remote_name = "sambaBadPasswordCount"
+ }
+ }
+ },
+ {
+ .local_name = "logonHours",
+ .type = MAP_RENAME,
+ .u = {
+ .rename = {
+ .remote_name = "sambaLogonHours"
+ }
+ }
+ },
+ {
+ .local_name = "homeDrive",
+ .type = MAP_RENAME,
+ .u = {
+ .rename = {
+ .remote_name = "sambaHomeDrive"
+ }
+ }
+ },
+ {
+ .local_name = "scriptPath",
+ .type = MAP_RENAME,
+ .u = {
+ .rename = {
+ .remote_name = "sambaLogonScript"
+ }
+ }
+ },
+ {
+ .local_name = "profilePath",
+ .type = MAP_RENAME,
+ .u = {
+ .rename = {
+ .remote_name = "sambaProfilePath"
+ }
+ }
+ },
+ {
+ .local_name = "userWorkstations",
+ .type = MAP_RENAME,
+ .u = {
+ .rename = {
+ .remote_name = "sambaUserWorkstations"
+ }
+ }
+ },
+ {
+ .local_name = "homeDirectory",
+ .type = MAP_RENAME,
+ .u = {
+ .rename = {
+ .remote_name = "sambaHomePath"
+ }
+ }
+ },
+ {
+ .local_name = "nextRid",
+ .type = MAP_RENAME,
+ .u = {
+ .rename = {
+ .remote_name = "sambaNextRid"
+ }
+ }
+ },
+ {
+ .local_name = "privilegeDisplayName",
+ .type = MAP_RENAME,
+ .u = {
+ .rename = {
+ .remote_name = "sambaPrivName"
+ }
+ }
+ },
+ {
.local_name = "*",
.type = LDB_MAP_KEEP,
},
@@ -600,6 +717,46 @@ static const struct ldb_map_attribute nsuniqueid_attributes[] =
}
};
+/* This objectClass conflicts with builtin classes on FDS */
+const struct ldb_map_objectclass nsuniqueid_objectclasses[] =
+{
+ {
+ .local_name = "domain",
+ .remote_name = "samba4Domain"
+ },
+ {
+ .local_name = "rFC822LocalPart",
+ .remote_name = "samba4RFC822LocalPart"
+ },
+ {
+ .local_name = "mailRecipient",
+ .remote_name = "samba4MailRecipient"
+ },
+ {
+ .local_name = "nisMap",
+ .remote_name = "samba4NisMap"
+ },
+ {
+ .local_name = "person",
+ .remote_name = "samba4Person"
+ },
+ {
+ .local_name = "organizationalPerson",
+ .remote_name = "samba4OrganizationalPerson"
+ },
+ {
+ .local_name = "residentialPerson",
+ .remote_name = "samba4ResidentialPerson"
+ },
+ {
+ .local_name = "inetOrgPerson",
+ .remote_name = "samba4InetOrgPerson"
+ },
+ {
+ .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 */
static const char * const nsuniqueid_wildcard_attributes[] = {
@@ -626,7 +783,7 @@ static int entryuuid_init(struct ldb_module *module)
static int nsuniqueid_init(struct ldb_module *module)
{
int ret;
- ret = ldb_map_init(module, nsuniqueid_attributes, NULL, nsuniqueid_wildcard_attributes, "extensibleObject", NULL);
+ ret = ldb_map_init(module, nsuniqueid_attributes, nsuniqueid_objectclasses, nsuniqueid_wildcard_attributes, "extensibleObject", NULL);
if (ret != LDB_SUCCESS)
return ret;