mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-20 22:59:34 -05:00
Initial Kth Kerberos support. Changes based upon suggestions
from Booker Bense <bbense@networking.stanford.edu>.
This commit is contained in:
parent
a284b641b7
commit
c0a6159844
4 changed files with 773 additions and 771 deletions
|
|
@ -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 )
|
||||||
|
|
||||||
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 )
|
||||||
}
|
}
|
||||||
|
|
||||||
#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 ) {
|
||||||
|
|
|
||||||
16
configure.in
16
configure.in
|
|
@ -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;
|
||||||
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
|
||||||
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 @@
|
||||||
/* 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 @@
|
||||||
/* 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
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue