Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
...@@ -334,6 +334,8 @@ valid_tgt( char **names ) ...@@ -334,6 +334,8 @@ valid_tgt( char **names )
static char *kauth_name; static char *kauth_name;
#ifndef HAVE_KTH_KERBEROS
/*ARGSUSED*/ /*ARGSUSED*/
int int
krbgetpass( char *user, char *inst, char *realm, char *pw, C_Block key ) 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 ) ...@@ -365,6 +367,7 @@ krbgetpass( char *user, char *inst, char *realm, char *pw, C_Block key )
return( 0 ); return( 0 );
} }
#endif /* HAVE_KTH_KERBEROS */
static int static int
kinit( char *kname ) kinit( char *kname )
...@@ -382,14 +385,18 @@ kinit( char *kname ) ...@@ -382,14 +385,18 @@ kinit( char *kname )
} }
#ifdef HAVE_AFS_KERBEROS #ifdef HAVE_AFS_KERBEROS
/* /* realm must be uppercase for AFS krb_ routines */
* realm must be uppercase for krb_ routines
*/
ldap_pvt_str2upper( realm ); ldap_pvt_str2upper( realm );
#endif /* HAVE_AFS_KERBEROS */ #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, rc = krb_get_in_tkt( name, inst, realm, TGT, realm,
DEFAULT_TKT_LIFE, krbgetpass, NULL, NULL ); DEFAULT_TKT_LIFE, krbgetpass, NULL, NULL );
#endif
if ( rc != KSUCCESS ) { if ( rc != KSUCCESS ) {
switch ( rc ) { switch ( rc ) {
......
This diff is collapsed.
...@@ -109,7 +109,7 @@ OL_ARG_WITH(cyrus_sasl,[ --with-cyrus-sasl with Cyrus SASL support], ...@@ -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], OL_ARG_WITH(fetch,[ --with-fetch with fetch URL support],
auto, [auto yes no] ) auto, [auto yes no] )
OL_ARG_WITH(kerberos,[ --with-kerberos with Kerberos support], 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], OL_ARG_WITH(readline,[ --with-readline with readline support],
auto, [auto yes no] ) auto, [auto yes no] )
OL_ARG_WITH(threads,[ --with-threads use threads], OL_ARG_WITH(threads,[ --with-threads use threads],
...@@ -831,8 +831,10 @@ des_debug = 1; ...@@ -831,8 +831,10 @@ des_debug = 1;
fi fi
fi fi
if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 \
AC_CHECK_HEADERS(krb.h des.h) -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 if test $ac_cv_header_krb_h = yes ; then
AC_CHECK_LIB(krb, main, [have_k4=yes], [have_k4=no], [-ldes]) 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 ...@@ -842,12 +844,20 @@ if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
ol_link_kerberos=yes ol_link_kerberos=yes
KRB_LIBS="-lkrb -ldes" 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 fi
fi fi
if test $ol_link_kerberos = yes ; then if test $ol_link_kerberos = yes ; then
AC_DEFINE(HAVE_KERBEROS, 1, [define if you have Kerberos]) 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 fi
dnl ---------------------------------------------------------------- dnl ----------------------------------------------------------------
......
...@@ -387,6 +387,9 @@ ...@@ -387,6 +387,9 @@
/* Define if you have the <kerberosIV/krb.h> header file. */ /* Define if you have the <kerberosIV/krb.h> header file. */
#undef HAVE_KERBEROSIV_KRB_H #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. */ /* Define if you have the <krb.h> header file. */
#undef HAVE_KRB_H #undef HAVE_KRB_H
...@@ -618,6 +621,9 @@ ...@@ -618,6 +621,9 @@
/* define if you have Kerberos des_debug */ /* define if you have Kerberos des_debug */
#undef HAVE_DES_DEBUG #undef HAVE_DES_DEBUG
/* define if you have Kth Kerberos */
#undef HAVE_KTH_KERBEROS
/* define if you have Kerberos */ /* define if you have Kerberos */
#undef HAVE_KERBEROS #undef HAVE_KERBEROS
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment