New port security/pam_script
PAM script module allows to hook user space scripts on PAM events PR: 240669 Submitted by: Natalino Picone <natalino.picone@nozominetworks.com>
This commit is contained in:
parent
2f36c63617
commit
6767a808bc
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=513412
@ -740,6 +740,7 @@
|
||||
SUBDIR += pam_pseudo
|
||||
SUBDIR += pam_pwdfile
|
||||
SUBDIR += pam_require
|
||||
SUBDIR += pam_script
|
||||
SUBDIR += pam_search_list
|
||||
SUBDIR += pam_ssh_agent_auth
|
||||
SUBDIR += pam_yubico
|
||||
|
40
security/pam_script/Makefile
Normal file
40
security/pam_script/Makefile
Normal file
@ -0,0 +1,40 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= pam_script
|
||||
PORTVERSION= 1.1.9
|
||||
CATEGORIES= security
|
||||
MASTER_SITES= GH
|
||||
|
||||
MAINTAINER= natalino.picone@nozominetworks.com
|
||||
COMMENT= PAM script module allows to hook user space scripts on PAM events
|
||||
|
||||
LICENSE= GPLv2+
|
||||
LICENSE_FILE= ${WRKSRC}/COPYING
|
||||
|
||||
USES= autoreconf libtool shebangfix
|
||||
USE_GITHUB= yes
|
||||
|
||||
SHEBANG_FILES= etc/tally
|
||||
|
||||
GH_ACCOUNT= jeroennijhof
|
||||
GH_PROJECT= pam_script
|
||||
GH_TAGNAME= 1.1.9
|
||||
|
||||
GNU_CONFIGURE= yes
|
||||
PATCHDIR= ${.CURDIR}/files
|
||||
|
||||
do-install:
|
||||
${MKDIR} ${STAGEDIR}${PREFIX}/etc/pam-script.d
|
||||
${INSTALL_LIB} ${WRKSRC}/.libs/pam_script.so ${STAGEDIR}${PREFIX}/lib/pam_script.so
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/etc/pam_script ${STAGEDIR}${PREFIX}/etc/pam_script
|
||||
.for i in etc/logscript etc/tally
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/${i} ${STAGEDIR}${PREFIX}/etc/pam-script.d
|
||||
.endfor
|
||||
|
||||
post-install:
|
||||
@${MKDIR} ${STAGEDIR}${DOCSDIR}
|
||||
.for i in AUTHORS COPYING ChangeLog README NEWS etc/README.pam_script etc/README.examples
|
||||
${INSTALL_DATA} ${WRKSRC}/${i} ${STAGEDIR}${DOCSDIR}
|
||||
.endfor
|
||||
|
||||
.include <bsd.port.mk>
|
3
security/pam_script/distinfo
Normal file
3
security/pam_script/distinfo
Normal file
@ -0,0 +1,3 @@
|
||||
TIMESTAMP = 1568808393
|
||||
SHA256 (jeroennijhof-pam_script-1.1.9_GH0.tar.gz) = 0aab103d318e3048ccc6f8285950f99284c814f996d2dcbcae8f10d3b8bd8cfe
|
||||
SIZE (jeroennijhof-pam_script-1.1.9_GH0.tar.gz) = 34890
|
27
security/pam_script/files/patch-etc_pam__script
Normal file
27
security/pam_script/files/patch-etc_pam__script
Normal file
@ -0,0 +1,27 @@
|
||||
--- etc/pam_script.orig 2017-08-10 17:20:16 UTC
|
||||
+++ etc/pam_script
|
||||
@@ -21,7 +21,7 @@ PAMSCRIPTDIR=${PAMSCRIPTDIR:-$basedir/pam-script.d}
|
||||
|
||||
goodperms () {
|
||||
local path="$1"
|
||||
- stat_output=`/usr/bin/stat -c "%A:%u:%g" "$path"`
|
||||
+ stat_output=`/usr/bin/stat -f "%SLp%SMp%SHp:%u:%g" "$path"`
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "$0: Could not stat path $path" 1>&2
|
||||
return 1
|
||||
@@ -106,13 +106,11 @@ rmlink () {
|
||||
# $4 xpamscript
|
||||
|
||||
if [ x$1 = xlink ]; then
|
||||
- (cd $PAMSCRIPTDIR;
|
||||
- [ -e $4_$2 ] || [ -e $3 ] && \
|
||||
+ ([ -e $4_$2 ] || [ -e $3 ] && \
|
||||
( [ $verbose = 1 ] && echo ln -s $3 $4_$2;
|
||||
ln -s $3 $4_$2))
|
||||
elif [ x$1 = xremove ]; then
|
||||
- (cd $PAMSCRIPTDIR;
|
||||
- [ -e $4_$2 ] && \
|
||||
+ ([ -e $4_$2 ] && \
|
||||
( [ $verbose = 1 ] && echo rm -f $4_$2;
|
||||
rm -f $4_$2))
|
||||
fi
|
7
security/pam_script/pkg-descr
Normal file
7
security/pam_script/pkg-descr
Normal file
@ -0,0 +1,7 @@
|
||||
PAM-script allows you to execute scripts during authorization,
|
||||
passwd changes, or session opening or closing.
|
||||
|
||||
So if you need extra work done after login you can use this pam
|
||||
module to execute a session script.
|
||||
|
||||
WWW: https://github.com/jeroennijhof/pam_script
|
12
security/pam_script/pkg-plist
Normal file
12
security/pam_script/pkg-plist
Normal file
@ -0,0 +1,12 @@
|
||||
@dir(root,wheel,0755) etc/pam-script.d
|
||||
@(root,wheel,0755) etc/pam_script
|
||||
@(root,wheel,0755) etc/pam-script.d/logscript
|
||||
@(root,wheel,0755) etc/pam-script.d/tally
|
||||
lib/pam_script.so
|
||||
%%DOCSDIR%%/AUTHORS
|
||||
%%DOCSDIR%%/COPYING
|
||||
%%DOCSDIR%%/ChangeLog
|
||||
%%DOCSDIR%%/NEWS
|
||||
%%DOCSDIR%%/README.pam_script
|
||||
%%DOCSDIR%%/README
|
||||
%%DOCSDIR%%/README.examples
|
Loading…
Reference in New Issue
Block a user