From 1dde7f82892ae8eb1b0d7a89c18d654cdc0ea620 Mon Sep 17 00:00:00 2001 From: "Gerald (Jerry) Carter" Date: Mon, 6 Oct 2008 11:47:57 -0500 Subject: [PATCH] idmap_adex: Add more debugging to the basic search function. Log the dn of all located entries in order to verify search results. (cherry picked from commit 46627792a69fd6d5a24f4ca69ad26c1f9e2213ff) --- source/winbindd/idmap_adex/likewise_cell.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/source/winbindd/idmap_adex/likewise_cell.c b/source/winbindd/idmap_adex/likewise_cell.c index 77eeee406b0..836e5dffcf2 100644 --- a/source/winbindd/idmap_adex/likewise_cell.c +++ b/source/winbindd/idmap_adex/likewise_cell.c @@ -389,6 +389,24 @@ done: status = ads_do_search(c->conn, search_base, scope, expr, attrs, msg); if (ADS_ERR_OK(status)) { + if (DEBUGLEVEL >= 10) { + LDAPMessage *e = NULL; + + int n = ads_count_replies(c->conn, *msg); + + DEBUG(10,("cell_do_search: Located %d entries\n", n)); + + for (e=ads_first_entry(c->conn, *msg); + e!=NULL; + e = ads_next_entry(c->conn, e)) + { + char *dn = ads_get_dn(c->conn, e); + + DEBUGADD(10,(" dn: %s\n", dn ? dn : "")); + SAFE_FREE(dn); + } + } + return status; } -- 2.11.4.GIT