Remove 'dn' from mapping, it isn't a valid attribute in AD, and causes
authorAndrew Bartlett <abartlet@samba.org>
Fri, 11 Jan 2008 04:19:27 +0000 (15:19 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 11 Jan 2008 04:19:27 +0000 (15:19 +1100)
problems with ldap.js test with OpenLDAP as the backend.

Likewise, remove it from the template lookup (for consistancy).

TODO:  see if it can be removed from ldb

Andrew Bartlett
(This used to be commit 47a1b76f7fff30229d3f23c6723f047923faf196)

source4/dsdb/samdb/ldb_modules/simple_ldap_map.c
source4/dsdb/samdb/samdb.c

index 91001d43d7a078f9f45e5409782243ad7547e8a9..970106787be825342271366086823c5e4ae9e5d7 100644 (file)
@@ -375,15 +375,6 @@ static const struct ldb_map_attribute entryuuid_attributes[] =
                         }
                }
        },
                         }
                }
        },
-       {
-               .local_name = "dn",
-               .type = MAP_RENAME,
-               .u = {
-                       .rename = {
-                                .remote_name = "entryDN"
-                        }
-               }
-       },
        {
                .local_name = "groupType",
                .type = MAP_CONVERT,
        {
                .local_name = "groupType",
                .type = MAP_CONVERT,
@@ -533,15 +524,6 @@ static const struct ldb_map_attribute nsuniqueid_attributes[] =
                         }
                }
        },
                         }
                }
        },
-       {
-               .local_name = "dn",
-               .type = MAP_RENAME,
-               .u = {
-                       .rename = {
-                                .remote_name = "entryDN"
-                        }
-               }
-       },
        {
                .local_name = "groupType",
                .type = MAP_CONVERT,
        {
                .local_name = "groupType",
                .type = MAP_CONVERT,
index b042d1d3b7bcd0ccaffc717740adb43edc637f33..c11eea1757c99a0649c6f79251d6aba413eeb010 100644 (file)
@@ -134,7 +134,7 @@ int samdb_copy_template(struct ldb_context *ldb,
        }
        
        /* pull the template record */
        }
        
        /* pull the template record */
-       ret = ldb_search(templates_ldb, basedn, LDB_SCOPE_BASE, "(dn=*)", NULL, &res);  
+       ret = ldb_search(templates_ldb, basedn, LDB_SCOPE_BASE, "distinguishedName=*", NULL, &res);     
        talloc_free(basedn);
        if (ret != LDB_SUCCESS) {
                *errstring = talloc_steal(msg, ldb_errstring(templates_ldb));
        talloc_free(basedn);
        if (ret != LDB_SUCCESS) {
                *errstring = talloc_steal(msg, ldb_errstring(templates_ldb));