commit 625c7478fcdaf83afbb46ba55f942892dfe8cde9 Author: CapCreeperGR Date: Sat Jul 6 20:37:36 2024 +0000 Initial Commit diff --git a/pkg.info b/pkg.info new file mode 100644 index 0000000..e693e68 --- /dev/null +++ b/pkg.info @@ -0,0 +1,7 @@ +name: pam +description: Pluggable Authentication Modules for Linux +version: 1.6.0 +url: https://github.com/linux-pam/linux-pam +license: GPL2-or-later +architecture: any +type: source diff --git a/source-files/other b/source-files/other new file mode 100644 index 0000000..043f23e --- /dev/null +++ b/source-files/other @@ -0,0 +1,8 @@ +auth required pam_warn.so +auth required pam_deny.so +account required pam_warn.so +account required pam_deny.so +password required pam_warn.so +password required pam_deny.so +session required pam_warn.so +session required pam_deny.so diff --git a/source-files/system-account b/source-files/system-account new file mode 100644 index 0000000..4679f11 --- /dev/null +++ b/source-files/system-account @@ -0,0 +1 @@ +account required pam_unix.so diff --git a/source-files/system-auth b/source-files/system-auth new file mode 100644 index 0000000..66ff92c --- /dev/null +++ b/source-files/system-auth @@ -0,0 +1 @@ +auth required pam_unix.so diff --git a/source-files/system-password b/source-files/system-password new file mode 100644 index 0000000..7afaa1a --- /dev/null +++ b/source-files/system-password @@ -0,0 +1,14 @@ +# check new passwords for strength (man pam_pwquality) +password required pam_pwquality.so authtok_type=UNIX retry=1 difok=1 \ + minlen=8 dcredit=0 ucredit=0 \ + lcredit=0 ocredit=0 minclass=1 \ + maxrepeat=0 maxsequence=0 \ + maxclassrepeat=0 gecoscheck=0 \ + dictcheck=1 usercheck=1 \ + enforcing=1 badwords="" \ + dictpath=/usr/lib/cracklib/pw_dict + +# use yescrypt hash for encryption, use shadow, and try to use any +# previously defined authentication token (chosen password) set by any +# prior module. +password required pam_unix.so yescrypt shadow try_first_pass diff --git a/source-files/system-session b/source-files/system-session new file mode 100644 index 0000000..d97f730 --- /dev/null +++ b/source-files/system-session @@ -0,0 +1,2 @@ +session required pam_loginuid.so +session optional pam_systemd.so diff --git a/source-files/system-user b/source-files/system-user new file mode 100644 index 0000000..7655c04 --- /dev/null +++ b/source-files/system-user @@ -0,0 +1,11 @@ +account required pam_access.so +account include system-account + +session required pam_env.so +session required pam_limits.so +session required pam_loginuid.so +session optional pam_keyinit.so force revoke +session optional pam_systemd.so + +auth required pam_deny.so +password required pam_deny.so diff --git a/source.sh b/source.sh new file mode 100644 index 0000000..6e8ec04 --- /dev/null +++ b/source.sh @@ -0,0 +1,39 @@ +# This is the source.sh script. It is executed by BPM in a temporary directory when compiling a source package +# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE +# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT + +DOWNLOAD="https://github.com/linux-pam/linux-pam/releases/download/v${BPM_PKG_VERSION}/Linux-PAM-${BPM_PKG_VERSION}.tar.xz" +FILENAME="${DOWNLOAD##*/}" + +# The prepare function is executed in the root of the temp directory +# This function is used for downloading files and putting them into the correct location +prepare() { + wget "$DOWNLOAD" + tar -xvf "$FILENAME" --strip-components=1 -C "$BPM_SOURCE" +} + +# The build function is executed in the source directory +# This function is used to compile the source code +build() { + ./configure --prefix=/usr \ + --sbindir=/usr/sbin \ + --sysconfdir=/etc \ + --libdir=/usr/lib \ + --enable-securedir=/usr/lib/security \ + --docdir=/usr/share/doc/Linux-PAM + make +} + +# The package function is executed in the source directory +# This function is used to move the compiled files into the output directory +package() { + make DESTDIR="$BPM_OUTPUT" install + chmod -v 4755 "$BPM_OUTPUT"/usr/sbin/unix_chkpwd + mkdir -p "$BPM_OUTPUT"/etc/pam.d/ + cp ../system-account "$BPM_OUTPUT"/etc/pam.d/system-account + cp ../system-auth "$BPM_OUTPUT"/etc/pam.d/system-auth + cp ../system-session "$BPM_OUTPUT"/etc/pam.d/system-session + cp ../system-password "$BPM_OUTPUT"/etc/pam.d/system-password + cp ../system-user "$BPM_OUTPUT"/etc/pam.d/system-user + cp ../other "$BPM_OUTPUT"/etc/pam.d/other +}