]> granicus.if.org Git - sudo/commitdiff
Need to do checks for krb5_verify_user, krb5_init_secure_context
authorTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 18 Apr 2011 13:22:26 +0000 (09:22 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 18 Apr 2011 13:22:26 +0000 (09:22 -0400)
and krb5_get_init_creds_opt_alloc regardless of whether or not
krb5-config is present.

configure
configure.in

index 6e76452cf8f2f4bf1b0efb2851857ffc3602a72e..f278418543f897cfe54da2a73c314812929646be 100755 (executable)
--- a/configure
+++ b/configure
@@ -17587,17 +17587,15 @@ $as_echo "no" >&6; }
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    fi
-fi
-if test ${with_kerb5-'no'} != "no" -a -z "$KRB5CONFIG"; then
-    $as_echo "#define HAVE_KERB5 1" >>confdefs.h
+    else
+       $as_echo "#define HAVE_KERB5 1" >>confdefs.h
 
-                if test "$with_kerb5" = "yes"; then
-       found=no
-       O_CPPFLAGS="$CPPFLAGS"
-       for dir in "" "kerberosV/" "krb5/" "kerberos5/" "kerberosv5/"; do
-           CPPFLAGS="$O_CPPFLAGS -I/usr/include/${dir}"
-           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+                               if test "$with_kerb5" = "yes"; then
+           found=no
+           O_CPPFLAGS="$CPPFLAGS"
+           for dir in "" "kerberosV/" "krb5/" "kerberos5/" "kerberosv5/"; do
+               CPPFLAGS="$O_CPPFLAGS -I/usr/include/${dir}"
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <krb5.h>
 _ACEOF
@@ -17605,13 +17603,13 @@ if ac_fn_c_try_cpp "$LINENO"; then :
   found=yes; break
 fi
 rm -f conftest.err conftest.$ac_ext
-       done
-       if test X"$found" = X"no"; then
-           CPPFLAGS="$O_CPPFLAGS"
-           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to locate Kerberos V include files, you will have to edit the Makefile and add -I/path/to/krb/includes to CPPFLAGS" >&5
+           done
+           if test X"$found" = X"no"; then
+               CPPFLAGS="$O_CPPFLAGS"
+               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to locate Kerberos V include files, you will have to edit the Makefile and add -I/path/to/krb/includes to CPPFLAGS" >&5
 $as_echo "$as_me: WARNING: Unable to locate Kerberos V include files, you will have to edit the Makefile and add -I/path/to/krb/includes to CPPFLAGS" >&2;}
-       fi
-    else
+           fi
+       else
 
     if test X"$with_rpath" = X"yes"; then
        case "$host" in
@@ -17627,12 +17625,12 @@ $as_echo "$as_me: WARNING: Unable to locate Kerberos V include files, you will h
        blibpath_add="${blibpath_add}:${with_kerb5}/lib"
     fi
 
-       CPPFLAGS="$CPPFLAGS -I${with_kerb5}/include"
-    fi
+           CPPFLAGS="$CPPFLAGS -I${with_kerb5}/include"
+       fi
 
-                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using Heimdal" >&5
+                               { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using Heimdal" >&5
 $as_echo_n "checking whether we are using Heimdal... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <krb5.h>
 int
@@ -17645,13 +17643,13 @@ const char *tmp = heimdal_version;
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
 
-           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-           $as_echo "#define HAVE_HEIMDAL 1" >>confdefs.h
+               $as_echo "#define HAVE_HEIMDAL 1" >>confdefs.h
 
-           # XXX - need to check whether -lcrypo is needed!
-           SUDOERS_LIBS="${SUDOERS_LIBS} -lkrb5 -lcrypto -ldes -lcom_err -lasn1"
-           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lroken" >&5
+               # XXX - need to check whether -lcrypo is needed!
+               SUDOERS_LIBS="${SUDOERS_LIBS} -lkrb5 -lcrypto -ldes -lcom_err -lasn1"
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lroken" >&5
 $as_echo_n "checking for main in -lroken... " >&6; }
 if test "${ac_cv_lib_roken_main+set}" = set; then :
   $as_echo_n "(cached) " >&6
 
 else
 
-           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-           SUDOERS_LIBS="${SUDOERS_LIBS} -lkrb5 -lk5crypto -lcom_err"
-           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lkrb5support" >&5
+               SUDOERS_LIBS="${SUDOERS_LIBS} -lkrb5 -lk5crypto -lcom_err"
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lkrb5support" >&5
 $as_echo_n "checking for main in -lkrb5support... " >&6; }
 if test "${ac_cv_lib_krb5support_main+set}" = set; then :
   $as_echo_n "(cached) " >&6
@@ -17728,7 +17726,8 @@ fi
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    AUTH_OBJS="$AUTH_OBJS kerb5.lo"
+       AUTH_OBJS="$AUTH_OBJS kerb5.lo"
+    fi
     _LIBS="$LIBS"
     LIBS="${LIBS} ${SUDOERS_LIBS}"
     for ac_func in krb5_verify_user krb5_init_secure_context
index 235e9142a2e7eeab98e5ebd213afd6964637d205..ec4a90fd78a3972d24e2e0789b4927fb70a12f29 100644 (file)
@@ -2455,46 +2455,45 @@ if test ${with_kerb5-'no'} != "no"; then
                AC_MSG_RESULT(no)
            ]
        )
-    fi
-fi
-if test ${with_kerb5-'no'} != "no" -a -z "$KRB5CONFIG"; then
-    AC_DEFINE(HAVE_KERB5)
-    dnl
-    dnl Use the specified directory, if any, else search for correct inc dir
-    dnl
-    if test "$with_kerb5" = "yes"; then
-       found=no
-       O_CPPFLAGS="$CPPFLAGS"
-       for dir in "" "kerberosV/" "krb5/" "kerberos5/" "kerberosv5/"; do
-           CPPFLAGS="$O_CPPFLAGS -I/usr/include/${dir}"
-           AC_PREPROC_IFELSE([#include <krb5.h>], [found=yes; break])
-       done
-       if test X"$found" = X"no"; then
-           CPPFLAGS="$O_CPPFLAGS"
-           AC_MSG_WARN([Unable to locate Kerberos V include files, you will have to edit the Makefile and add -I/path/to/krb/includes to CPPFLAGS])
-       fi
     else
-       dnl XXX - try to include krb5.h here too
-       SUDO_APPEND_LIBPATH(SUDOERS_LDFLAGS, [${with_kerb5}/lib])
-       CPPFLAGS="$CPPFLAGS -I${with_kerb5}/include"
-    fi
+       AC_DEFINE(HAVE_KERB5)
+       dnl
+       dnl Use the specified directory, if any, else search for correct inc dir
+       dnl
+       if test "$with_kerb5" = "yes"; then
+           found=no
+           O_CPPFLAGS="$CPPFLAGS"
+           for dir in "" "kerberosV/" "krb5/" "kerberos5/" "kerberosv5/"; do
+               CPPFLAGS="$O_CPPFLAGS -I/usr/include/${dir}"
+               AC_PREPROC_IFELSE([#include <krb5.h>], [found=yes; break])
+           done
+           if test X"$found" = X"no"; then
+               CPPFLAGS="$O_CPPFLAGS"
+               AC_MSG_WARN([Unable to locate Kerberos V include files, you will have to edit the Makefile and add -I/path/to/krb/includes to CPPFLAGS])
+           fi
+       else
+           dnl XXX - try to include krb5.h here too
+           SUDO_APPEND_LIBPATH(SUDOERS_LDFLAGS, [${with_kerb5}/lib])
+           CPPFLAGS="$CPPFLAGS -I${with_kerb5}/include"
+       fi
 
-    dnl
-    dnl Try to determine whether we have Heimdal or MIT Kerberos
-    dnl
-    AC_MSG_CHECKING(whether we are using Heimdal)
-    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <krb5.h>]], [[const char *tmp = heimdal_version;]])], [
-           AC_MSG_RESULT(yes)
-           AC_DEFINE(HAVE_HEIMDAL)
-           # XXX - need to check whether -lcrypo is needed!
-           SUDOERS_LIBS="${SUDOERS_LIBS} -lkrb5 -lcrypto -ldes -lcom_err -lasn1"
-           AC_CHECK_LIB(roken, main, [SUDOERS_LIBS="${SUDOERS_LIBS} -lroken"])
-       ], [
-           AC_MSG_RESULT(no)
-           SUDOERS_LIBS="${SUDOERS_LIBS} -lkrb5 -lk5crypto -lcom_err"
-           AC_CHECK_LIB(krb5support, main, [SUDOERS_LIBS="${SUDOERS_LIBS} -lkrb5support"])
-    ])
-    AUTH_OBJS="$AUTH_OBJS kerb5.lo"
+       dnl
+       dnl Try to determine whether we have Heimdal or MIT Kerberos
+       dnl
+       AC_MSG_CHECKING(whether we are using Heimdal)
+       AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <krb5.h>]], [[const char *tmp = heimdal_version;]])], [
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_HEIMDAL)
+               # XXX - need to check whether -lcrypo is needed!
+               SUDOERS_LIBS="${SUDOERS_LIBS} -lkrb5 -lcrypto -ldes -lcom_err -lasn1"
+               AC_CHECK_LIB(roken, main, [SUDOERS_LIBS="${SUDOERS_LIBS} -lroken"])
+           ], [
+               AC_MSG_RESULT(no)
+               SUDOERS_LIBS="${SUDOERS_LIBS} -lkrb5 -lk5crypto -lcom_err"
+               AC_CHECK_LIB(krb5support, main, [SUDOERS_LIBS="${SUDOERS_LIBS} -lkrb5support"])
+       ])
+       AUTH_OBJS="$AUTH_OBJS kerb5.lo"
+    fi
     _LIBS="$LIBS"
     LIBS="${LIBS} ${SUDOERS_LIBS}"
     AC_CHECK_FUNCS(krb5_verify_user krb5_init_secure_context)