Build environment changes including:

Kerberos detection of des_debug
	detection of resolv.h and arpa/nameserv.h
Updated affected codes.
This commit is contained in:
Kurt Zeilenga 1999-02-04 21:54:38 +00:00
parent 0482baa520
commit f4dd466315
5 changed files with 441 additions and 341 deletions

View File

@ -3,7 +3,7 @@
#if defined(HAVE_KERBEROS) && !defined(openbsd)
/*
* $Source: /repo/OpenLDAP/pkg/ldap/clients/ud/string_to_key.c,v $
* $Author: hallvard $
* $Author: kdz $
*
* Copyright 1985, 1986, 1987, 1988, 1989 by the Massachusetts Institute
* of Technology.
@ -29,8 +29,11 @@
#include <stdio.h>
#include <ac/krb.h>
#if defined( DEBUG ) && defined( HAVE_DES_DEBUG )
#define USE_DES_DEBUG
extern int des_debug;
extern int des_debug_print();
#endif
extern void des_fixup_key_parity();
#ifndef HAVE_AFS_KERBEROS
@ -64,7 +67,7 @@ des_string_to_key( char *str, register des_cblock *key )
/* init key array for bits */
memset(k_char, 0, sizeof(k_char));
#ifdef DEBUG
#ifdef USE_DES_DEBUG
if (des_debug)
fprintf(stdout,
"\n\ninput str length = %d string = %s\nstring = 0x ",
@ -75,7 +78,7 @@ des_string_to_key( char *str, register des_cblock *key )
for (i = 1; i <= length; i++) {
/* get next input key byte */
temp = (unsigned int) *str++;
#ifdef DEBUG
#ifdef USE_DES_DEBUG
if (des_debug)
fprintf(stdout,"%02x ",temp & 0xff);
#endif
@ -116,11 +119,13 @@ des_string_to_key( char *str, register des_cblock *key )
/* now fix up key parity again */
des_fixup_key_parity(key);
#ifdef USE_DES_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 */

725
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -398,6 +398,31 @@ if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
ol_link_kerberos=yes
KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
LIBS="$KRB_LIBS $LIBS"
AC_CACHE_CHECK([for des_debug in Kerberos libraries],
[ol_cv_var_des_debug], [
dnl save the flags
save_LIBS="$LIBS"
LIBS="$KRB_LIBS $LIBS"
AC_TRY_LINK([
#include <kerberosIV/krb.h>
#include <kerberosIV/des.h>
extern int des_debug;
],[
des_debug = 1;
], ol_cv_var_des_debug=yes, ol_cv_var_des_debug=no)
dnl restore the LIBS
LIBS="$save_LIBS"
])
if test $ol_cv_var_des_debug= yes ; then
AC_DEFINE(HAVE_DES_DEBUG,1,
[define if you have Kerberos des_debug])
fi
LIBS="$save_LIBS"
fi
fi
fi
@ -1334,6 +1359,7 @@ if test $am_cv_sys_posix_termios = yes ; then
fi
AC_CHECK_HEADERS( \
arpa/nameser.h \
crypt.h \
errno.h \
fcntl.h \
@ -1346,6 +1372,7 @@ AC_CHECK_HEADERS( \
regex.h \
psap.h \
pwd.h \
resolv.h \
sgtty.h \
stdarg.h \
stddef.h \

View File

@ -27,11 +27,19 @@
#include <netinet/in.h>
#include <arpa/inet.h>
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif
#include <netdb.h>
#ifdef HAVE_RESOLV_H
#include <resolv.h>
#endif
#endif /* HAVE_SYS_SOCKET_H */
#ifdef HAVE_WINSOCK2
#include <winsock2.h>
#elif HAVE_WINSOCK

View File

@ -366,6 +366,9 @@
/* Define if you have the waitpid function. */
#undef HAVE_WAITPID
/* Define if you have the <arpa/nameser.h> header file. */
#undef HAVE_ARPA_NAMESER_H
/* Define if you have the <crypt.h> header file. */
#undef HAVE_CRYPT_H
@ -447,6 +450,9 @@
/* Define if you have the <regex.h> header file. */
#undef HAVE_REGEX_H
/* Define if you have the <resolv.h> header file. */
#undef HAVE_RESOLV_H
/* Define if you have the <sched.h> header file. */
#undef HAVE_SCHED_H
@ -567,6 +573,9 @@
/* define if you have -lpp */
#undef HAVE_PP
/* define if you have Kerberos des_debug */
#undef HAVE_DES_DEBUG
/* define if you have Kerberos */
#undef HAVE_KERBEROS