diff options
author | Andrew Bartlett <abartlet@samba.org> | 2013-06-10 12:22:40 +1000 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2013-06-12 10:02:07 +0200 |
commit | e461ff530046199b7e647b81d6dfb2746f68b0d7 (patch) | |
tree | a87611621936d636f9b4dc7768f680464f8943f3 /source4/dsdb/common | |
parent | eec29db7c237c70732f94e33147c960fa8df39fb (diff) | |
download | samba-e461ff530046199b7e647b81d6dfb2746f68b0d7.tar.gz samba-e461ff530046199b7e647b81d6dfb2746f68b0d7.tar.bz2 samba-e461ff530046199b7e647b81d6dfb2746f68b0d7.zip |
dsdb: Allow dsdb_find_dn_by_guid to show deleted DNs
This helps us in the KCC as we need to return the deleted DN for the GUID
in DsReplicaGetInfo calls (tested for deleted servers against Windows 2008R2).
Andrew Bartlett
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source4/dsdb/common')
-rw-r--r-- | source4/dsdb/common/util.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c index 8e407768ff..7a243c3d37 100644 --- a/source4/dsdb/common/util.c +++ b/source4/dsdb/common/util.c @@ -2458,7 +2458,9 @@ struct ldb_dn *samdb_domain_to_dn(struct ldb_context *ldb, TALLOC_CTX *mem_ctx, */ int dsdb_find_dn_by_guid(struct ldb_context *ldb, TALLOC_CTX *mem_ctx, - const struct GUID *guid, struct ldb_dn **dn) + const struct GUID *guid, + uint32_t dsdb_flags, + struct ldb_dn **dn) { int ret; struct ldb_result *res; @@ -2472,7 +2474,7 @@ int dsdb_find_dn_by_guid(struct ldb_context *ldb, ret = dsdb_search(ldb, mem_ctx, &res, NULL, LDB_SCOPE_SUBTREE, attrs, DSDB_SEARCH_SEARCH_ALL_PARTITIONS | DSDB_SEARCH_SHOW_EXTENDED_DN | - DSDB_SEARCH_ONE_ONLY, + DSDB_SEARCH_ONE_ONLY | dsdb_flags, "objectGUID=%s", guid_str); talloc_free(guid_str); if (ret != LDB_SUCCESS) { |