openpam: add example configuration files

sudo compiled with -pam and PREFER_PKGSRC=yes now works out of the box
This commit is contained in:
triaxx 2018-08-27 08:59:52 +00:00
parent ddc09505dd
commit 2532a43fae
4 changed files with 47 additions and 2 deletions

View file

@ -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.

View file

@ -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

View file

@ -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

View file

@ -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