From: Kurt Zeilenga Date: Tue, 8 Sep 1998 02:26:56 +0000 (+0000) Subject: Add Kerberos V5 support from Predrag Balorda X-Git-Tag: PHP3_TOOL_0_0~71 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2fb96905d2c31c36023b6180d7c334c6f6afa7a7;p=openldap Add Kerberos V5 support from Predrag Balorda --- diff --git a/Make-common.dist b/Make-common.dist index 2c20e1cc52..58c5105fb4 100644 --- a/Make-common.dist +++ b/Make-common.dist @@ -81,10 +81,24 @@ EXTRALDFLAGS?=-g # uncomment and change the various KRB* lines to point to where the # kerberos libraries and include files are installed at your site. # +# *** NOTE *** +# If you have an MIT Kerberos V distribution and you compiled it with -krb4 +# flag which enables Kerberos IV compatibility, uncomment KERBEROS_V - +# this will make sure all your includes can be found where they actually are - +# in this case /usr/local/kerberos/include/kerberosIV - simple change of +# KRBINCLUDEFLAG will _not_ work. Also uncomment the correct KRBLIBS define. +# +# For Kerberos V with Kerberos IV compatibility uncomment the following line +#KERBEROS=-DKERBEROS -DKERBEROS_V +# For Kerberos IV uncomment the following line #KERBEROS=-DKERBEROS +# #AFSKERBEROS=-DAFSKERBEROS #KRBINCLUDEFLAG = -I/usr/local/kerberos/include #KRBLIBFLAG = -L/usr/local/kerberos/lib +# For Kerberos V with Kerberos IV compatibility uncomment the following line +#KRBLIBS = -lkrb4 -lkrb5 -ldes425 +# For Kerberos IV uncomment the following line #KRBLIBS = -lkrb -ldes ############################################################################# diff --git a/Make-common.gmake b/Make-common.gmake index 123006c4ec..a2195652ba 100644 --- a/Make-common.gmake +++ b/Make-common.gmake @@ -105,10 +105,24 @@ endif # uncomment and change the various KRB* lines to point to where the # kerberos libraries and include files are installed at your site. # +# *** NOTE *** +# If you have an MIT Kerberos V distribution and you compiled it with -krb4 +# flag which enables Kerberos IV compatibility, uncomment KERBEROS_V - +# this will make sure all your includes can be found where they actually are - +# in this case /usr/local/kerberos/include/kerberosIV - simple change of +# KRBINCLUDEFLAG will _not_ work. Also uncomment the correct KRBLIBS define. +# +# For Kerberos V with Kerberos IV compatibility uncomment the following line +#KERBEROS=-DKERBEROS -DKERBEROS_V +# For Kerberos IV uncomment the following line #KERBEROS=-DKERBEROS +# #AFSKERBEROS=-DAFSKERBEROS #KRBINCLUDEFLAG = -I/usr/local/kerberos/include #KRBLIBFLAG = -L/usr/local/kerberos/lib +# For Kerberos V with Kerberos IV compatibility uncomment the following line +#KRBLIBS = -lkrb4 -lkrb5 -ldes425 +# For Kerberos IV uncomment the following line #KRBLIBS = -lkrb -ldes ############################################################################# diff --git a/clients/ud/auth.c b/clients/ud/auth.c index 6cb70cdf04..4c191ba2a0 100644 --- a/clients/ud/auth.c +++ b/clients/ud/auth.c @@ -17,8 +17,12 @@ #include #ifdef KERBEROS #include +#ifdef KERBEROS_V +#include +#else #include -#endif +#endif /* KERBEROS_V */ +#endif /* KERBEROS */ #include #include diff --git a/clients/ud/string_to_key.c b/clients/ud/string_to_key.c index d140d36b39..93a1b55336 100644 --- a/clients/ud/string_to_key.c +++ b/clients/ud/string_to_key.c @@ -26,16 +26,27 @@ #ifndef lint static char rcsid_string_to_key_c[] = -"$Id: string_to_key.c,v 1.1.3.1 1998/08/08 22:43:17 kurt Exp $"; +"$Id: string_to_key.c,v 1.2 1998/08/31 18:49:27 kurt Exp $"; #endif +#ifdef KERBEROS_V +#include +#include +#else #include -#include #include +#endif /* KERBEROS_V */ + +#include + /* #include "des_internal.h" */ #if 1 +#ifdef KERBEROS_V +#include +#else #include -#endif +#endif /* KERBEROS_V */ +#endif /* 1 */ extern int des_debug; extern int des_debug_print(); diff --git a/libraries/libldap/kbind.c b/libraries/libldap/kbind.c index cfccc36dd6..22e731e518 100644 --- a/libraries/libldap/kbind.c +++ b/libraries/libldap/kbind.c @@ -21,7 +21,13 @@ static char copyright[] = "@(#) Copyright (c) 1993 Regents of the University of #ifdef DOS #include "msdos.h" #endif /* DOS */ + +#ifdef KERBEROS_V +#include +#else #include +#endif /* KERBEROS_V */ + #include #if !defined(DOS) && !defined( _WIN32 ) #include diff --git a/servers/ldapd/kerberos.c b/servers/ldapd/kerberos.c index 937236e29a..5304d3d0a9 100644 --- a/servers/ldapd/kerberos.c +++ b/servers/ldapd/kerberos.c @@ -14,7 +14,11 @@ #include #include -#include "krb.h" +#ifdef KERBEROS_V +#include +#else +#include +#endif /* KERBEROS_V */ #include #include #include diff --git a/servers/slapd/back-ldbm/bind.c b/servers/slapd/back-ldbm/bind.c index 9aabe85c36..4171ac23e7 100644 --- a/servers/slapd/back-ldbm/bind.c +++ b/servers/slapd/back-ldbm/bind.c @@ -7,8 +7,12 @@ #include "slap.h" #include "back-ldbm.h" #ifdef KERBEROS -#include "krb.h" -#endif +#ifdef KERBEROS_V +#include +#else +#include +#endif /* KERBEROS_V */ +#endif /* KERBEROS */ #ifdef LDAP_CRYPT /* change for crypted passwords -- lukeh */ diff --git a/servers/slapd/back-ldbm/kerberos.c b/servers/slapd/back-ldbm/kerberos.c index d22553c659..84e1313ae9 100644 --- a/servers/slapd/back-ldbm/kerberos.c +++ b/servers/slapd/back-ldbm/kerberos.c @@ -8,7 +8,11 @@ #include "back-ldbm.h" #ifdef KERBEROS -#include "krb.h" +#ifdef KERBEROS_V +#include +#else +#include +#endif /* KERBEROS_V */ #define LDAP_KRB_PRINCIPAL "ldapserver" diff --git a/servers/slurpd/ldap_op.c b/servers/slurpd/ldap_op.c index 08253921cd..00f18b8351 100644 --- a/servers/slurpd/ldap_op.c +++ b/servers/slurpd/ldap_op.c @@ -20,7 +20,11 @@ #include #ifdef KERBEROS +#ifdef KERBEROS_V +#include +#else #include +#endif /* KERBEROS_V */ #endif /* KERBEROS */ #include