]> granicus.if.org Git - sudo/commitdiff
Use PAM by default on AIX 6 and higher.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 16 Sep 2011 23:57:12 +0000 (19:57 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 16 Sep 2011 23:57:12 +0000 (19:57 -0400)
Fix some square brackets in case statements that needed to be
doubled up. While here, use $OSMAJOR when it makes sense.

--HG--
branch : 1.7

configure
configure.in

index c4ef12bbb221c65ce589b33d12872aa7b78eb3dd..21e0906d9728e431e885aedda5b2cc4a5902a201 100755 (executable)
--- a/configure
+++ b/configure
@@ -13756,9 +13756,14 @@ rm -f core conftest.err conftest.$ac_objext \
                fi
                LDFLAGS="$O_LDFLAGS"
 
-               # Use authenticate(3) as the default authentication method
-               if test X"$with_aixauth" = X""; then
-                   for ac_func in authenticate
+               # On AIX 6 and higher default to PAM, else default to LAM
+               if test $OSMAJOR -ge 6; then
+                   if test X"$with_pam" = X""; then
+                       AUTH_EXCL_DEF="PAM"
+                   fi
+               else
+                   if test X"$with_aixauth" = X""; then
+                       for ac_func in authenticate
 do :
   ac_fn_c_check_func "$LINENO" "authenticate" "ac_cv_func_authenticate"
 if test "x$ac_cv_func_authenticate" = xyes; then :
@@ -13769,6 +13774,7 @@ _ACEOF
 fi
 done
 
+                   fi
                fi
 
                # AIX analog of nsswitch.conf, enabled by default
                    with_netsvc="/etc/netsvc.conf"
                fi
 
-               # LDR_PRELOAD is supported in AIX 5.3 and later
-               case "$OSREV" in
-                   1-4.*) with_noexec=no ;;
-               esac
+               # LDR_PRELOAD is only supported in AIX 5.3 and later
+               if test $OSMAJOR -lt 5; then
+                   with_noexec=no
+               fi
 
                # AIX-specific functions
                for ac_func in getuserattr setauthdb
@@ -13844,7 +13850,7 @@ $as_echo "$sudo_cv_var_hpccbundled" >&6; }
 
                # Build PA-RISC1.1 objects for better portability
                case "$host_cpu" in
-                   hppa2-9*)
+                   hppa[2-9]*)
                        _CFLAGS="$CFLAGS"
                        if test -n "$GCC"; then
                            portable_flag="-march=1.1"
@@ -13888,7 +13894,7 @@ $as_echo "$sudo_cv_var_daportable" >&6; }
                esac
 
                case "$host" in
-                       *-*-hpux1-8.*)
+                       *-*-hpux[1-8].*)
                            $as_echo "#define BROKEN_SYSLOG 1" >>confdefs.h
 
 
@@ -14231,20 +14237,16 @@ done
                CHECKSHADOW="false"
                # OpenBSD >= 3.0 supports BSD auth
                if test -z "$with_bsdauth"; then
-                   case "$OSREV" in
-                   0-2.*)
-                       ;;
-                   *)
+                   if test "$OSMAJOR" -ge 3; then
                        AUTH_EXCL_DEF="BSD_AUTH"
-                       ;;
-                   esac
+                   fi
                fi
                : ${with_logincap='maybe'}
                ;;
     *-*-*netbsd*)
                # NetBSD has a real setreuid(2) starting with 1.3.2
                case "$OSREV" in
-               0.9*|1.012*|1.3|1.3.1)
+               0.9*|1.[012]*|1.3|1.3.1)
                    SKIP_SETREUID=yes
                    ;;
                esac
index 9308210339c16a60695a1b3373d7468eb0ac6bcf..e3982583a0777c5c7a855fbd2796299a1f043102 100644 (file)
@@ -1492,9 +1492,15 @@ case "$host" in
                fi
                LDFLAGS="$O_LDFLAGS"
 
-               # Use authenticate(3) as the default authentication method
-               if test X"$with_aixauth" = X""; then
-                   AC_CHECK_FUNCS(authenticate, [AUTH_EXCL_DEF="AIX_AUTH"])
+               # On AIX 6 and higher default to PAM, else default to LAM
+               if test $OSMAJOR -ge 6; then
+                   if test X"$with_pam" = X""; then
+                       AUTH_EXCL_DEF="PAM"
+                   fi
+               else
+                   if test X"$with_aixauth" = X""; then
+                       AC_CHECK_FUNCS(authenticate, [AUTH_EXCL_DEF="AIX_AUTH"])
+                   fi
                fi
 
                # AIX analog of nsswitch.conf, enabled by default
@@ -1509,10 +1515,10 @@ case "$host" in
                    with_netsvc="/etc/netsvc.conf"
                fi
 
-               # LDR_PRELOAD is supported in AIX 5.3 and later
-               case "$OSREV" in
-                   [1-4].*) with_noexec=no ;;
-               esac
+               # LDR_PRELOAD is only supported in AIX 5.3 and later
+               if test $OSMAJOR -lt 5; then
+                   with_noexec=no
+               fi
 
                # AIX-specific functions
                AC_CHECK_FUNCS(getuserattr setauthdb)
@@ -1549,7 +1555,7 @@ case "$host" in
 
                # Build PA-RISC1.1 objects for better portability
                case "$host_cpu" in
-                   hppa[2-9]*)
+                   hppa[[2-9]]*)
                        _CFLAGS="$CFLAGS"
                        if test -n "$GCC"; then
                            portable_flag="-march=1.1"
@@ -1573,7 +1579,7 @@ case "$host" in
                esac
 
                case "$host" in
-                       *-*-hpux[1-8].*)
+                       *-*-hpux[[1-8]].*)
                            AC_DEFINE(BROKEN_SYSLOG)
 
                            # Not sure if setuid binaries are safe in < 9.x
@@ -1795,20 +1801,16 @@ case "$host" in
                CHECKSHADOW="false"
                # OpenBSD >= 3.0 supports BSD auth
                if test -z "$with_bsdauth"; then
-                   case "$OSREV" in
-                   [0-2].*)
-                       ;;
-                   *)
+                   if test "$OSMAJOR" -ge 3; then
                        AUTH_EXCL_DEF="BSD_AUTH"
-                       ;;
-                   esac
+                   fi
                fi
                : ${with_logincap='maybe'}
                ;;
     *-*-*netbsd*)
                # NetBSD has a real setreuid(2) starting with 1.3.2
                case "$OSREV" in
-               0.9*|1.[012]*|1.3|1.3.1)
+               0.9*|1.[[012]]*|1.3|1.3.1)
                    SKIP_SETREUID=yes
                    ;;
                esac