summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-08-20 23:30:54 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:16:18 -0500
commitacd66674b4b7106d01e3ce8dbe29137e9779c633 (patch)
tree7c780c4f4e15d2ecd7f8ae839a6af206186a280f /source4/dsdb/samdb
parent0148cfae31e982e893b6a2ca0fba014b6deb449b (diff)
downloadsamba-acd66674b4b7106d01e3ce8dbe29137e9779c633.tar.gz
samba-acd66674b4b7106d01e3ce8dbe29137e9779c633.tar.bz2
samba-acd66674b4b7106d01e3ce8dbe29137e9779c633.zip
r17639: Martin Kuhl noticed that we loaded an incorrect value for
distinguisedName on templated objects. In looking how to handle distinguishedName correctly on LDAP, I was very glad to find it supported entryDN, and this adds another mapping. Andrew Bartlett (This used to be commit 3b5c973988648a2b2a5e1885ee894607e4d9679b)
Diffstat (limited to 'source4/dsdb/samdb')
-rw-r--r--source4/dsdb/samdb/ldb_modules/entryUUID.c9
-rw-r--r--source4/dsdb/samdb/samdb.c2
2 files changed, 11 insertions, 0 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/entryUUID.c b/source4/dsdb/samdb/ldb_modules/entryUUID.c
index 5f7efc1681..acc8067fa7 100644
--- a/source4/dsdb/samdb/ldb_modules/entryUUID.c
+++ b/source4/dsdb/samdb/ldb_modules/entryUUID.c
@@ -142,6 +142,15 @@ const struct ldb_map_attribute entryUUID_attributes[] =
}
},
{
+ .local_name = "distinguishedName",
+ .type = MAP_RENAME,
+ .u = {
+ .rename = {
+ .remote_name = "entryDN"
+ }
+ }
+ },
+ {
.local_name = "*",
.type = MAP_KEEP,
},
diff --git a/source4/dsdb/samdb/samdb.c b/source4/dsdb/samdb/samdb.c
index 8351ad5baf..51f4c91569 100644
--- a/source4/dsdb/samdb/samdb.c
+++ b/source4/dsdb/samdb/samdb.c
@@ -705,6 +705,8 @@ int samdb_copy_template(struct ldb_context *ldb,
if (strcasecmp(el->name, "cn") == 0 ||
strcasecmp(el->name, "name") == 0 ||
strcasecmp(el->name, "sAMAccountName") == 0 ||
+ strcasecmp(el->name, "sAMAccountName") == 0 ||
+ strcasecmp(el->name, "distinguishedName") == 0 ||
strcasecmp(el->name, "objectGUID") == 0) {
continue;
}