diff --git a/packages/l/linux-pam/Pkgfile b/packages/l/linux-pam/Pkgfile new file mode 100644 index 0000000..51626dd --- /dev/null +++ b/packages/l/linux-pam/Pkgfile @@ -0,0 +1,41 @@ +# Description: Pluggable Authentication Modules (PAM) for Linux +# URL: http://www.linux-pam.org/ +# Maintainer: Alexander Zhirov + +name=linux-pam +version=1.6.0 +release=1 +source=( + https://github.com/$name/$name/releases/download/v${version}/Linux-PAM-$version.tar.xz + common-account common-auth common-password common-session + other + pam_namespace.patch +) + +build() { + cd Linux-PAM-$version + + patch -d . -p0 < ../pam_namespace.patch + + CONFIG_SHELL=/bin/bash ./configure \ + --prefix=/usr \ + --libdir=/lib \ + --disable-nls \ + --disable-prelude \ + --enable-db=no + + make + make DESTDIR=$PKG install + + mv $PKG/lib/pkgconfig $PKG/usr/lib + + # unix_chkpwd needs to be setuid root + chmod u+s $PKG/sbin/unix_chkpwd + + mkdir -p $PKG/etc/pam.d + install -o root -g root -m 0644 \ + $SRC/{common-*,other} \ + $PKG/etc/pam.d/ + + rm -rf $PKG/usr/{lib/systemd,share/doc} +} diff --git a/packages/l/linux-pam/common-account b/packages/l/linux-pam/common-account new file mode 100644 index 0000000..5caac58 --- /dev/null +++ b/packages/l/linux-pam/common-account @@ -0,0 +1,5 @@ +# +# /etc/pam.d/common-account - common account module configuration +# + +account required pam_unix.so diff --git a/packages/l/linux-pam/common-auth b/packages/l/linux-pam/common-auth new file mode 100644 index 0000000..88f65f0 --- /dev/null +++ b/packages/l/linux-pam/common-auth @@ -0,0 +1,5 @@ +# +# /etc/pam.d/common-auth - common auth module configuration +# + +auth required pam_unix.so nullok diff --git a/packages/l/linux-pam/common-password b/packages/l/linux-pam/common-password new file mode 100644 index 0000000..edae4ef --- /dev/null +++ b/packages/l/linux-pam/common-password @@ -0,0 +1,5 @@ +# +# /etc/pam.d/common-password - common password module configuration +# + +password required pam_unix.so shadow sha512 diff --git a/packages/l/linux-pam/common-session b/packages/l/linux-pam/common-session new file mode 100644 index 0000000..5783f70 --- /dev/null +++ b/packages/l/linux-pam/common-session @@ -0,0 +1,7 @@ +# +# /etc/pam.d/common-session - common session module configuration +# + +session required pam_limits.so +session required pam_unix.so +session optional pam_dumb_runtime_dir.so diff --git a/packages/l/linux-pam/other b/packages/l/linux-pam/other new file mode 100644 index 0000000..f3a835c --- /dev/null +++ b/packages/l/linux-pam/other @@ -0,0 +1,13 @@ +# +# /etc/pam.d/other - default deny +# + +auth required pam_warn.so +auth required pam_deny.so + +account required pam_deny.so + +password required pam_warn.so +password required pam_deny.so + +session required pam_deny.so diff --git a/packages/l/linux-pam/pam_namespace.patch b/packages/l/linux-pam/pam_namespace.patch new file mode 100644 index 0000000..c8b8bf8 --- /dev/null +++ b/packages/l/linux-pam/pam_namespace.patch @@ -0,0 +1,11 @@ +--- modules/pam_namespace/pam_namespace.c 2024-01-17 10:29:36.000000000 +0000 ++++ modules/pam_namespace/pam_namespace.c 2024-03-14 15:12:58.441979848 +0000 +@@ -38,6 +38,7 @@ + #include "pam_inline.h" + #include "pam_namespace.h" + #include "argv_parse.h" ++#include + + /* --- evaluating all files in VENDORDIR/security/namespace.d and /etc/security/namespace.d --- */ + static const char *base_name(const char *path) +