From: Frédéric Marchal Date: Tue, 25 Jan 2011 13:19:11 +0000 (+0000) Subject: LDAP search error clarification X-Git-Tag: v2.3.2~94 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=08712912e71330da7e19f7bb399390b65b2e601e;p=thirdparty%2Fsarg.git LDAP search error clarification If the LDAP search fails, in addition to the error message, the searched string and the base DN are reported. --- diff --git a/usertab.c b/usertab.c index f5afa75..08dfd4e 100644 --- a/usertab.c +++ b/usertab.c @@ -190,6 +190,7 @@ static void get_ldap_name(const char *userlogin,char *mappedname,int namelen) int rc= ldap_search_s(ldap_handle, LDAPBaseSearch, LDAP_SCOPE_SUBTREE, filtersearch, NULL, 0, &result); if ( rc != LDAP_SUCCESS ) { debuga(_("LDAP search failed: %s\n"), ldap_err2string(rc)); + debuga(_("looking for \"%s\" at or below \"%s\"\n"),filtersearch,LDAPBaseSearch); strncpy(mappedname,searchloginname,namelen-1); mappedname[namelen-1]='\0'; return;