summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/samdb/cracknames.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/dsdb/samdb/cracknames.c b/source4/dsdb/samdb/cracknames.c
index d9224828ca..21a473da5c 100644
--- a/source4/dsdb/samdb/cracknames.c
+++ b/source4/dsdb/samdb/cracknames.c
@@ -839,13 +839,16 @@ static WERROR DsCrackNameOneFilter(struct ldb_context *sam_ctx, TALLOC_CTX *mem_
dsdb_flags = DSDB_SEARCH_SEARCH_ALL_PARTITIONS;
search_dn = ldb_get_root_basedn(sam_ctx);
}
+ if (format_desired == DRSUAPI_DS_NAME_FORMAT_GUID){
+ dsdb_flags = dsdb_flags| DSDB_SEARCH_SHOW_DELETED;
+ }
/* search with the 'phantom root' flag */
ret = dsdb_search(sam_ctx, mem_ctx, &res,
search_dn,
LDB_SCOPE_SUBTREE,
result_attrs,
- DSDB_SEARCH_SEARCH_ALL_PARTITIONS,
+ dsdb_flags,
"%s", result_filter);
if (ret != LDB_SUCCESS) {
DEBUG(2, ("DsCrackNameOneFilter phantom root search failed: %s",