]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Use PAM password-auth or system-auth if present 892/head
authorZdenek Dohnal <zdohnal@redhat.com>
Wed, 14 Feb 2024 08:35:05 +0000 (09:35 +0100)
committerZdenek Dohnal <zdohnal@redhat.com>
Wed, 14 Feb 2024 08:35:05 +0000 (09:35 +0100)
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 [new file with mode: 0644]
conf/pam.system [new file with mode: 0644]
config-scripts/cups-pam.m4

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