diff options
author | Michael Sweet <michael.r.sweet@gmail.com> | 2017-12-07 11:50:32 -0500 |
---|---|---|
committer | Michael Sweet <michael.r.sweet@gmail.com> | 2017-12-07 11:50:32 -0500 |
commit | ac05c63065808b421fd02225164e31cbe1e2506f (patch) | |
tree | ddd4fe27a3cadc77085a13468922564a2397ffe5 /config-scripts | |
parent | 1576d09baf481066ad73768ec8c5d269d33241ee (diff) | |
download | cups-ac05c63065808b421fd02225164e31cbe1e2506f.tar.gz |
Fix PAM module detection and add support for the "common-*" includes used on
Ubuntu (Issue #5185)
conf/pam.common: PAM definition that uses system-wide default (common) modules.
config-scripts/cups-pam.m4: Add PAM module directory search paths, look for common includes.
configure: Regenerate.
Diffstat (limited to 'config-scripts')
-rw-r--r-- | config-scripts/cups-pam.m4 | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/config-scripts/cups-pam.m4 b/config-scripts/cups-pam.m4 index 01622a4d3..0a9157ac0 100644 --- a/config-scripts/cups-pam.m4 +++ b/config-scripts/cups-pam.m4 @@ -65,10 +65,22 @@ if test x$enable_pam != xno; then # as Linux distributors move things around... if test "x$with_pam_module" != x; then PAMMOD="pam_${with_pam_module}.so" - elif test -f /lib/security/pam_unix2.so; then - PAMMOD="pam_unix2.so" - elif test -f /lib/security/pam_unix.so; then - PAMMOD="pam_unix.so" + elif test -f /etc/pam.d/common-auth; then + PAMFILE="pam.common" + else + moddir="" + for dir in /lib/security /lib64/security /lib/x86_64-linux-gnu/security /var/lib/pam; do + if test -d $dir; then + moddir=$dir + break; + fi + done + + if test -f $moddir/pam_unix2.so; then + PAMMOD="pam_unix2.so" + elif test -f $moddir/pam_unix.so; then + PAMMOD="pam_unix.so" + fi fi if test "x$PAMMOD" = xpam_unix.so; then |