Hello,
Got some problems to auth IMAP over authdaemond:
* OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE
THREAD=ORDEREDSUBJECT THRE
AD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION STARTTLS] Courier-IMAP
ready. Copyr
ight 1998-2005 Double Precision, Inc. See COPYING for distribution
information.
x login [EMAIL PROTECTED] <password>
* BYE Temporary problem, please try again later
/var/log/maillog
[...]
Mar 17 18:06:15 te-clan imapd: LOGIN FAILED, [EMAIL PROTECTED],
ip=[80.218.247.11]
Mar 17 18:06:15 te-clan imapd: authentication error: Input/output error
Mar 17 18:06:15 te-clan authdaemond: stopping authdaemond children
Mar 17 18:06:15 te-clan authdaemond: restarting authdaemond children
Mar 17 18:06:15 te-clan authdaemond: modules="authvchkpw", daemons=5
Mar 17 18:06:15 te-clan authdaemond: Uninstalling authvchkpw
Mar 17 18:06:15 te-clan authdaemond: Installing libauthvchkpw
Mar 17 18:06:15 te-clan authdaemond: Installation complete: authvchkpw
[...]
/var/log/debug.log
[...]
Mar 17 18:06:05 te-clan imapd: Connection, ip=[80.218.247.11]
Mar 17 18:06:15 te-clan authdaemond: received auth request,
service=imap, authtype=login
Mar 17 18:06:15 te-clan authdaemond: authvchkpw: trying this module
[...]
/var/log/messages
[...]
Mar 17 18:06:15 te-clan kernel: pid 82151 (authdaemond), uid 0: exited
on signal 11 (core dumped)
[...]
OS: FreeBSD 6.2-RELEASE
Arch: AMD64
Packages:
courier-authlib-0.59.1
courier-authlib-base-0.59.1
courier-authlib-vchkpw-0.59.1
vpopmail-devel-5.5.0_2
Backtrace:
#0 0x00000008004016bc in ?? ()
#1 0x0000000800ce7642 in cdb_bread () from
/usr/local/lib/courier-authlib/libauthvchkpw.so.0 (= vpopmail.a)
#2 0x0000000800ce76ea in cdb_seek () from
/usr/local/lib/courier-authlib/libauthvchkpw.so.0 (= vpopmail.a)
#3 0x0000000800cdfad7 in vget_assign () from
/usr/local/lib/courier-authlib/libauthvchkpw.so.0 (= vpopmail.a)
#4 0x0000000800cdb95e in auth_vchkpw_pre () from
/usr/local/lib/courier-authlib/libauthvchkpw.so.0
#5 0x0000000800cdb6bf in auth_vchkpw () from
/usr/local/lib/courier-authlib/libauthvchkpw.so.0
#6 0x00000000004036a1 in _start ()
#7 0x00000000004039a6 in _start ()
#8 0x0000000000404006 in start ()
#9 0x0000000000404069 in main ()
Small testapp to verify vpopmail-library:
#include <stdio.h>
#include <unistd.h>
#include <vpopmail.h>
int main(int argc, char* argv[]) {
char domain[20];
int uid;
int gid;
strcpy(domain, "te-clan.ch");
if (vget_assign(domain, NULL, 0, &uid, &gid) == NULL) {
printf("domain does not exist");
} else {
printf("all is fine!\n");
}
strcpy(domain, "test-domain.xyz");
if (vget_assign(domain, NULL, 0, &uid, &gid) == NULL) {
printf("domain does not exist");
} else {
printf("all is fine!\n");
}
}
$ gcc -o test_assign test_assign.c -I/usr/local/vpopmail/include
-L/usr/local/vpopmail/lib -lvpopmail
$ ./test_assign
all is fine!
domain does not exist
When I commented-out a part of courier-authlib-vchkpw's code...
preauthvchkpw.c
[...]
/* Check to see if the domain exists.
* If so, on return vget_assign will :
* Rewrite Domain to be the real domain if it was sent as an
alias domain
* Retrieve the domain's uid and gid
*/
// if ( vget_assign(Domain,NULL,0,&uid, &gid) == NULL ) {
/* Domain does not exist
* So now exit with a permanent failure code */
// DPRINTF("vchkpw: domain does not exist");
// return (-1);
// }
/* Try and retrieve the user's passwd entry from the auth backend */
if ( (vpw=vauth_getpw(User, Domain)) == NULL) {
/* User does not exist
* So now exit with a permanent failure code
*/
DPRINTF("vchkpw: user does not exist");
return (-1);
}
[...]
... the backtrace is not much better:
#0 0x00000008004016bc in ?? ()
#1 0x0000000800ce75f2 in cdb_bread () from
/usr/local/lib/courier-authlib/libauthvchkpw.so.0
#2 0x0000000800ce769a in cdb_seek () from
/usr/local/lib/courier-authlib/libauthvchkpw.so.0
#3 0x0000000800cdfa87 in vget_assign () from
/usr/local/lib/courier-authlib/libauthvchkpw.so.0
#4 0x0000000800ce265e in vauth_getpw () from
/usr/local/lib/courier-authlib/libauthvchkpw.so.0
#5 0x0000000800cdb94d in auth_vchkpw_pre () from
/usr/local/lib/courier-authlib/libauthvchkpw.so.0
#6 0x0000000800cdb6bf in auth_vchkpw () from
/usr/local/lib/courier-authlib/libauthvchkpw.so.0
#7 0x00000000004036a1 in _start ()
#8 0x00000000004039a6 in _start ()
#9 0x0000000000404006 in start ()
#10 0x0000000000404069 in main ()
Any solution out there?
greets
Andreas