pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/security/openpam openpam: add example configuration files



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a1faa32d8ded
branches:  trunk
changeset: 312149:a1faa32d8ded
user:      triaxx <triaxx%pkgsrc.org@localhost>
date:      Mon Aug 27 08:59:52 2018 +0000

description:
openpam: add example configuration files

sudo compiled with -pam and PREFER_PKGSRC=yes now works out of the box

diffstat:

 security/openpam/Makefile    |  16 +++++++++++++++-
 security/openpam/PLIST       |   4 +++-
 security/openpam/files/other |  16 ++++++++++++++++
 security/openpam/files/sudo  |  13 +++++++++++++
 4 files changed, 47 insertions(+), 2 deletions(-)

diffs (90 lines):

diff -r 91f5dcbaecae -r a1faa32d8ded security/openpam/Makefile
--- a/security/openpam/Makefile Mon Aug 27 08:03:48 2018 +0000
+++ b/security/openpam/Makefile Mon Aug 27 08:59:52 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.28 2018/08/22 09:46:19 wiz Exp $
+# $NetBSD: Makefile,v 1.29 2018/08/27 08:59:52 triaxx Exp $
 
 DISTNAME=      openpam-20170430
 PKGREVISION=   1
@@ -20,7 +20,12 @@
 
 CPPFLAGS+=             -DSYSCONFDIR=\"${PKG_SYSCONFDIR}\"
 
+EGDIR=                 ${PREFIX}/share/examples/${PKGBASE}
+CONF_FILES+=           ${EGDIR}/pam.d/other ${PKG_SYSCONFDIR}/pam.d/other
+CONF_FILES+=           ${EGDIR}/pam.d/sudo ${PKG_SYSCONFDIR}/pam.d/sudo
+
 OWN_DIRS=              ${PKG_SYSCONFDIR}/pam.d
+INSTALLATION_DIRS+=    ${EGDIR}/pam.d
 
 SUBST_CLASSES+=                man
 SUBST_MESSAGE.man=     Fixing hardcoded paths in manpages.
@@ -28,6 +33,15 @@
 SUBST_FILES.man=       doc/man/pam.conf.5
 SUBST_VARS.man=                PKG_SYSCONFDIR PREFIX
 
+post-extract:
+       ${MKDIR} -p ${WRKSRC}/doc/pam.d
+       ${CP} ${FILESDIR}/other ${WRKSRC}/doc/pam.d/other
+       ${CP} ${FILESDIR}/sudo ${WRKSRC}/doc/pam.d/sudo
+
+post-install:
+       ${INSTALL_DATA} ${WRKSRC}/doc/pam.d/other ${DESTDIR}${EGDIR}/pam.d/other
+       ${INSTALL_DATA} ${WRKSRC}/doc/pam.d/sudo ${DESTDIR}${EGDIR}/pam.d/sudo
+
 .include "../../mk/dlopen.buildlink3.mk"
 
 # Create a fake perl binary to avoid recreating the man pages.
diff -r 91f5dcbaecae -r a1faa32d8ded security/openpam/PLIST
--- a/security/openpam/PLIST    Mon Aug 27 08:03:48 2018 +0000
+++ b/security/openpam/PLIST    Mon Aug 27 08:59:52 2018 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.9 2018/05/15 07:57:32 triaxx Exp $
+@comment $NetBSD: PLIST,v 1.10 2018/08/27 08:59:52 triaxx Exp $
 include/security/openpam.h
 include/security/openpam_attr.h
 include/security/openpam_version.h
@@ -62,3 +62,5 @@
 man/man3/pam_vinfo.3
 man/man3/pam_vprompt.3
 man/man5/pam.conf.5
+share/examples/openpam/pam.d/other
+share/examples/openpam/pam.d/sudo
diff -r 91f5dcbaecae -r a1faa32d8ded security/openpam/files/other
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/openpam/files/other      Mon Aug 27 08:59:52 2018 +0000
@@ -0,0 +1,16 @@
+# $NetBSD: other,v 1.1 2018/08/27 08:59:52 triaxx Exp $
+#
+# PAM configuration for the "other" service
+#
+
+# auth
+auth           required        pam_unix.so             no_warn try_first_pass nullok
+
+# account
+account                required        pam_unix.so
+
+# session
+session                required        pam_permit.so
+
+# password
+password       required        pam_permit.so
diff -r 91f5dcbaecae -r a1faa32d8ded security/openpam/files/sudo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/openpam/files/sudo       Mon Aug 27 08:59:52 2018 +0000
@@ -0,0 +1,13 @@
+# $NetBSD: sudo,v 1.1 2018/08/27 08:59:52 triaxx Exp $
+#
+# PAM configuration for the "sudo" service
+#
+
+# auth
+auth           required        pam_unix.so             no_warn try_first_pass nullok
+
+# account
+account                required        pam_unix.so
+
+# session
+session                required        pam_permit.so



Home | Main Index | Thread Index | Old Index