]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Redo previous change, since pam_opendirectory.so is not available on older
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Wed, 17 Sep 2008 19:30:58 +0000 (19:30 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Wed, 17 Sep 2008 19:30:58 +0000 (19:30 +0000)
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.opendirectory [moved from conf/pam.darwin with 100% similarity]
conf/pam.securityserver [new file with mode: 0644]
config-scripts/cups-defaults.m4
config-scripts/cups-pam.m4

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 (file)
index 0000000..ff724da
--- /dev/null
@@ -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
index d7f704212af7c54d7ed82f3f06ed43bb564560e6..2681389c4708118e8f5c4a22856b26a6122abc10 100644 (file)
@@ -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)
index 14177ced8c8bd9e7844af78481650d9504f2e9eb..ea2c05af1bac11e71c9c41977e79b5f181c8618a 100644 (file)
@@ -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"
                        ;;