bHi,
I noticed the dovecot bsdauth does not provide a type in the
auth_userokay() call.
With this diff, one could add this to login.conf:
defaut:\
...
:auth-dovecot=:\
...
mailaccount:\
:auth=:\
:auth-dovecot=passwd:
Sending it here for comments and possibly OK's, as I think some would
benefit from it while the rest would stay unaffected. Please prove me wrong.
Not sure about the REVISION change, and/or if this should go upstream
instead.
Thinking of it, maybe we should use auth_request->service, if available.
That would better fit the auth-$service mapping, and we could even
differ between pop3 and imap, if need be...
/Alexander
Index: Makefile
===================================================================
RCS file: /data/openbsd/cvs/ports/mail/dovecot/Makefile,v
retrieving revision 1.192
diff -u -p -r1.192 Makefile
--- Makefile 5 Aug 2012 09:15:51 -0000 1.192
+++ Makefile 16 Sep 2012 07:38:58 -0000
@@ -11,6 +11,8 @@ COMMENT-postgresql= PostgreSQL authentic
V_MAJOR= 2.1
V_DOVECOT= 2.1.9
+REVISION= 0
+
DISTNAME= dovecot-${V_DOVECOT}
PKGNAME= dovecot-${V_DOVECOT}
PKGNAME-server= dovecot-${V_DOVECOT}
Index: patches/patch-src_auth_passdb-bsdauth_c
===================================================================
RCS file: patches/patch-src_auth_passdb-bsdauth_c
diff -N patches/patch-src_auth_passdb-bsdauth_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_auth_passdb-bsdauth_c 16 Sep 2012 07:30:27 -0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- src/auth/passdb-bsdauth.c.orig Sun Sep 16 09:21:16 2012
++++ src/auth/passdb-bsdauth.c Sun Sep 16 09:21:39 2012
+@@ -35,7 +35,7 @@ bsdauth_verify_plain(struct auth_request *request, con
+ }
+
+ /* check if the password is valid */
+- result = auth_userokay(request->user, NULL, NULL,
++ result = auth_userokay(request->user, NULL, "dovecot",
+ t_strdup_noconst(password));
+
+ /* clear the passwords from memory */