From d406931b14184a7b597e8256bd04d3e853cc8eba Mon Sep 17 00:00:00 2001 From: leitner Date: Mon, 15 Jul 2002 17:48:17 +0000 Subject: [PATCH] say why authentication failed --- .cvsignore | 1 + tinyldap.c | 19 +++++++++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.cvsignore b/.cvsignore index 7ba2235..b928490 100644 --- a/.cvsignore +++ b/.cvsignore @@ -17,3 +17,4 @@ doit idx2ldif ldap-capture server +md5password diff --git a/tinyldap.c b/tinyldap.c index 11622ec..20bfe23 100644 --- a/tinyldap.c +++ b/tinyldap.c @@ -558,13 +558,15 @@ int handle(int in,int out) { if (name.l) { struct Filter f; struct string password; - f.type=EQUAL; f.attrofs=dn_ofs; + f.type=EQUAL; scan_ldapstring(buf+res+tmp,buf+res+len,&password); f.ava.desc.l=2; f.ava.desc.s="dn"; f.ava.value=name; f.next=0; + fixup(&f); if (!indexable(&f)) { + buffer_putsflush(buffer_2,"no index for dn, bind failed!\n"); authfailure: { char outbuf[1024]; @@ -582,8 +584,12 @@ authfailure: useindex(&f,result); done=0; for (i=0; i