s4-dsdb: fixed all partitions search in cracknames
authorAndrew Tridgell <tridge@samba.org>
Fri, 19 Aug 2011 07:28:49 +0000 (17:28 +1000)
committerAndrew Tridgell <tridge@samba.org>
Wed, 24 Aug 2011 21:39:37 +0000 (07:39 +1000)
when searching all partitions we must use the NULL basedn, or we will
miss partitions in multi-domain setups

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

source4/dsdb/samdb/cracknames.c

index 21a473da5cddd63416026d23a85a849fd2818ec3..a518b8938e09b11f4f5f5ff0bf5a135f67727b2c 100644 (file)
@@ -837,7 +837,7 @@ static WERROR DsCrackNameOneFilter(struct ldb_context *sam_ctx, TALLOC_CTX *mem_
                        search_dn = samdb_result_dn(sam_ctx, mem_ctx, domain_res->msgs[0], "ncName", NULL);
                } else {
                        dsdb_flags = DSDB_SEARCH_SEARCH_ALL_PARTITIONS;
-                       search_dn = ldb_get_root_basedn(sam_ctx);
+                       search_dn = NULL;
                }
                if (format_desired == DRSUAPI_DS_NAME_FORMAT_GUID){
                         dsdb_flags = dsdb_flags| DSDB_SEARCH_SHOW_DELETED;