]> git.ipfire.org Git - thirdparty/sarg.git/commitdiff
LDAP search error clarification
authorFrédéric Marchal <fmarchal@users.sourceforge.net>
Tue, 25 Jan 2011 13:19:11 +0000 (13:19 +0000)
committerFrédéric Marchal <fmarchal@users.sourceforge.net>
Tue, 25 Jan 2011 13:19:11 +0000 (13:19 +0000)
If the LDAP search fails, in addition to the error message, the
searched string and the base DN are reported.

usertab.c

index f5afa75aaf69c915722cd51d965134fffffbb641..08dfd4e35498735ae94d648a03d085240dd04612 100644 (file)
--- 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;