Commit c0a61598 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Initial Kth Kerberos support. Changes based upon suggestions

from Booker Bense <bbense@networking.stanford.edu>.
parent a284b641
......@@ -334,6 +334,8 @@ valid_tgt( char **names )
static char *kauth_name;
#ifndef HAVE_KTH_KERBEROS
/*ARGSUSED*/
int
krbgetpass( char *user, char *inst, char *realm, char *pw, C_Block key )
......@@ -365,6 +367,7 @@ krbgetpass( char *user, char *inst, char *realm, char *pw, C_Block key )
return( 0 );
}
#endif /* HAVE_KTH_KERBEROS */
static int
kinit( char *kname )
......@@ -382,14 +385,18 @@ kinit( char *kname )
}
#ifdef HAVE_AFS_KERBEROS
/*
* realm must be uppercase for krb_ routines
*/
/* realm must be uppercase for AFS krb_ routines */
ldap_pvt_str2upper( realm );
#endif /* HAVE_AFS_KERBEROS */
#ifdef HAVE_KTH_KERBEROS
/* Kth kerberos knows how to do both string to keys */
rc = krb_get_pw_in_tkt( name, inst, realm, TGT, realm,
DEFAULT_TKT_LIFE, 0 );
#else
rc = krb_get_in_tkt( name, inst, realm, TGT, realm,
DEFAULT_TKT_LIFE, krbgetpass, NULL, NULL );
#endif
if ( rc != KSUCCESS ) {
switch ( rc ) {
......
This diff is collapsed.
......@@ -109,7 +109,7 @@ OL_ARG_WITH(cyrus_sasl,[ --with-cyrus-sasl with Cyrus SASL support],
OL_ARG_WITH(fetch,[ --with-fetch with fetch URL support],
auto, [auto yes no] )
OL_ARG_WITH(kerberos,[ --with-kerberos with Kerberos support],
auto, [auto k5 k4 afs yes no])
auto, [auto k5 kth k4 afs yes no])
OL_ARG_WITH(readline,[ --with-readline with readline support],
auto, [auto yes no] )
OL_ARG_WITH(threads,[ --with-threads use threads],
......@@ -831,8 +831,10 @@ des_debug = 1;
fi
fi
if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
AC_CHECK_HEADERS(krb.h des.h)
if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 \
-o $ol_with_kerberos = kth ; then
AC_CHECK_HEADERS(krb.h des.h krb-archaeology.h )
if test $ac_cv_header_krb_h = yes ; then
AC_CHECK_LIB(krb, main, [have_k4=yes], [have_k4=no], [-ldes])
......@@ -842,12 +844,20 @@ if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
ol_link_kerberos=yes
KRB_LIBS="-lkrb -ldes"
if test $ac_cv_header_krb_archaeology_h = yes ; then
AC_DEFINE(HAVE_KTH_KERBEROS, 1,
[define if you have Kth Kerberos])
fi
fi
fi
fi
if test $ol_link_kerberos = yes ; then
AC_DEFINE(HAVE_KERBEROS, 1, [define if you have Kerberos])
else if test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
AC_ERROR([Kerberos detection failed.])
fi
dnl ----------------------------------------------------------------
......
......@@ -387,6 +387,9 @@
/* Define if you have the <kerberosIV/krb.h> header file. */
#undef HAVE_KERBEROSIV_KRB_H
/* Define if you have the <krb-archaeology.h> header file. */
#undef HAVE_KRB_ARCHAEOLOGY_H
/* Define if you have the <krb.h> header file. */
#undef HAVE_KRB_H
......@@ -618,6 +621,9 @@
/* define if you have Kerberos des_debug */
#undef HAVE_DES_DEBUG
/* define if you have Kth Kerberos */
#undef HAVE_KTH_KERBEROS
/* define if you have Kerberos */
#undef HAVE_KERBEROS
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment