2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-22 18:08:23 +00:00

for kerberos V < version, fall back on old kerb4 auth code

This commit is contained in:
Todd C. Miller 1999-06-22 13:30:25 +00:00
parent 81cf00633b
commit 8e30e833f5
4 changed files with 487 additions and 356 deletions

View File

@ -148,7 +148,7 @@ Special features/options:
DIR is the base directory containing the compiled FWTK package. DIR is the base directory containing the compiled FWTK package.
--with-kerb4 --with-kerb4
Enable kerberos v4 support Tested only with the Cygnus Network Enable kerberos v4 support. Tested only with the Cygnus Network
Security package (CNS). This uses kerberos passphrases for Security package (CNS). This uses kerberos passphrases for
authentication but does not use the kerberos cookie scheme. authentication but does not use the kerberos cookie scheme.
@ -156,7 +156,8 @@ Special features/options:
Enable kerberos v5 support. Tested against MIT Kerberos V, Enable kerberos v5 support. Tested against MIT Kerberos V,
release 1.1, although also expected to work against CNS. This release 1.1, although also expected to work against CNS. This
This uses kerberos passphrases for authentication but does not This uses kerberos passphrases for authentication but does not
use the kerberos cookie scheme. use the kerberos cookie scheme. Will not work for Kerberos V
older than version 1.1.
--with-authenticate --with-authenticate
Enable support for the AIX 4.x general authentication function. Enable support for the AIX 4.x general authentication function.

View File

@ -141,10 +141,10 @@
/* Define if you use AIX general authentication. */ /* Define if you use AIX general authentication. */
#undef HAVE_AUTHENTICATE #undef HAVE_AUTHENTICATE
/* Define if you use Kerberos. */ /* Define if you use Kerberos IV or Kerberos V < 1.1. */
#undef HAVE_KERB4 #undef HAVE_KERB4
/* Define if you use Kerberos. */ /* Define if you use Kerberos V version 1.1 or higher. */
#undef HAVE_KERB5 #undef HAVE_KERB5
/* Define if you use SIA. */ /* Define if you use SIA. */

796
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -215,8 +215,7 @@ esac])
AC_ARG_WITH(kerb4, [ --with-kerb4 enable kerberos v4 support], AC_ARG_WITH(kerb4, [ --with-kerb4 enable kerberos v4 support],
[case $with_kerb4 in [case $with_kerb4 in
yes) AC_DEFINE(HAVE_KERB4) yes) AC_MSG_CHECKING(whether to try Kerberos 4 authentication)
AC_MSG_CHECKING(whether to try Kerberos 4 authentication)
AC_MSG_RESULT(yes) AC_MSG_RESULT(yes)
;; ;;
no) ;; no) ;;
@ -227,8 +226,7 @@ esac])
AC_ARG_WITH(kerb5, [ --with-kerb5 enable kerberos v5 support], AC_ARG_WITH(kerb5, [ --with-kerb5 enable kerberos v5 support],
[case $with_kerb5 in [case $with_kerb5 in
yes) AC_DEFINE(HAVE_KERB5) yes) AC_MSG_CHECKING(whether to try Kerberos 5 authentication)
AC_MSG_CHECKING(whether to try Kerberos 5 authentication)
AC_MSG_RESULT(yes) AC_MSG_RESULT(yes)
;; ;;
no) ;; no) ;;
@ -1349,10 +1347,25 @@ if test "$with_DCE" = "yes" -o "$ac_cv_prog_YACC" = "bison -y"; then
AC_FUNC_ALLOCA AC_FUNC_ALLOCA
fi fi
dnl
dnl Kerberos 5
dnl
if test "$with_kerb5" = "yes"; then
dnl
dnl Starting with Kerberos 5, 1.1 we use the new creds API
dnl Otherwise, just use the old Kerberos 4 stuff.
dnl
AC_CHECK_LIB(krb5, krb5_get_init_creds_opt, [
AC_DEFINE(HAVE_KERB5)
SUDO_LIBS="${SUDO_LIBS} -lkrb5 -lk5crypto -lcom_err"
], with_kerb4=yes)
fi
dnl dnl
dnl Find kerberos 4 includes and libs or complain dnl Find kerberos 4 includes and libs or complain
dnl dnl
if test "$with_kerb4" = "yes"; then if test "$with_kerb4" = "yes"; then
AC_DEFINE(HAVE_KERB4)
if test -f "/usr/include/kerberosIV/krb.h"; then if test -f "/usr/include/kerberosIV/krb.h"; then
CPPFLAGS="${CPPFLAGS} -I/usr/include/kerberosIV" CPPFLAGS="${CPPFLAGS} -I/usr/include/kerberosIV"
elif test -f "/usr/local/include/kerberosIV/krb.h"; then elif test -f "/usr/local/include/kerberosIV/krb.h"; then
@ -1375,14 +1388,13 @@ if test "$with_kerb4" = "yes"; then
echo 'Unable to locate kerberos 4 libraries, you will have to edit the Makefile and add -L/path/to/krb/libs to SUDO_LDFLAGS' echo 'Unable to locate kerberos 4 libraries, you will have to edit the Makefile and add -L/path/to/krb/libs to SUDO_LDFLAGS'
fi fi
AC_HAVE_LIBRARY(des, SUDO_LIBS="${SUDO_LIBS} -lkrb -ldes", SUDO_LIBS="${SUDO_LIBS} -lkrb") if test "$with_kerb5" = "yes"; then
fi AC_HAVE_LIBRARY(krb4, SUDO_LIBS="${SUDO_LIBS} -lkrb4", SUDO_LIBS="${SUDO_LIBS} -lkrb")
AC_HAVE_LIBRARY(des, SUDO_LIBS="${SUDO_LIBS} -ldes")
dnl SUDO_LIBS="${SUDO_LIBS} -ldes425 -lkrb5 -lcrypto -lcom_err"
dnl Kerberos 5 else
dnl AC_HAVE_LIBRARY(des, SUDO_LIBS="${SUDO_LIBS} -lkrb -ldes", SUDO_LIBS="${SUDO_LIBS} -lkrb")
if test "$with_kerb5" = "yes"; then fi
SUDO_LIBS="${SUDO_LIBS} -lkrb5 -lk5crypto -lcom_err"
fi fi
dnl dnl