From b63c4a962bf3cde8f3bcae166945521a42ebb560 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Wed, 14 Feb 2024 09:35:05 +0100 Subject: [PATCH] Use PAM password-auth or system-auth if present This PR is actually based on one really old patch we have in Fedora, which enables possibility to use PAM modules password-auth or system-auth if they exist during compilation. Those PAM modules looks to be used for remote, respective local authentication, in Linux. Would it be possible to add their support into CUPS? --- conf/pam.password | 4 ++++ conf/pam.system | 3 +++ config-scripts/cups-pam.m4 | 4 ++++ 3 files changed, 11 insertions(+) create mode 100644 conf/pam.password create mode 100644 conf/pam.system diff --git a/conf/pam.password b/conf/pam.password new file mode 100644 index 0000000000..6146a9134d --- /dev/null +++ b/conf/pam.password @@ -0,0 +1,4 @@ +#%PAM-1.0 +# Use password-auth common PAM configuration for the daemon +auth include password-auth +account include password-auth diff --git a/conf/pam.system b/conf/pam.system new file mode 100644 index 0000000000..9e7c820f45 --- /dev/null +++ b/conf/pam.system @@ -0,0 +1,3 @@ +#%PAM-1.0 +auth include system-auth +account include system-auth diff --git a/config-scripts/cups-pam.m4 b/config-scripts/cups-pam.m4 index cf983b0311..f4d6ecbd95 100644 --- a/config-scripts/cups-pam.m4 +++ b/config-scripts/cups-pam.m4 @@ -71,6 +71,10 @@ AS_IF([test x$enable_pam != xno], [ PAMMOD="pam_${with_pam_module}.so" ], [test -f /etc/pam.d/common-auth], [ PAMFILE="pam.common" + ], [test -f /etc/pam.d/password-auth], [ + PAMFILE="pam.password" + ], [test -f /etc/pam.d/system-auth], [ + PAMFILE="pam.system" ], [ moddir="" for dir in /lib/security /lib64/security /lib/x86_64-linux-gnu/security /var/lib/pam; do -- 2.47.2