From 309af4e57601af71baf3069ae62fab1e8e610919 Mon Sep 17 00:00:00 2001 From: dtucker Date: Mon, 5 Jan 2004 11:36:51 +0000 Subject: [PATCH] - (dtucker) [acconfig.h configure.ac includes.h servconf.c session.c] Only enable KerberosGetAFSToken if Heimdal's libkafs is found. with jakob@ --- ChangeLog | 2 ++ acconfig.h | 3 +++ configure.ac | 5 +++++ includes.h | 5 +++++ servconf.c | 4 ++++ session.c | 2 +- 6 files changed, 20 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index c5ef7de6..205fa0e4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ 20040105 - (dtucker) [contrib/ssh-copy-id] Bug #781: exit if ssh fails. Patch from cjwatson at debian.org. + - (dtucker) [acconfig.h configure.ac includes.h servconf.c session.c] + Only enable KerberosGetAFSToken if Heimdal's libkafs is found. with jakob@ 20040102 - (djm) OSX/Darwin needs BIND_8_COMPAT to build getrrsetbyname. Report from diff --git a/acconfig.h b/acconfig.h index 60aa368c..a10e1333 100644 --- a/acconfig.h +++ b/acconfig.h @@ -256,6 +256,9 @@ /* Define this if you are using the Heimdal version of Kerberos V5 */ #undef HEIMDAL +/* Define this if you want to use Heimdal's AFS support */ +#undef AFS + /* Define if you want S/Key support */ #undef SKEY diff --git a/configure.ac b/configure.ac index f885dc91..3d43a854 100644 --- a/configure.ac +++ b/configure.ac @@ -2037,6 +2037,11 @@ AC_ARG_WITH(kerberos5, [ AC_MSG_RESULT(yes) AC_DEFINE(HEIMDAL) K5LIBS="-lkrb5 -ldes -lcom_err -lasn1 -lroken" + AC_SEARCH_LIBS(k_hasafs, kafs, + [ AC_DEFINE(AFS) + K5LIBS="-lkafs $K5LIBS" + ] + ) ], [ AC_MSG_RESULT(no) K5LIBS="-lkrb5 -lk5crypto -lcom_err" diff --git a/includes.h b/includes.h index ac9a950e..02364bbd 100644 --- a/includes.h +++ b/includes.h @@ -169,6 +169,11 @@ static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg } # include /* Openpty on FreeBSD at least */ #endif +#if defined(HEIMDAL) && defined(AFS) +# include +# include +#endif + #include /* For OPENSSL_VERSION_NUMBER */ #include "defines.h" diff --git a/servconf.c b/servconf.c index b832c75b..04a10fad 100644 --- a/servconf.c +++ b/servconf.c @@ -305,7 +305,11 @@ static struct { { "kerberosauthentication", sKerberosAuthentication }, { "kerberosorlocalpasswd", sKerberosOrLocalPasswd }, { "kerberosticketcleanup", sKerberosTicketCleanup }, +#ifdef AFS { "kerberosgetafstoken", sKerberosGetAFSToken }, +#else + { "kerberosgetafstoken", sUnsupported }, +#endif #else { "kerberosauthentication", sUnsupported }, { "kerberosorlocalpasswd", sUnsupported }, diff --git a/session.c b/session.c index 03a5ec57..cf6722c3 100644 --- a/session.c +++ b/session.c @@ -1415,7 +1415,7 @@ do_child(Session *s, const char *command) */ environ = env; -#ifdef KRB5 +#if defined(HEIMDAL) && defined(AFS) /* * At this point, we check to see if AFS is active and if we have * a valid Kerberos 5 TGT. If so, it seems like a good idea to see -- 2.45.2