krb5-1.6.3-beta2 is available
John Hascall
john at iastate.edu
Sat Oct 6 23:10:34 EDT 2007
Below is a context diff of the changes I had to make
(in addition to creating a stdint.h include file as
previously mentioned) to make this compile under
Alpha OSF/1 4.0F.
Some of my changes were 'quick & dirty' owing to my
lack of experience with changing configure
In summary:
1) include/k5-platform.h -- assumption that 'long long' is the 64-bit type
2) app/bsd/login.c -- ttyent.h needs 'FILE *' (from stdio.h)
-- signal handlers take an int argument
3) tests/resolve/addrinfo-test.c \__ can't work on a system without addrinfo
tests/resolve/Makefile.in /
4) tests/resolve/addrinfo-test.c Possibly undefined IPPROTO's need protection
5) lib/gssapi/krb5/gssapi_krb5.hin -- assumes inttypes.h available on all
non-windows systems (note: my fix ism't
quite right as HAVE_xxx_H defines are
not making it here
6) lib/gssapi/krb5/acquire_cred.c -- GSS_C_NO_CREDENTIAL was used here
GSS_C_NO_NAME seems to be the correct one
7) lib/krb5/os/locate_kdc.c \__ need to protect IPv6-specific bits
util/support/fake-addrinfo.c /
8) util/support/plugins.c -- RLTD_LOCAL can be undefined
9) util/support/fake-addrinfo.c -- gethostbyname_r takes a different number
of args than you use, but gethostbyname
is threadsafe anyway
-- similar issue with getservbyname
John
*** ./src/include/k5-platform.h Tue Jun 13 10:18:04 2006
--- ../krb5-1.6.3-beta2.fixed/./src/include/k5-platform.h Sat Oct 6 14:41:58 2007
***************
*** 397,404 ****
# define INT64_TYPE signed __int64
# define UINT64_TYPE unsigned __int64
#else /* not Windows, and neither stdint.h nor inttypes.h */
! # define INT64_TYPE signed long long
! # define UINT64_TYPE unsigned long long
#endif
#include <limits.h>
--- 397,409 ----
# define INT64_TYPE signed __int64
# define UINT64_TYPE unsigned __int64
#else /* not Windows, and neither stdint.h nor inttypes.h */
! # ifdef __alpha
! # define INT64_TYPE signed long
! # define UINT64_TYPE unsigned long
! # else
! # define INT64_TYPE signed long long
! # define UINT64_TYPE unsigned long long
! # endif
#endif
#include <limits.h>
*** ./src/appl/bsd/login.c Tue Aug 8 14:26:40 2006
--- ../krb5-1.6.3-beta2.fixed/./src/appl/bsd/login.c Sat Oct 6 13:33:28 2007
***************
*** 113,123 ****
#endif
#include <errno.h>
#ifdef HAVE_TTYENT_H
#include <ttyent.h>
#endif
#include <syslog.h>
- #include <stdio.h>
#include <grp.h>
#include <pwd.h>
#include <string.h>
--- 113,123 ----
#endif
#include <errno.h>
+ #include <stdio.h>
#ifdef HAVE_TTYENT_H
#include <ttyent.h>
#endif
#include <syslog.h>
#include <grp.h>
#include <pwd.h>
#include <string.h>
***************
*** 2346,2352 ****
static int hungup = 0;
static sigtype
! sighup() {
hungup = 1;
}
--- 2346,2352 ----
static int hungup = 0;
static sigtype
! sighup(int dummy) {
hungup = 1;
}
*** ./src/tests/resolve/addrinfo-test.c Tue Oct 17 21:51:55 2006
--- ../krb5-1.6.3-beta2.fixed/./src/tests/resolve/addrinfo-test.c Sat Oct 6 15:54:01 2007
***************
*** 44,49 ****
--- 44,52 ----
#include <sys/socket.h>
#include <netdb.h>
#include <netinet/in.h> /* needed for IPPROTO_* on NetBSD */
+ #if defined(__alpha) && defined(__osf__)
+ #define USE_FAKE_ADDRINFO
+ #endif
#ifdef USE_FAKE_ADDRINFO
#include "fake-addrinfo.h"
#endif
***************
*** 56,66 ****
--- 59,73 ----
X(TCP);
X(UDP);
X(ICMP);
+ #ifdef IPPROTO_IPV6
X(IPV6);
+ #endif
#ifdef IPPROTO_GRE
X(GRE);
#endif
+ #ifdef IPPROTO_NONE
X(NONE);
+ #endif
X(RAW);
#ifdef IPPROTO_COMP
X(COMP);
*** ./src/tests/resolve/Makefile.in Fri Oct 13 18:54:24 2006
--- ../krb5-1.6.3-beta2.fixed/./src/tests/resolve/Makefile.in Sat Oct 6 17:06:50 2007
***************
*** 16,22 ****
$(CC_LINK) -o $@ resolve.o $(LIBS)
addrinfo-test: addrinfo-test.o
! $(CC_LINK) -o $@ addrinfo-test.o $(LIBS)
fake-addrinfo-test: fake-addrinfo-test.o
$(CC_LINK) -o $@ fake-addrinfo-test.o $(SUPPORT_LIB) $(LIBS)
--- 16,22 ----
$(CC_LINK) -o $@ resolve.o $(LIBS)
addrinfo-test: addrinfo-test.o
! $(CC_LINK) -o $@ addrinfo-test.o $(SUPPORT_LIB) $(LIBS)
fake-addrinfo-test: fake-addrinfo-test.o
$(CC_LINK) -o $@ fake-addrinfo-test.o $(SUPPORT_LIB) $(LIBS)
*** ./src/lib/gssapi/krb5/gssapi_krb5.hin Wed Jun 14 17:27:54 2006
--- ../krb5-1.6.3-beta2.fixed/./src/lib/gssapi/krb5/gssapi_krb5.hin Sat Oct 6 16:54:04 2007
***************
*** 91,100 ****
#if defined(_WIN32)
! typedef unsigned __int64 gss_uint64;
#else /*windows*/
! #include <inttypes.h>
! typedef uint64_t gss_uint64;
#endif
--- 91,110 ----
#if defined(_WIN32)
! typedef unsigned __int64 gss_uint64;
#else /*windows*/
! # if defined(HAVE_INTTYPES_H)
! # include <inttypes.h>
! # elif defined(HAVE_STDINT_H)
! # include <stdint.h>
! # else
! # if defined(__alpha)
! typedef unsigned long uint64_t;
! # else
! typedef unsigned long long uint64_t;
! # endif
! # endif
! typedef uint64_t gss_uint64;
#endif
*** ./src/lib/gssapi/krb5/acquire_cred.c Fri Sep 28 19:02:57 2007
--- ../krb5-1.6.3-beta2.fixed/./src/lib/gssapi/krb5/acquire_cred.c Sat Oct 6 12:48:37 2007
***************
*** 571,577 ****
/* if the princ wasn't filled in already, fill it in now */
! if (!cred->princ && (desired_name != GSS_C_NO_CREDENTIAL))
if ((code = krb5_copy_principal(context, (krb5_principal) desired_name,
&(cred->princ)))) {
if (cred->ccache)
--- 571,577 ----
/* if the princ wasn't filled in already, fill it in now */
! if (!cred->princ && (desired_name != GSS_C_NO_NAME))
if ((code = krb5_copy_principal(context, (krb5_principal) desired_name,
&(cred->princ)))) {
if (cred->ccache)
*** ./src/lib/krb5/os/locate_kdc.c Tue Apr 10 16:52:23 2007
--- ../krb5-1.6.3-beta2.fixed/./src/lib/krb5/os/locate_kdc.c Sat Oct 6 11:50:11 2007
***************
*** 569,575 ****
--- 569,577 ----
struct addrinfo ai;
union {
struct sockaddr_in sin;
+ #ifdef KRB5_USE_INET6
struct sockaddr_in6 sin6;
+ #endif
} u;
} *x;
***************
*** 590,599 ****
--- 592,603 ----
x->u.sin = *(struct sockaddr_in *)sa;
x->ai.ai_addrlen = sizeof(struct sockaddr_in);
}
+ #ifdef KRB5_USE_INET6
if (sa->sa_family == AF_INET6) {
x->u.sin6 = *(struct sockaddr_in6 *)sa;
x->ai.ai_addrlen = sizeof(struct sockaddr_in6);
}
+ #endif
if (add_addrinfo_to_list (d->lp, &x->ai, free, x) != 0) {
/* Assumes only error is ENOMEM. */
d->out_of_mem = 1;
*** ./src/util/support/plugins.c Fri Sep 28 20:02:10 2007
--- ../krb5-1.6.3-beta2.fixed/./src/util/support/plugins.c Sat Oct 6 09:10:03 2007
***************
*** 95,105 ****
#if USE_DLOPEN
if (!err && (statbuf.st_mode & S_IFMT) == S_IFREG) {
void *handle = NULL;
! #ifdef RTLD_GROUP
! #define PLUGIN_DLOPEN_FLAGS (RTLD_NOW | RTLD_LOCAL | RTLD_GROUP)
! #else
! #define PLUGIN_DLOPEN_FLAGS (RTLD_NOW | RTLD_LOCAL)
#endif
if (!err) {
handle = dlopen(filepath, PLUGIN_DLOPEN_FLAGS);
--- 95,107 ----
#if USE_DLOPEN
if (!err && (statbuf.st_mode & S_IFMT) == S_IFREG) {
void *handle = NULL;
! #ifndef RTLD_GROUP
! #define RTLD_GROUP 0
#endif
+ #ifndef RTLD_LOCAL
+ #define RTLD_LOCAL 0
+ #endif
+ #define PLUGIN_DLOPEN_FLAGS (RTLD_NOW | RTLD_LOCAL | RTLD_GROUP)
if (!err) {
handle = dlopen(filepath, PLUGIN_DLOPEN_FLAGS);
*** ./src/util/support/fake-addrinfo.c Mon Mar 19 16:17:02 2007
--- ../krb5-1.6.3-beta2.fixed/./src/util/support/fake-addrinfo.c Sat Oct 6 11:20:12 2007
***************
*** 162,167 ****
--- 162,171 ----
/* Do we actually have *any* systems we care about that don't provide
either getaddrinfo or one of these two flavors of
gethostbyname_r? */
+ #if defined(__alpha) && defined(__osf__)
+ #define THREADSAFE_GETHOSTBYNAME
+ #undef HAVE_GETSERVBYNAME_R
+ #endif
#if !defined(HAVE_GETHOSTBYNAME_R) || defined(THREADSAFE_GETHOSTBYNAME)
typedef struct hostent *GET_HOST_TMP;
#define GET_HOST_BY_NAME(NAME, HP, ERR, TMP) \
***************
*** 1330,1336 ****
--- 1334,1342 ----
}
/* Some systems don't define in6addr_any. */
+ #ifdef KRB5_USE_INET6
const struct in6_addr krb5int_in6addr_any = IN6ADDR_ANY_INIT;
+ #endif
int krb5int_getaddrinfo (const char *node, const char *service,
const struct addrinfo *hints,
More information about the krbdev
mailing list