aboutsummaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorRodrigo Osorio <rodrigo@FreeBSD.org>2019-09-30 20:38:30 +0000
committerRodrigo Osorio <rodrigo@FreeBSD.org>2019-09-30 20:38:30 +0000
commit6767a808bc7f8d56f5dfe16302cba9fcf4875b5d (patch)
treedaebd62348b9a350cd4f4d918af255cd47947441 /security
parent2f36c636171a26d125b3bca588308df9fd135e81 (diff)
downloadports-6767a808bc7f8d56f5dfe16302cba9fcf4875b5d.tar.gz
ports-6767a808bc7f8d56f5dfe16302cba9fcf4875b5d.zip
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>
Notes
Notes: svn path=/head/; revision=513412
Diffstat (limited to 'security')
-rw-r--r--security/Makefile1
-rw-r--r--security/pam_script/Makefile40
-rw-r--r--security/pam_script/distinfo3
-rw-r--r--security/pam_script/files/patch-etc_pam__script27
-rw-r--r--security/pam_script/pkg-descr7
-rw-r--r--security/pam_script/pkg-plist12
6 files changed, 90 insertions, 0 deletions
diff --git a/security/Makefile b/security/Makefile
index 6e068703462e..cacbe4584841 100644
--- a/security/Makefile
+++ b/security/Makefile
@@ -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
diff --git a/security/pam_script/Makefile b/security/pam_script/Makefile
new file mode 100644
index 000000000000..adb96417c96b
--- /dev/null
+++ b/security/pam_script/Makefile
@@ -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>
diff --git a/security/pam_script/distinfo b/security/pam_script/distinfo
new file mode 100644
index 000000000000..3ae277fc80c0
--- /dev/null
+++ b/security/pam_script/distinfo
@@ -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
diff --git a/security/pam_script/files/patch-etc_pam__script b/security/pam_script/files/patch-etc_pam__script
new file mode 100644
index 000000000000..2dd9e9c8ad88
--- /dev/null
+++ b/security/pam_script/files/patch-etc_pam__script
@@ -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
diff --git a/security/pam_script/pkg-descr b/security/pam_script/pkg-descr
new file mode 100644
index 000000000000..c30a0ba19d55
--- /dev/null
+++ b/security/pam_script/pkg-descr
@@ -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
diff --git a/security/pam_script/pkg-plist b/security/pam_script/pkg-plist
new file mode 100644
index 000000000000..c4291c2adaf7
--- /dev/null
+++ b/security/pam_script/pkg-plist
@@ -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