[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Heimdal 0.2r



[ I've pruned heimdal-discuss from the CC:-list ]

Graeme Wood <jaw@ucs.ed.ac.uk> writes:

> On 3 Apr 2000, Assar Westerlund wrote:
> 
> > >From NEWS:
> > 
> > Changes in release 0.2r:
> > 
> >  * fix realloc memory corruption bug in kdc
> 
> This seems to have fixed the problem I was having with the kdc falling
> over when changing passwords or using kadmin.

Good.

> However, to get it to compile with KRB4 support I had to edit
> lib/45/mk_req.c and change the arguments to krb_mk_req from const
> char to char. There seems to be a disagreement between heimdal-0.2r
> and krb4-1.0.1.

Yeah, I was using more modern krb4 code.  I've since added autoconf
glue for this.  Patches appended. (You'll need automake && autoconf to
rebuild.)

/assar

Index: heimdal/configure.in
diff -u heimdal/configure.in:1.222 heimdal/configure.in:1.225
--- heimdal/configure.in:1.222	Mon Apr  3 00:08:40 2000
+++ heimdal/configure.in	Wed Apr  5 05:28:26 2000
@@ -123,6 +129,20 @@
 	AC_FIND_FUNC(krb_enable_debug)
 	AC_FIND_FUNC(krb_disable_debug)
 	AC_FIND_FUNC(krb_get_our_ip_for_realm)
+	AC_CACHE_CHECK(for krb_mk_req with const arguments,
+		ac_cv_func_krb_mk_req_const,
+		[AC_TRY_COMPILE([#include <krb.h>
+		int krb_mk_req(KTEXT a, const char *s, const char *i,
+			       const char *r, int32_t checksum)
+		{ return 17; }], [],
+		ac_cv_func_krb_mk_req_const=yes,
+		ac_cv_func_krb_mk_req_const=no)
+	])
+	if test "$ac_cv_func_krb_mk_req_const" = "yes"; then
+		AC_DEFINE(KRB_MK_REQ_CONST, 1,
+			[Define if krb_mk_req takes cons char *])
+	fi
+
 	LIBS="$save_LIBS"
 	CFLAGS="$save_CFLAGS"
 	LIB_kdb="-lkdb -lkrb"
Index: heimdal/lib/45/mk_req.c
diff -u heimdal/lib/45/mk_req.c:1.3 heimdal/lib/45/mk_req.c:1.4
--- heimdal/lib/45/mk_req.c:1.3	Mon Apr  3 03:36:39 2000
+++ heimdal/lib/45/mk_req.c	Mon Apr  3 14:53:49 2000
@@ -35,7 +35,7 @@
 
 #include "45_locl.h"
 
-RCSID("$Id: mk_req.c,v 1.3 2000/04/03 01:36:39 assar Exp $");
+RCSID("$Id: mk_req.c,v 1.4 2000/04/03 12:53:49 assar Exp $");
 
 static int lifetime = 255;
 
@@ -61,10 +61,18 @@
     krb5_data_free(&data);
 }
 
+#ifdef KRB_MK_REQ_CONST
 int
 krb_mk_req(KTEXT authent,
 	   const char *service, const char *instance, const char *realm, 
 	   int32_t checksum)
+#else
+int
+krb_mk_req(KTEXT authent,
+	   char *service, char *instance, char *realm, 
+	   int32_t checksum)
+
+#endif
 {
     CREDENTIALS cr;
     KTEXT_ST req;