[Date Prev][Date Next] [Chronological] [Thread] [Top]

Kerberos IV support (ITS#67)



Full_Name: Steve Price
Version: 1.1.4
OS: FreeBSD 4.0-CURRENT
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (152.136.82.1)


While trying to update the FreeBSD port of OpenLDAP to version
1.1.4, I ran into a couple of problems with Kerberos support.
Below you will find a couple of patches (against -devel) that
make it at least compile for me.

The first patch is to support Kerberos IV which doesn't have
des_debug.  The second patch adds the libraries required to
build with Kerberos support of any version.

NOTE: using KRB5_GENERAL__ as a test for krb5 support is pretty
hokey at best and should definitely be rethought.

-steve

Index: clients/ud/string_to_key.c
===================================================================
RCS file: /tmp/stuff/OpenLDAP/cvs/pkg/ldap/clients/ud/string_to_key.c,v
retrieving revision 1.8
diff -u -r1.8 string_to_key.c
--- string_to_key.c	1998/11/25 22:49:13	1.8
+++ string_to_key.c	1999/02/04 04:51:29
@@ -29,8 +29,11 @@
 #include <stdio.h>
 #include <ac/krb.h>
 
+#ifdef KRB5_GENERAL__
+#define KRB5_DEBUG	1
 extern int des_debug;
 extern int des_debug_print();
+#endif
 extern void des_fixup_key_parity();
 
 #ifndef HAVE_AFS_KERBEROS
@@ -64,7 +67,7 @@
     /* init key array for bits */
     memset(k_char, 0, sizeof(k_char));
 
-#ifdef DEBUG
+#ifdef KRB5_DEBUG
     if (des_debug)
 	fprintf(stdout,
 		"\n\ninput str length = %d  string = %s\nstring = 0x ",
@@ -75,7 +78,7 @@
     for (i = 1; i <= length; i++) {
 	/* get next input key byte */
 	temp = (unsigned int) *str++;
-#ifdef DEBUG
+#ifdef KRB5_DEBUG
 	if (des_debug)
 	    fprintf(stdout,"%02x ",temp & 0xff);
 #endif
@@ -116,11 +119,13 @@
     /* now fix up key parity again */
     des_fixup_key_parity(key);
 
+#ifdef KRB5_DEBUG
     if (des_debug)
 	fprintf(stdout,
 		"\nResulting string_to_key = 0x%x 0x%x\n",
 		*((unsigned long *) key),
 		*((unsigned long *) key+1));
+#endif
 }
 
 #endif /* HAVE_KERBEROS_V */
Index: libraries/libldap/Makefile.in
===================================================================
RCS file: /tmp/stuff/OpenLDAP/cvs/pkg/ldap/libraries/libldap/Makefile.in,v
retrieving revision 1.16
diff -u -r1.16 Makefile.in
--- Makefile.in	1999/01/25 23:27:51	1.16
+++ Makefile.in	1999/02/04 04:50:10
@@ -29,7 +29,7 @@
 LDAP_LIBDIR= ../../libraries
 
 XLIBS = -lldap -llber
-XXLIBS = 
+XXLIBS = $(KRB_LIBS)
 
 apitest:	$(LIBRARY) apitest.o $(LDAP_LIBLBER_DEPEND)
 	$(LTLINK) $(LDFLAGS) -o $@ apitest.o $(LIBS)