Fix for getpwnam/getpwnam_shadow, ok ? Cheers Giovanni
Index: Makefile =================================================================== RCS file: /var/cvs/ports/mail/courier-authlib/Makefile,v retrieving revision 1.55 diff -u -p -r1.55 Makefile --- Makefile 23 Mar 2016 12:12:26 -0000 1.55 +++ Makefile 26 May 2016 17:34:42 -0000 @@ -12,7 +12,7 @@ PKGNAME-ldap= ${DISTNAME:S/lib-/lib-lda PKGNAME-mysql= ${DISTNAME:S/lib-/lib-mysql-/} PKGNAME-pgsql= ${DISTNAME:S/lib-/lib-pgsql-/} PKGNAME-userdb= ${DISTNAME:S/lib-/lib-userdb-/} -REVISION= 0 +REVISION= 1 SHARED_LIBS += courierauth 1.0 # .0.0 SHARED_LIBS += courierauthsasl 1.0 # .0.0 Index: patches/patch-Makefile_in =================================================================== RCS file: /var/cvs/ports/mail/courier-authlib/patches/patch-Makefile_in,v retrieving revision 1.5 diff -u -p -r1.5 patch-Makefile_in --- patches/patch-Makefile_in 28 Oct 2014 09:19:29 -0000 1.5 +++ patches/patch-Makefile_in 12 May 2016 15:30:48 -0000 @@ -1,7 +1,7 @@ $OpenBSD: patch-Makefile_in,v 1.5 2014/10/28 09:19:29 giovanni Exp $ ---- Makefile.in.orig Mon Nov 11 19:58:27 2013 -+++ Makefile.in Tue Oct 28 09:01:02 2014 -@@ -654,7 +654,7 @@ CLEANFILES = authldaprc.h authmysqlrc.h authsqliterc.h +--- Makefile.in.orig Sat Nov 14 22:45:09 2015 ++++ Makefile.in Thu May 12 17:25:53 2016 +@@ -667,7 +667,7 @@ CLEANFILES = authldaprc.h authmysqlrc.h authsqliterc.h DISTCLEANFILES = dbobj.config README_authlib.html commonlibdep = libcourierauthcommon.la @@ -10,7 +10,7 @@ $OpenBSD: patch-Makefile_in,v 1.5 2014/1 commonlibadd = libcourierauthcommon.la libcourierauthcommon_t = @CRYPTLIBS@ libcourierauthcommon_la_SOURCES = \ -@@ -671,7 +671,7 @@ libcourierauthcommon_la_SOURCES = \ +@@ -684,7 +684,7 @@ libcourierauthcommon_la_SOURCES = \ libcourierauthcommon_la_DEPENDENCIES = libcourierauth.la libcourierauthcommon_la_LIBADD = libcourierauth.la @@ -19,7 +19,7 @@ $OpenBSD: patch-Makefile_in,v 1.5 2014/1 libcourierauth_la_SOURCES = authdaemon.c authdaemonlib.c preauthdaemon.c \ authmoduser2.c authmoduser3.c debug.c \ courierauthdebug.h \ -@@ -680,7 +680,7 @@ libcourierauth_la_SOURCES = authdaemon.c authdaemonlib +@@ -693,7 +693,7 @@ libcourierauth_la_SOURCES = authdaemon.c authdaemonlib libcourierauth_la_LIBADD = libs/libhmac/libhmac.la libs/md5/libmd5.la libs/sha1/libsha1.la libs/numlib/libnumlib.la \ libs/random128/librandom128.la libs/rfc822/libencode.la @@ -28,7 +28,7 @@ $OpenBSD: patch-Makefile_in,v 1.5 2014/1 # The userdb module libauthuserdb_t = userdb/libuserdb.la @dblibrary@ @LIBGDBM@ @LIBDB@ -@@ -780,7 +780,7 @@ libcourierauthsasl_la_SOURCES = \ +@@ -794,7 +794,7 @@ libcourierauthsasl_la_SOURCES = \ authsaslfrombase64.c authsasltobase64.c libcourierauthsasl_la_LIBADD = libcourierauthcommon.la libcourierauth.la @@ -37,7 +37,7 @@ $OpenBSD: patch-Makefile_in,v 1.5 2014/1 libcourierauthsaslclient_la_SOURCES = courierauthsaslclient.h \ authsaslclient.c authsaslclient.h authsaslclientcram.c \ authsaslclientcrammd5.c authsaslclientcramsha1.c \ -@@ -789,7 +789,7 @@ libcourierauthsaslclient_la_SOURCES = courierauthsaslc +@@ -803,7 +803,7 @@ libcourierauthsaslclient_la_SOURCES = courierauthsaslc authsaslfrombase64.c authsasltobase64.c libcourierauthsaslclient_la_LIBADD = libcourierauth.la @@ -46,7 +46,7 @@ $OpenBSD: patch-Makefile_in,v 1.5 2014/1 include_HEADERS = courier_auth_config.h courierauth.h courierauthsasl.h \ courierauthsaslclient.h courierauthdebug.h courierauthstaticlist.h -@@ -822,7 +822,7 @@ authdaemondprog_LDADD = $(LIBLTDL) libcourierauthcommo +@@ -836,7 +836,7 @@ authdaemondprog_LDADD = $(LIBLTDL) libcourierauthcommo libs/libhmac/libhmac.la libs/md5/libmd5.la libs/sha1/libsha1.la \ libs/rfc822/libencode.la libs/numlib/libnumlib.la Index: patches/patch-configure =================================================================== RCS file: /var/cvs/ports/mail/courier-authlib/patches/patch-configure,v retrieving revision 1.5 diff -u -p -r1.5 patch-configure --- patches/patch-configure 11 Apr 2014 09:35:04 -0000 1.5 +++ patches/patch-configure 12 May 2016 15:30:45 -0000 @@ -1,7 +1,7 @@ $OpenBSD: patch-configure,v 1.5 2014/04/11 09:35:04 giovanni Exp $ ---- configure.orig Mon Nov 11 14:55:52 2013 -+++ configure Sun Jan 12 17:31:43 2014 -@@ -15172,7 +15172,7 @@ then +--- configure.orig Sat Nov 14 22:45:08 2015 ++++ configure Thu May 12 17:25:53 2016 +@@ -15791,7 +15791,7 @@ then $COURIERCONFIG >conftest.out || exit 1 sed -n '/^mail/p' <conftest.out >conftest2.out || exit 1 . ./conftest2.out @@ -10,7 +10,7 @@ $OpenBSD: patch-configure,v 1.5 2014/04/ cmailuser="$mailuser" cmailgroup="$mailgroup" -@@ -15184,7 +15184,7 @@ then +@@ -15803,7 +15803,7 @@ then $bindir/courierauthconfig --configfiles >conftest.out || exit 1 sed -n '/^mail/p' <conftest.out >conftest2.out || exit 1 . ./conftest2.out Index: patches/patch-libs_bdbobj_Makefile_in =================================================================== RCS file: /var/cvs/ports/mail/courier-authlib/patches/patch-libs_bdbobj_Makefile_in,v retrieving revision 1.1 diff -u -p -r1.1 patch-libs_bdbobj_Makefile_in --- patches/patch-libs_bdbobj_Makefile_in 11 Apr 2014 09:35:04 -0000 1.1 +++ patches/patch-libs_bdbobj_Makefile_in 12 May 2016 15:30:45 -0000 @@ -1,7 +1,7 @@ $OpenBSD: patch-libs_bdbobj_Makefile_in,v 1.1 2014/04/11 09:35:04 giovanni Exp $ ---- libs/bdbobj/Makefile.in.orig Fri Oct 4 15:16:04 2013 -+++ libs/bdbobj/Makefile.in Fri Oct 4 15:16:17 2013 -@@ -122,7 +122,7 @@ am__objects_2 = testbdb.$(OBJEXT) +--- libs/bdbobj/Makefile.in.orig Wed Nov 4 15:33:44 2015 ++++ libs/bdbobj/Makefile.in Thu May 12 17:25:53 2016 +@@ -126,7 +126,7 @@ am__objects_2 = testbdb.$(OBJEXT) testbdb_OBJECTS = $(am_testbdb_OBJECTS) testbdb_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ Index: patches/patch-preauthpam_c =================================================================== RCS file: patches/patch-preauthpam_c diff -N patches/patch-preauthpam_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-preauthpam_c 18 May 2016 13:00:42 -0000 @@ -0,0 +1,12 @@ +$OpenBSD$ +--- preauthpam.c.orig Thu May 12 17:28:18 2016 ++++ preauthpam.c Thu May 12 17:40:29 2016 +@@ -31,7 +31,7 @@ struct spwd *spw; + + memset(&auth, 0, sizeof(auth)); + +- if ((pw=getpwnam(userid)) == 0) ++ if ((pw=getpwnam_shadow(userid)) == 0) + { + if (errno == ENOMEM) return (1); + DPRINTF("authpam: username '%s' not found in password file", userid); Index: patches/patch-preauthpwd_c =================================================================== RCS file: patches/patch-preauthpwd_c diff -N patches/patch-preauthpwd_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-preauthpwd_c 18 May 2016 13:00:28 -0000 @@ -0,0 +1,12 @@ +$OpenBSD$ +--- preauthpwd.c.orig Thu May 12 17:28:26 2016 ++++ preauthpwd.c Thu May 12 17:40:12 2016 +@@ -28,7 +28,7 @@ struct passwd *pw; + + memset(&auth, 0, sizeof(auth)); + +- if ((pw=getpwnam(userid)) == 0) ++ if ((pw=getpwnam_shadow(userid)) == 0) + { + if (errno == ENOMEM) return (1); + return (-1); Index: patches/patch-preauthshadow_c =================================================================== RCS file: patches/patch-preauthshadow_c diff -N patches/patch-preauthshadow_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-preauthshadow_c 18 May 2016 13:00:53 -0000 @@ -0,0 +1,12 @@ +$OpenBSD$ +--- preauthshadow.c.orig Thu May 12 17:28:33 2016 ++++ preauthshadow.c Thu May 12 17:41:31 2016 +@@ -35,7 +35,7 @@ long today; + + memset(&auth, 0, sizeof(auth)); + +- if ((pw=getpwnam(userid)) == NULL) ++ if ((pw=getpwnam_shadow(userid)) == NULL) + { + if (errno == ENOMEM) return 1; + return -1;