KerberosGetAFSToken drives me crazy

Darren Tucker dtucker at zip.com.au
Sat Nov 12 19:23:55 EST 2005


On Thu, Nov 10, 2005 at 12:40:13PM -0500, Robert Banz wrote:
> I've actually gotten things to build with the krbafs package + MIT on 
> multiple architectures (Solaris & OSX.)  So, it's all there.

So it would appear, although it's not called the same thing (thus my
quick grep didn't find it) and doesn't seem to take the same arguments.

The attached patch makes it build, however as I don't use Kerberos or
AFS I can't test it.

Can anyone confirm this works?  Is this worth adding?

-- 
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
    Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
-------------- next part --------------
Index: configure.ac
===================================================================
RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/configure.ac,v
retrieving revision 1.306
diff -u -p -r1.306 configure.ac
--- configure.ac	12 Nov 2005 04:20:53 -0000	1.306
+++ configure.ac	12 Nov 2005 08:07:52 -0000
@@ -2907,8 +2907,10 @@ AC_ARG_WITH(kerberos5,
 		AC_CHECK_HEADERS(gssapi_generic.h gssapi/gssapi_generic.h)
 
 		LIBS="$LIBS $K5LIBS"
-		AC_SEARCH_LIBS(k_hasafs, kafs, AC_DEFINE(USE_AFS, 1,
-			[Define this if you want to use libkafs' AFS support]))
+		AC_SEARCH_LIBS(k_hasafs, kafs krbafs, [AC_DEFINE(USE_AFS, 1,
+		    [Use libkafs or libkrbafs for AFS support])])
+		AC_CHECK_HEADERS(kafs.h krbafs.h)
+		AC_CHECK_FUNCS(krb5_afslog krb_afslog, break)
 	fi
 	]
 )
Index: defines.h
===================================================================
RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/defines.h,v
retrieving revision 1.129
diff -u -p -r1.129 defines.h
--- defines.h	9 Oct 2005 01:40:04 -0000	1.129
+++ defines.h	12 Nov 2005 08:17:02 -0000
@@ -576,6 +576,13 @@ struct winsize {
 #  define krb5_get_err_text(context,code) error_message(code)
 #endif
 
+#if defined(KRB5) && defined(USE_AFS)
+# if !defined(HAVE_KRB5_AFSLOG) && defined(HAVE_KRB_AFSLOG)
+#  define krb5_afslog(a,b,c,d)		krb_afslog((c),(d))
+#  define krb5_afslog_home(a,b,c,d,e)	krb_afslog_home((c),(d),(e))
+# endif
+#endif
+
 #if defined(SKEYCHALLENGE_4ARG)
 # define _compat_skeychallenge(a,b,c,d) skeychallenge(a,b,c,d)
 #else
Index: includes.h
===================================================================
RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/includes.h,v
retrieving revision 1.77
diff -u -p -r1.77 includes.h
--- includes.h	26 Aug 2005 20:15:20 -0000	1.77
+++ includes.h	12 Nov 2005 08:18:51 -0000
@@ -182,8 +182,12 @@ static /**/const char *const rcsid[] = {
 #endif
 
 #if defined(KRB5) && defined(USE_AFS)
-# include <krb5.h>
-# include <kafs.h>
+# if defined(HAVE_KAFS_H)
+#  include <krb5.h>
+#  include <kafs.h>
+# elif defined(HAVE_KRBAFS_H)
+#  include <krbafs.h>
+# endif
 #endif
 
 #if defined(HAVE_SYS_SYSLOG_H)
Index: session.c
===================================================================
RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/session.c,v
retrieving revision 1.309
diff -u -p -r1.309 session.c
--- session.c	5 Nov 2005 04:15:00 -0000	1.309
+++ session.c	12 Nov 2005 08:19:14 -0000
@@ -59,10 +59,6 @@ RCSID("$OpenBSD: session.c,v 1.188 2005/
 #include "kex.h"
 #include "monitor_wrap.h"
 
-#if defined(KRB5) && defined(USE_AFS)
-#include <kafs.h>
-#endif
-
 #ifdef GSSAPI
 #include "ssh-gss.h"
 #endif


More information about the openssh-unix-dev mailing list