]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Use PAM password-auth or system-auth if present
authorZdenek Dohnal <zdohnal@redhat.com>
Wed, 14 Feb 2024 13:22:40 +0000 (14:22 +0100)
committerZdenek Dohnal <zdohnal@redhat.com>
Wed, 14 Feb 2024 13:22:40 +0000 (14:22 +0100)
Enables possibility to use PAM modules password-auth or system-auth
if they exist during compilation. password-auth module is
for remote authentication and system-auth for local authentication.

CHANGES.md
conf/pam.password [new file with mode: 0644]
conf/pam.system [new file with mode: 0644]
config-scripts/cups-pam.m4
configure

index e21d0b53acfa32307ddccbdd012cb264490be34d..8290c5e4bd86948a59916b75f36f338fb101096b 100644 (file)
@@ -8,6 +8,7 @@ Changes in CUPS v2.4.8 (TBA)
   (Issue #829)
 - Added new value for 'lpstat' option '-W' - successfull - for getting
   successfully printed jobs (Issue #830)
+- Added support for PAM modules password-auth and system-auth (Issue #892)
 - Raised `cups_enum_dests()` timeout for listing available IPP printers (Issue #751)
 - Fixed the web interface not showing an error for a non-existent printer
   (Issue #423)
diff --git a/conf/pam.password b/conf/pam.password
new file mode 100644 (file)
index 0000000..6146a91
--- /dev/null
@@ -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 (file)
index 0000000..9e7c820
--- /dev/null
@@ -0,0 +1,3 @@
+#%PAM-1.0
+auth     include  system-auth
+account  include  system-auth
index cf983b0311f64c0914589b0e766509f9da228960..f4d6ecbd955b106e9e914c97beb55f581c45859e 100644 (file)
@@ -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
index 7af3d1c9ca29e6e1071edf602d04672ad1407e9a..1921738cfacc34e8b8d7aa807c9dcbfec139d0c8 100755 (executable)
--- a/configure
+++ b/configure
@@ -10396,6 +10396,16 @@ then :
 
            PAMFILE="pam.common"
 
+elif test -f /etc/pam.d/password-auth
+then :
+
+           PAMFILE="pam.password"
+
+elif test -f /etc/pam.d/system-auth
+then :
+
+           PAMFILE="pam.system"
+
 else $as_nop
 
            moddir=""