diff options
author | Matthieu Patou <matthieu.patou@matws.net> | 2011-07-31 00:54:01 +0400 |
---|---|---|
committer | Matthieu Patou <mat@matws.net> | 2011-08-10 01:44:43 +0400 |
commit | 87e7802722e62b5df1d8f63d49f4a54eaf3f61cd (patch) | |
tree | e4d8b1720250b88227cd77b4cb9befeb8dc6a31c | |
parent | 1b97b2f8ffce2bd7c93155bab337dd90665f7013 (diff) | |
download | samba-87e7802722e62b5df1d8f63d49f4a54eaf3f61cd.tar.gz samba-87e7802722e62b5df1d8f63d49f4a54eaf3f61cd.tar.bz2 samba-87e7802722e62b5df1d8f63d49f4a54eaf3f61cd.zip |
s4-drsuapi: crackname search also for deleted objects
-rw-r--r-- | source4/dsdb/samdb/cracknames.c | 5 |
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", |