Remove 'dn' from mapping, it isn't a valid attribute in AD, and causes
[samba.git] / source4 / dsdb / samdb / samdb.c
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));