s4:torture/ldap/ldap_sort.c - There should be used the "base_dn" not the "root_dn...
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Mon, 12 Apr 2010 11:40:44 +0000 (13:40 +0200)
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Mon, 12 Apr 2010 16:49:00 +0000 (18:49 +0200)
The (forest) "root_dn" hasn't always to be the same as the (domain) "base_dn"!

source4/torture/ldap/ldap_sort.c

index 4c8145cc835df12557a990de5be829834b1d2eef..aab590fd3d0e47b109a5c3eb4623649da9ef6510 100644 (file)
@@ -30,9 +30,9 @@
 #include "torture/smbtorture.h"
 #include "torture/local/proto.h"
 #include <ctype.h>
+
 bool torture_ldap_sort(struct torture_context *torture)
 {
-
        struct ldb_context *ldb;
 
        bool ret = false;
@@ -74,7 +74,7 @@ bool torture_ldap_sort(struct torture_context *torture)
        control[0]->reverse = 0;
        control[1] = NULL;
 
-       dn = ldb_get_root_basedn(ldb);
+       dn = ldb_get_default_basedn(ldb);
        ldb_dn_add_child_fmt(dn, "cn=users");
        ret = ldb_build_search_req(&req, ldb, ctx,
                                   dn,