On Sun, May 22, 2016 at 08:09:31PM +0200, Theo Buehler wrote:
> On Sun, May 22, 2016 at 04:52:42PM +0200, Peter N. M. Hansteen wrote:
> > Hi,
> >
> > After upgrading a mail server to the latest 6.0-beta snapshot and the
> > requisite
> > pkg_add -u, when users try to retrieve mail, authentication fails:
> >
> > spop3d[14311]: auth: no shadow password handling compiled in server
> >
> > I assume this would be a matter of a configure option?
> >
> > - Peter
> > --
> > Peter N. M. Hansteen, member of the first RFC 1149 implementation team
> > http://bsdly.blogspot.com/ http://www.bsdly.net/ http://www.nuug.no/
> > "Remember to set the evil bit on all malicious network traffic"
> > delilah spamd[29949]: 85.152.224.147: disconnected after 42673 seconds.
> >
>
> Can you please try this diff? I think that's the only getpwnam that
> needs to be replaced.
Peter reported back that this diff fixed his issue.
ok to commit?
>
> Index: Makefile
> ===================================================================
> RCS file: /var/cvs/ports/mail/solid-pop3d/Makefile,v
> retrieving revision 1.29
> diff -u -p -r1.29 Makefile
> --- Makefile 16 Feb 2015 22:57:09 -0000 1.29
> +++ Makefile 22 May 2016 18:07:34 -0000
> @@ -4,7 +4,7 @@ COMMENT= flexible POP3 server
>
> VERSION= 0.15
> DISTNAME= solid-pop3d-${VERSION}
> -REVISION = 6
> +REVISION = 7
> CATEGORIES= mail
> MASTER_SITES= ftp://dione.ids.pl/pub/solidpop3d/
>
> Index: patches/patch-src_authenticate_c
> ===================================================================
> RCS file: patches/patch-src_authenticate_c
> diff -N patches/patch-src_authenticate_c
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-src_authenticate_c 22 May 2016 16:18:04 -0000
> @@ -0,0 +1,14 @@
> +$OpenBSD$
> +--- src/authenticate.c.orig Sun May 22 18:15:44 2016
> ++++ src/authenticate.c Sun May 22 18:16:14 2016
> +@@ -168,8 +168,8 @@ int _sp_authenticate_user(char *ausername, char *apass
> + char *encrypted_passwd;
> + struct passwd *pwentry;
> +
> +- if ((pwentry = getpwnam(ausername)) == NULL) {
> +- pop_log(pop_priority, "auth: getpwnam() failed");
> ++ if ((pwentry = getpwnam_shadow(ausername)) == NULL) {
> ++ pop_log(pop_priority, "auth: getpwnam_shadow() failed");
> + return -1;
> + };
> + if (strcmp(pwentry->pw_passwd, "") == 0) {
>