Subject: pkg/20846: allow PAM for sshd (under Linux)
To: None <gnats-bugs@gnats.netbsd.org>
From: None <reed@reedmedia.net>
List: netbsd-bugs
Date: 03/22/2003 09:38:30
>Number: 20846
>Category: pkg
>Synopsis: allow PAM for pkgsrc/security/openssh under Linux
>Confidential: yes
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sat Mar 22 09:39:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:
>Release: NetBSD 1.6
>Organization:
http://bsd.reedmedia.net/
>Environment:
System: NetBSD rainier.reedmedia.net 1.6 NetBSD 1.6 (JCR-20020927) #3: Sat Sep 28 13:40:20 PDT 2002 reed@rainier.reedmedia.net:/usr/src/sys/arch/i386/compile/JCR-20020927 i386
Architecture: i386
Machine: i386
>Description:
Please allow PAM for pkgsrc/security/openssh for at least under Linux.
Also, a PAM file should be installed (no patch for that here).
Also, the PAM file should be put into place?
>How-To-Repeat:
>Fix:
Uncomment the PAM parts and check if Linux (or not NetBSD).
An idea is below. But note that this diff also includes other fixes:
-- improved PAM message
-- fixes example directory
diff -b -u -r1.2 MESSAGE.pam
--- security/openssh/MESSAGE.pam 2002/09/24 12:30:34 1.2
+++ security/openssh/MESSAGE.pam 2003/03/22 17:33:01
@@ -5,5 +5,5 @@
${EGDIR}/sshd.pam
-to your PAM configuration file.
+to your PAM configuration file (or PAM configuration directory).
diff -b -u -r1.94 Makefile
--- security/openssh/Makefile 2003/01/28 22:04:06 1.94
+++ security/openssh/Makefile 2003/03/22 17:33:02
@@ -41,10 +41,8 @@
PKG_SYSCONFSUBDIR= ssh
MANDIR= man
-RCD_SCRIPTS_EGDIR= etc/rc.d
PLIST_SUBST+= MANDIR=${MANDIR}
-PLIST_SUBST+= RCD_SCRIPTS_EGDIR=${RCD_SCRIPTS_EGDIR}
USE_BUILDLINK2= yes
USE_PKGINSTALL= yes
@@ -59,13 +57,14 @@
# XXX: PAM authentication causes memory faults, and I haven't tracked down
# XXX: why yet. For the moment, disable PAM authentication.
-#
-#.if defined(USE_PAM)
-#.include "../../security/PAM/buildlink2.mk"
-#CONFIGURE_ARGS+= --with-pam
-#PLIST_SRC+= ${.CURDIR}/PLIST.pam
-#MESSAGE_SRC+= ${.CURDIR}/MESSAGE.pam
-#.endif
+.if defined(USE_PAM)
+.if ${OPSYS} == "Linux"
+.include "../../security/PAM/buildlink2.mk"
+CONFIGURE_ARGS+= --with-pam
+PLIST_SRC+= ${.CURDIR}/PLIST.pam
+MESSAGE_SRC+= ${.CURDIR}/MESSAGE.pam
+.endif
+.endif
.if (${OPSYS} == "Darwin") || (${OPSYS} == "SunOS")
. include "../../security/skey/buildlink2.mk"
@@ -137,6 +136,7 @@
${INSTALL_DATA} $${file}.out ${EGDIR}/$${file}; \
done
#.if defined(USE_PAM)
+#XXX need to install for correct OS ??
# ${INSTALL_DATA} ${WRKSRC}/contrib/sshd.pam.freebsd ${EGDIR}/sshd.pam
#.endif
Index: security/openssh/PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/security/openssh/PLIST,v
retrieving revision 1.7
diff -b -u -r1.7 PLIST
--- security/openssh/PLIST 2002/06/28 17:10:17 1.7
+++ security/openssh/PLIST 2003/03/22 17:33:02
@@ -7,7 +7,6 @@
bin/ssh-agent
bin/ssh-keygen
bin/ssh-keyscan
-${RCD_SCRIPTS_EGDIR}/sshd
libexec/sftp-server
libexec/ssh-keysign
${MANDIR}/man1/scp.1
>Release-Note:
>Audit-Trail:
>Unformatted: