12-28 snapshot on netbsd1.3H - much better luck this time

assar@stacken.kth.se assar at stacken.kth.se
Tue Dec 29 18:09:41 CET 1998


Ken Raeburn <raeburn at raeburn.org> writes:
> ../../arlad/arla.c:874: Undefined symbol `_krb_get_err_text' referenced from text segment

Try the appended patches and tell us if it works for you.

> Is a delay needed after arlad forks off before accessing /afs?

Currently, yes.  It shouldn't be.  Try running arlad with
`--fork-late' and tell us if that solves the problem.  (It should
probably be made the default behaviour.)

> Apparently the NetBSD libkafs k_hasafs() simply doesn't think I have
> AFS.  It wasn't compiled to know about any AFS syscalls.  I suppose
> I'll fetch the CMU version, or kth-krb.  (A third version of krb4 for
> my system?! *sigh*)

Can you find out (by running ktrace or reading the source) what
syscall the NetBSD libkafs is trying to use?  The xfs module will
install itself as syscall 210 if that's available and otherwise as the
first free slot reserved for LKMs.

> Excellent work!

Thanks.

/assar


Index: configure.in
===================================================================
RCS file: /usr/local/cvsroot/arla/configure.in,v
retrieving revision 1.224
diff -u -w -u -w -r1.224 configure.in
--- configure.in	1998/12/29 02:18:02	1.224
+++ configure.in	1998/12/29 17:06:52
@@ -466,6 +466,28 @@
 ])
 if test "$ac_cv_struct_krb_principal" = "yes"; then
   AC_DEFINE(HAVE_KRB_PRINCIPAL)
+fi
+
+dnl
+dnl Check for krb_get_err_text
+dnl
+
+AC_CACHE_CHECK(for krb_get_err_text, ac_cv_func_krb_get_err_text, [
+if test "$ac_cv_found_krb" = "yes"; then
+save_CPPFLAGS="${CPPFLAGS}"
+save_LIBS="${LIBS}"
+CPPFLAGS="${KRB_INC_FLAGS} ${CPPFLAGS}"
+LIBS="${KRB_LIB_FLAGS} ${LIBS}"
+AC_TRY_LINK([#include <krb.h>],
+[krb_get_err_text(0);],
+ac_cv_func_krb_get_err_text=yes,
+ac_cv_func_krb_get_err_text=no)
+CPPFLAGS="${save_CPPFLAGS}"
+LIBS="${save_LIBS}"
+fi
+])
+if test "$ac_cv_func_krb_get_err_text" = "yes"; then
+  AC_DEFINE(HAVE_KRB_GET_ERR_TEXT)
 fi
 
 dnl
Index: acconfig.h
===================================================================
RCS file: /usr/local/cvsroot/arla/acconfig.h,v
retrieving revision 1.65
diff -u -w -u -w -r1.65 acconfig.h
--- acconfig.h	1998/12/29 02:18:51	1.65
+++ acconfig.h	1998/12/29 17:07:05
@@ -172,6 +172,10 @@
 /* We have krb_principal from kth-krb ? */
 #undef HAVE_KRB_PRINCIPAL
 
+/* Define if you have a krb_get_err_text (otherwise, you should really
+   get more modern kerberos code) */
+#undef HAVE_KRB_GET_ERR_TEXT
+
 /* If we have _res */
 #undef HAVE__RES
 
Index: arlad/arla.c
===================================================================
RCS file: /usr/local/cvsroot/arla/arlad/arla.c,v
retrieving revision 1.97
diff -u -w -u -w -r1.97 arla.c
--- arla.c	1998/12/08 03:59:47	1.97
+++ arla.c	1998/12/29 17:07:17
@@ -579,6 +579,23 @@
     fclose(fp);
 }
 
+#if KERBEROS && !defined(HAVE_KRB_GET_ERR_TEXT)
+
+#ifndef MAX_KRB_ERRORS
+#define MAX_KRB_ERRORS 256
+#endif
+
+static const char err_failure[] = "Unknown error code passed (krb_get_err_text)";
+
+const char *
+krb_get_err_text(int code)
+{
+  if(code < 0 || code >= MAX_KRB_ERRORS)
+    return err_failure;
+  return krb_err_txt[code];
+}
+#endif
+
 static unsigned low_vnodes, high_vnodes, low_bytes, high_bytes;
 static unsigned numcreds, numconns, numvols;
 





More information about the Arla-drinkers mailing list