From dce7a61b127a4ef558c528ae561ed600a91384b5 Mon Sep 17 00:00:00 2001 From: mike Date: Wed, 17 Sep 2008 19:30:58 +0000 Subject: [PATCH] Redo previous change, since pam_opendirectory.so is not available on older Mac OS X releases. Now a configure-time check and option (--with-pam-module). git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@7959 7a7537e8-13f0-0310-91df-b6672ffda945 --- conf/{pam.darwin => pam.opendirectory} | 0 conf/pam.securityserver | 7 +++++++ config-scripts/cups-defaults.m4 | 2 +- config-scripts/cups-pam.m4 | 29 +++++++++++++++++++------- 4 files changed, 29 insertions(+), 9 deletions(-) rename conf/{pam.darwin => pam.opendirectory} (100%) create mode 100644 conf/pam.securityserver diff --git a/conf/pam.darwin b/conf/pam.opendirectory similarity index 100% rename from conf/pam.darwin rename to conf/pam.opendirectory diff --git a/conf/pam.securityserver b/conf/pam.securityserver new file mode 100644 index 0000000000..ff724da4d6 --- /dev/null +++ b/conf/pam.securityserver @@ -0,0 +1,7 @@ +# cups: auth account password session +auth sufficient pam_securityserver.so +auth sufficient pam_unix.so +auth required pam_deny.so +account required pam_permit.so +password required pam_deny.so +session required pam_permit.so diff --git a/config-scripts/cups-defaults.m4 b/config-scripts/cups-defaults.m4 index d7f704212a..2681389c47 100644 --- a/config-scripts/cups-defaults.m4 +++ b/config-scripts/cups-defaults.m4 @@ -40,7 +40,7 @@ AC_SUBST(CUPS_LOG_FILE_PERM) AC_DEFINE_UNQUOTED(CUPS_DEFAULT_LOG_FILE_PERM, 0$CUPS_LOG_FILE_PERM) dnl Default FatalErrors -AC_ARG_WITH(fatal_errors, [ --with-fatal-errors set default FatalErrors value, default=config], +AC_ARG_WITH(fatal_errors, [ --with-fatal-errors set default FatalErrors value, default=config], CUPS_FATAL_ERRORS="$withval", CUPS_FATAL_ERRORS="config") AC_SUBST(CUPS_FATAL_ERRORS) diff --git a/config-scripts/cups-pam.m4 b/config-scripts/cups-pam.m4 index 14177ced8c..ea2c05af1b 100644 --- a/config-scripts/cups-pam.m4 +++ b/config-scripts/cups-pam.m4 @@ -3,7 +3,7 @@ dnl "$Id$" dnl dnl PAM stuff for the Common UNIX Printing System (CUPS). dnl -dnl Copyright 2007 by Apple Inc. +dnl Copyright 2007-2008 by Apple Inc. dnl Copyright 1997-2005 by Easy Software Products, all rights reserved. dnl dnl These coded instructions, statements, and computer programs are the @@ -14,6 +14,7 @@ dnl file is missing or damaged, see the license at "http://www.cups.org/". dnl AC_ARG_ENABLE(pam, [ --enable-pam turn on PAM support, default=yes]) +AC_ARG_WITH(pam_module, [ --with-pam-module specify the PAM module to use, default=auto]) dnl Don't use PAM with AIX... if test $uname = AIX; then @@ -60,21 +61,33 @@ if test x$enable_pam != xno; then case "$uname" in Darwin*) # Darwin, MacOS X - PAMFILE="pam.darwin" + if test "x$ac_with_pam_module" != x; then + PAMFILE="pam.$ac_with_module" + elif test -f /usr/lib/pam/pam_opendirectory.so; then + PAMFILE="pam.opendirectory" + else + PAMFILE="pam.securityserver" + fi ;; + IRIX) # SGI IRIX PAMFILE="pam.irix" ;; + *) # All others; this test might need to be updated # as Linux distributors move things around... - for mod in pam_unix2.so pam_unix.so pam_pwdb.so; do - if test -f /lib/security/$mod; then - PAMMOD="$mod" - break; - fi - done + if test "x$ac_with_pam_module" != x; then + PAMMOD="pam_${ac_with_module}.so" + else + for mod in pam_unix2.so pam_unix.so pam_pwdb.so; do + if test -f /lib/security/$mod; then + PAMMOD="$mod" + break; + fi + done + fi PAMFILE="pam.std" ;; -- 2.47.2