From owner-svn-ports-head@freebsd.org Mon Sep 30 20:38:31 2019 Return-Path: Delivered-To: svn-ports-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E6846131914; Mon, 30 Sep 2019 20:38:31 +0000 (UTC) (envelope-from rodrigo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46hvPM5mMPz4PMh; Mon, 30 Sep 2019 20:38:31 +0000 (UTC) (envelope-from rodrigo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A9BFD83D4; Mon, 30 Sep 2019 20:38:31 +0000 (UTC) (envelope-from rodrigo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8UKcVH7083021; Mon, 30 Sep 2019 20:38:31 GMT (envelope-from rodrigo@FreeBSD.org) Received: (from rodrigo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8UKcUdc083015; Mon, 30 Sep 2019 20:38:30 GMT (envelope-from rodrigo@FreeBSD.org) Message-Id: <201909302038.x8UKcUdc083015@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rodrigo set sender to rodrigo@FreeBSD.org using -f From: Rodrigo Osorio Date: Mon, 30 Sep 2019 20:38:30 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r513412 - in head/security: . pam_script pam_script/files X-SVN-Group: ports-head X-SVN-Commit-Author: rodrigo X-SVN-Commit-Paths: in head/security: . pam_script pam_script/files X-SVN-Commit-Revision: 513412 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Sep 2019 20:38:32 -0000 Author: rodrigo Date: Mon Sep 30 20:38:30 2019 New Revision: 513412 URL: https://svnweb.freebsd.org/changeset/ports/513412 Log: New port security/pam_script PAM script module allows to hook user space scripts on PAM events PR: 240669 Submitted by: Natalino Picone Added: head/security/pam_script/ head/security/pam_script/Makefile (contents, props changed) head/security/pam_script/distinfo (contents, props changed) head/security/pam_script/files/ head/security/pam_script/files/patch-etc_pam__script (contents, props changed) head/security/pam_script/pkg-descr (contents, props changed) head/security/pam_script/pkg-plist (contents, props changed) Modified: head/security/Makefile Modified: head/security/Makefile ============================================================================== --- head/security/Makefile Mon Sep 30 20:38:19 2019 (r513411) +++ head/security/Makefile Mon Sep 30 20:38:30 2019 (r513412) @@ -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 Added: head/security/pam_script/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/pam_script/Makefile Mon Sep 30 20:38:30 2019 (r513412) @@ -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 Added: head/security/pam_script/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/pam_script/distinfo Mon Sep 30 20:38:30 2019 (r513412) @@ -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 Added: head/security/pam_script/files/patch-etc_pam__script ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/pam_script/files/patch-etc_pam__script Mon Sep 30 20:38:30 2019 (r513412) @@ -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 Added: head/security/pam_script/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/pam_script/pkg-descr Mon Sep 30 20:38:30 2019 (r513412) @@ -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 Added: head/security/pam_script/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/pam_script/pkg-plist Mon Sep 30 20:38:30 2019 (r513412) @@ -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