patch for compile errors when KRB5_DNS_LOOKUP is false on 1.9.1
Chris Hecker
checker at d6.com
Sun Jul 24 00:55:46 EDT 2011
I'm getting a compile error on 1.9.1 if KRB5_DNS_LOOKUP is false in
locate_kdc.c because dns_locate_server calls locate_srv_dns_1, which
is in an ifdef block. The calls to dns_locate_server are ifdefed, but
the function itself isn't. This is true in trunk as well.
Also, MAX_DNS_NAMELEN is not defined in k5-int.h if KRB5_DNS_LOOKUP is
off, which makes kdc_util.c not compile.
kdc_util.c:2502: error: `MAX_DNS_NAMELEN' undeclared (first use in
this function)
The obvious patch is below.
Chris
diff -ur krb5-1.9.1.orig/src/include/k5-int.h
krb5-1.9.1/src/include/k5-int.h
--- krb5-1.9.1.orig/src/include/k5-int.h 2010-12-02
18:05:44.000000000 -0600
+++ krb5-1.9.1/src/include/k5-int.h 2011-07-23 23:48:08.000000000
-0500
@@ -2258,10 +2258,10 @@
unsigned short port;
char *host;
};
-#ifdef KRB5_DNS_LOOKUP
-
#define MAX_DNS_NAMELEN (15*(MAXHOSTNAMELEN + 1)+1)
+#ifdef KRB5_DNS_LOOKUP
+
krb5_error_code
krb5int_make_srv_query_realm(const krb5_data *realm,
const char *service,
diff -ur krb5-1.9.1.orig/src/lib/krb5/os/locate_kdc.c
krb5-1.9.1/src/lib/krb5/os/locate_kdc.c
--- krb5-1.9.1.orig/src/lib/krb5/os/locate_kdc.c 2010-05-27
17:25:51.000000000 -0500
+++ krb5-1.9.1/src/lib/krb5/os/locate_kdc.c 2011-07-23
23:29:20.000000000 -0500
@@ -693,6 +693,7 @@
dflport1, dflport2, family);
}
+#ifdef KRB5_DNS_LOOKUP
static krb5_error_code
dns_locate_server (krb5_context context, const krb5_data *realm,
struct addrlist *addrlist,
@@ -738,6 +739,7 @@
}
return code;
}
+#endif
/*
* Wrapper function for the various backends
More information about the Kerberos
mailing list