NetBSD Problem Report #54907

From www@netbsd.org  Wed Jan 29 05:31:28 2020
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id B61117A13E
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 29 Jan 2020 05:31:28 +0000 (UTC)
Message-Id: <20200129053127.E96EA7A1C7@mollari.NetBSD.org>
Date: Wed, 29 Jan 2020 05:31:27 +0000 (UTC)
From: greg-org-netbsd@akua.com
Reply-To: greg-org-netbsd@akua.com
To: gnats-bugs@NetBSD.org
Subject: openpam pam_unix 2019 missing -lcrypt in link
X-Send-Pr-Version: www-1.0

>Number:         54907
>Category:       pkg
>Synopsis:       openpam pam_unix 2019 missing -lcrypt in link
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jan 29 05:35:00 +0000 2020
>Closed-Date:    Fri Apr 24 13:55:17 +0000 2020
>Last-Modified:  Fri Apr 24 13:55:17 +0000 2020
>Originator:     Greg K
>Release:        pkgsrc current, NetBSD9RC1
>Organization:
Akua
>Environment:
NetBSD tiger 9.0_RC1 NetBSD 9.0_RC1 (Akua Tiger 2019-10-11 tiger-90-a $Revision: 1.531.2.2 $) #12: Fri Jan 10 09:57:52 EST 2020  akua@tiger:/usr/src/OUT/netbsd-9/kernel/tiger-90-a amd64

>Description:
Updating openpam 2017 to 2019 from pkgsrc, sudo and other PAM linking binaries crash with missing PLT "crypt" reported in /var/log/messages from pam_unix.so attempted open

ldd /usr/pkg/lib/security/pam_unix.so shows missing lcrypt

>How-To-Repeat:
Install openpam 2019 and sudo - try sudo ls

>Fix:
Re-running libtool line after a "make clean all" that creates pam_unix and manually inserting -lcrypt into the libtool from /usr/obj/security/openpam/work/openpam/modules/pam_unix fixes the issue after install. (inserting CWRAPPERS_CONFIG_DIR=... at head of line)

>Release-Note:

>Audit-Trail:
From: =?UTF-8?Q?Fr=C3=A9d=C3=A9ric_Fauberteau?= <triaxx@NetBSD.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/54907: openpam pam_unix 2019 missing -lcrypt in link
Date: Wed, 29 Jan 2020 15:23:52 +0100

 The patch below seems to fix the package but I don't test sudo yet:
 $ ldd /usr/pkg/lib/security/pam_unix.so
 /usr/pkg/lib/security/pam_unix.so:
          -lpam.2 => /home/triaxx/pkg/lib/libpam.so.2
          -lcrypt.1 => /usr/lib/libcrypt.so.1
          -lc.12 => /usr/lib/libc.so.12

 Index: Makefile
 ===================================================================
 RCS file: /cvsroot/pkgsrc/security/openpam/Makefile,v
 retrieving revision 1.31
 diff -u -r1.31 Makefile
 --- Makefile    30 Dec 2019 19:44:33 -0000      1.31
 +++ Makefile    29 Jan 2020 14:00:08 -0000
 @@ -18,6 +18,7 @@
   CONFIGURE_ARGS+=       --with-modules-dir=${PREFIX}/lib/security

   CPPFLAGS+=             -DSYSCONFDIR=\"${PKG_SYSCONFDIR}\"
 +LDFLAGS+=              -lcrypt

   EGDIR=                 ${PREFIX}/share/examples/${PKGBASE}
   CONF_FILES+=           ${EGDIR}/pam.d/other 
 ${PKG_SYSCONFDIR}/pam.d/other

From: Joerg Sonnenberger <joerg@bec.de>
To: gnats-bugs@netbsd.org
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org,
	greg-org-netbsd@akua.com
Subject: Re: pkg/54907: openpam pam_unix 2019 missing -lcrypt in link
Date: Wed, 29 Jan 2020 15:35:47 +0100

 On Wed, Jan 29, 2020 at 02:25:01PM +0000, Frédéric Fauberteau wrote:
 > The following reply was made to PR pkg/54907; it has been noted by GNATS.
 > 
 > From: =?UTF-8?Q?Fr=C3=A9d=C3=A9ric_Fauberteau?= <triaxx@NetBSD.org>
 > To: gnats-bugs@netbsd.org
 > Cc: 
 > Subject: Re: pkg/54907: openpam pam_unix 2019 missing -lcrypt in link
 > Date: Wed, 29 Jan 2020 15:23:52 +0100
 > 
 >  The patch below seems to fix the package but I don't test sudo yet:
 >  $ ldd /usr/pkg/lib/security/pam_unix.so
 >  /usr/pkg/lib/security/pam_unix.so:
 >           -lpam.2 => /home/triaxx/pkg/lib/libpam.so.2
 >           -lcrypt.1 => /usr/lib/libcrypt.so.1
 >           -lc.12 => /usr/lib/libc.so.12

 That will link everything to libcrypt, not just pam_unix.

 Joerg

From: =?UTF-8?Q?Fr=C3=A9d=C3=A9ric_Fauberteau?= <triaxx@NetBSD.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/54907: openpam pam_unix 2019 missing -lcrypt in link
Date: Thu, 30 Jan 2020 09:34:54 +0100

 The patch below add -lcrypt only for the pam_unix module.

 Index: distinfo
 ===================================================================
 RCS file: /cvsroot/pkgsrc/security/openpam/distinfo,v
 retrieving revision 1.14
 diff -u -r1.14 distinfo
 --- distinfo    30 Dec 2019 19:44:33 -0000      1.14
 +++ distinfo    30 Jan 2020 08:32:38 -0000
 @@ -8,3 +8,4 @@
   SHA1 (patch-lib_libpam_openpam__configure.c) = 
 5f4271121d03eb6b9ea7e3e1b85f9b27c9f4eaae
   SHA1 (patch-lib_libpam_openpam__constants.c) = 
 14b11cda3dbbfafd5a45865a868295e801bd1733
   SHA1 (patch-lib_libpam_openpam__dynamic.c) = 
 0bed21f16b74dbdb312ce4f09c17055a0891bdd5
 +SHA1 (patch-modules_pam__unix_Makefile.in) = 
 a8648e5384050f4d8b48ba426e74fee1a5555acb
 cvs diff: Diffing files
 cvs diff: Diffing patches
 Index: patches/patch-modules_pam__unix_Makefile.in
 ===================================================================
 RCS file: patches/patch-modules_pam__unix_Makefile.in
 diff -N patches/patch-modules_pam__unix_Makefile.in
 --- /dev/null   1 Jan 1970 00:00:00 -0000
 +++ patches/patch-modules_pam__unix_Makefile.in 30 Jan 2020 08:32:38 
 -0000
 @@ -0,0 +1,15 @@
 +$NetBSD$
 +
 +Make pam_unix.so module linked to libcrypt (PR pkg/54907).
 +
 +--- modules/pam_unix/Makefile.in.orig  2019-02-24 20:21:23.000000000 
 +0000
 ++++ modules/pam_unix/Makefile.in
 +@@ -340,7 +340,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/include
 + module_LTLIBRARIES = pam_unix.la
 + pam_unix_la_SOURCES = pam_unix.c
 + pam_unix_la_LDFLAGS = -no-undefined -module -version-info $(LIB_MAJ) \
 +-      -export-symbols-regex '^pam_sm_'
 ++      -export-symbols-regex '^pam_sm_' -lcrypt
 +
 + @WITH_SYSTEM_LIBPAM_FALSE@pam_unix_la_LIBADD = 
 $(top_builddir)/lib/libpam/libpam.la $(CRYPT_LIBS)
 + @WITH_SYSTEM_LIBPAM_TRUE@pam_unix_la_LIBADD = $(SYSTEM_LIBPAM)

From: =?UTF-8?B?RnLDqWTDqXJpYyBGYXViZXJ0ZWF1?= <triaxx@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/54907 CVS commit: pkgsrc/security/openpam
Date: Thu, 30 Jan 2020 11:17:06 +0000

 Module Name:	pkgsrc
 Committed By:	triaxx
 Date:		Thu Jan 30 11:17:05 UTC 2020

 Modified Files:
 	pkgsrc/security/openpam: Makefile distinfo
 Added Files:
 	pkgsrc/security/openpam/patches: patch-modules_pam__unix_Makefile.in

 Log Message:
 openpam: fix PR pkg/54907

 pkgsrc changes:
 ---------------
   - Add -lcript to pam_unix.so
   - Bump revision


 To generate a diff of this commit:
 cvs rdiff -u -r1.31 -r1.32 pkgsrc/security/openpam/Makefile
 cvs rdiff -u -r1.14 -r1.15 pkgsrc/security/openpam/distinfo
 cvs rdiff -u -r0 -r1.1 \
     pkgsrc/security/openpam/patches/patch-modules_pam__unix_Makefile.in

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->feedback
State-Changed-By: triaxx@NetBSD.org
State-Changed-When: Thu, 30 Jan 2020 11:28:57 +0000
State-Changed-Why:
Patch applied. Could you test Greg?


State-Changed-From-To: feedback->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Fri, 24 Apr 2020 13:55:17 +0000
State-Changed-Why:
I can provide feedback: this builds for me on netbsd & I don't see bulk build failures for 9.0


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.