From 46627792a69fd6d5a24f4ca69ad26c1f9e2213ff 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. --- source/winbindd/idmap_adex/likewise_cell.c | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/source/winbindd/idmap_adex/likewise_cell.c b/source/winbindd/idmap_adex/likewise_cell.c index 77eeee4..836e5df 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; } -- 1.5.4.3