summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authortriaxx <triaxx@pkgsrc.org>2018-08-27 08:59:52 +0000
committertriaxx <triaxx@pkgsrc.org>2018-08-27 08:59:52 +0000
commit42c3b5d5d76c156b2a37e0a7386f3f9d354ce5b7 (patch)
tree70d4c950c70381d33fb681723029429f49ea046b /security
parent37621bb9c3adf455b9fb5ef2833815b664cec017 (diff)
downloadpkgsrc-42c3b5d5d76c156b2a37e0a7386f3f9d354ce5b7.tar.gz
openpam: add example configuration files
sudo compiled with -pam and PREFER_PKGSRC=yes now works out of the box
Diffstat (limited to 'security')
-rw-r--r--security/openpam/Makefile16
-rw-r--r--security/openpam/PLIST4
-rw-r--r--security/openpam/files/other16
-rw-r--r--security/openpam/files/sudo13
4 files changed, 47 insertions, 2 deletions
diff --git a/security/openpam/Makefile b/security/openpam/Makefile
index b4693d57d1a..fa0db080832 100644
--- a/security/openpam/Makefile
+++ b/security/openpam/Makefile
@@ -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 @@ CONFIGURE_ARGS+= --with-modules-dir=${PREFIX}/lib/security
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_STAGE.man= post-build
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 --git a/security/openpam/PLIST b/security/openpam/PLIST
index 4e5a7592acd..f28bdc021c7 100644
--- a/security/openpam/PLIST
+++ b/security/openpam/PLIST
@@ -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_verror.3
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 --git a/security/openpam/files/other b/security/openpam/files/other
new file mode 100644
index 00000000000..ca57dc364e1
--- /dev/null
+++ b/security/openpam/files/other
@@ -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 --git a/security/openpam/files/sudo b/security/openpam/files/sudo
new file mode 100644
index 00000000000..e9b6e3b1d30
--- /dev/null
+++ b/security/openpam/files/sudo
@@ -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