Hi once again,
I've just had a closer look to the problem using gdb:
Program received signal SIGSEGV, Segmentation fault.
0x08055703 in auth_request_set_userdb_field (request=0x80a6008, name=0x0,
value=0x80a60d0 "[EMAIL PROTECTED]") at auth-request.c:1154
1154 if (strcmp(name, "uid") == 0) {
The problem occurs in auth_request_set_userdb_field which is called from
userdb-vpopmail.c on line 125 with parameter name = NULL.
Attached is a small patch that handles the NULL case for the name parameter
inside the auth_request_set_userdb_field function.
It works for me (no problems so far), but I think someone else should have
a look at it :=)
=> Patch is against dovecot 1.1 beta11.
Regards,
Moritz
Moritz Mertinkat schrieb:
> Hi everybody,
>
> I've problems running Dovecot 1.1beta11 using vpopmail userdb/passdb
> (Dovecot 1.08 however works just fine).
>
> It looks like as if the auth process gets killed somehow...
> Any ideas what might be wrong?
>
> Dec 12 20:02:32 vs247165 dovecot: Dovecot v1.1.beta11 starting up
> Dec 12 20:02:32 vs247165 dovecot: Generating Diffie-Hellman parameters
> for the first time. This may take a while..
> Dec 12 20:03:06 vs247165 dovecot: imap-login: Waiting for SSL parameter
> file ssl-parameters.dat
> Dec 12 20:03:46 vs247165 dovecot: ssl-build-param: SSL parameters
> regeneration completed
> Dec 12 20:03:47 vs247165 dovecot: imap-login: Disconnected: rip=a.a.a.a,
> lip=b.b.b.b, TLS handshaking
> Dec 12 20:04:03 vs247165 dovecot: child 32051 (auth) killed with signal 11
> Dec 12 20:04:03 vs247165 dovecot: imap-login: Internal login failure:
> user=<[EMAIL PROTECTED]>, method=PLAIN, rip=a.a.a.a, lip=b.b.b.b, TLS
> Dec 12 20:04:04 vs247165 dovecot: imap-login: Internal login failure:
> user=<[EMAIL PROTECTED]>, method=PLAIN, rip=a.a.a.a, lip=b.b.b.b, TLS
> Dec 12 20:04:04 vs247165 dovecot: child 1503 (auth) killed with signal 11
>
>
> # /usr/local/dovecot-1.1/sbin/dovecot -n
>
> protocols: imap
> login_dir: /usr/local/dovecot-1.1/var/run/dovecot/login
> login_executable: /usr/local/dovecot-1.1/libexec/dovecot/imap-login
> mail_location: maildir:/var/lib/vpopmail/domains/%d/%n/Maildir
> auth default:
> passdb:
> driver: vpopmail
> userdb:
> driver: vpopmail
>
>
> Regards,
> Moritz
--- auth-request.c.orig 2007-12-09 19:14:26.000000000 +0100
+++ auth-request.c 2007-12-13 11:23:06.000000000 +0100
@@ -1151,26 +1151,28 @@
uid_t uid;
gid_t gid;
- if (strcmp(name, "uid") == 0) {
- uid = userdb_parse_uid(request, value);
- if (uid == (uid_t)-1) {
- request->userdb_lookup_failed = TRUE;
+ if (name != NULL) {
+ if (strcmp(name, "uid") == 0) {
+ uid = userdb_parse_uid(request, value);
+ if (uid == (uid_t)-1) {
+ request->userdb_lookup_failed = TRUE;
+ return;
+ }
+ value = dec2str(uid);
+ } else if (strcmp(name, "gid") == 0) {
+ gid = userdb_parse_gid(request, value);
+ if (gid == (gid_t)-1) {
+ request->userdb_lookup_failed = TRUE;
+ return;
+ }
+ value = dec2str(gid);
+ } else if (strcmp(name, "user") == 0) {
+ auth_request_change_userdb_user(request, value);
return;
- }
- value = dec2str(uid);
- } else if (strcmp(name, "gid") == 0) {
- gid = userdb_parse_gid(request, value);
- if (gid == (gid_t)-1) {
- request->userdb_lookup_failed = TRUE;
+ } else if (strcmp(name, "uidgid_file") == 0) {
+ auth_request_set_uidgid_file(request, value);
return;
}
- value = dec2str(gid);
- } else if (strcmp(name, "user") == 0) {
- auth_request_change_userdb_user(request, value);
- return;
- } else if (strcmp(name, "uidgid_file") == 0) {
- auth_request_set_uidgid_file(request, value);
- return;
}
auth_stream_reply_add(request->userdb_reply, name, value);