svn rev #25042: trunk/src/ include/ lib/krb5/os/

ghudson@MIT.EDU ghudson at MIT.EDU
Mon Jul 25 09:46:53 EDT 2011


http://src.mit.edu/fisheye/changelog/krb5/?cs=25042
Commit By: ghudson
Log Message:
Fix build without KRB5_DNS_LOOKUP.

Define MAX_DNS_NAMELEN unconditionally in k5-int.h as we use it
unconditionally in kdc_util.c.  Don't define it in locate_kdc.c.

Conditionalize dns_locate_server() in locate_kdc.c as its only call
site (in k5_locate_server) and its helper function (locate_srv_dns_1)
are conditional.

>From Chris Hecker with minor changes.


Changed Files:
U   trunk/src/include/k5-int.h
U   trunk/src/lib/krb5/os/locate_kdc.c
Modified: trunk/src/include/k5-int.h
===================================================================
--- trunk/src/include/k5-int.h	2011-07-24 12:17:13 UTC (rev 25041)
+++ trunk/src/include/k5-int.h	2011-07-25 13:46:53 UTC (rev 25042)
@@ -2094,10 +2094,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,

Modified: trunk/src/lib/krb5/os/locate_kdc.c
===================================================================
--- trunk/src/lib/krb5/os/locate_kdc.c	2011-07-24 12:17:13 UTC (rev 25041)
+++ trunk/src/lib/krb5/os/locate_kdc.c	2011-07-25 13:46:53 UTC (rev 25042)
@@ -47,8 +47,6 @@
 #define MAXHOSTNAMELEN 64
 #endif
 
-#define MAX_DNS_NAMELEN (15*(MAXHOSTNAMELEN + 1)+1)
-
 #if KRB5_DNS_LOOKUP_KDC
 #define DEFAULT_LOOKUP_KDC 1
 #else
@@ -520,6 +518,7 @@
                              dflport1, dflport2);
 }
 
+#ifdef KRB5_DNS_LOOKUP
 static krb5_error_code
 dns_locate_server(krb5_context context, const krb5_data *realm,
                   struct serverlist *serverlist, enum locate_service_type svc,
@@ -565,6 +564,7 @@
     }
     return code;
 }
+#endif /* KRB5_DNS_LOOKUP */
 
 /*
  * Wrapper function for the various backends




More information about the cvs-krb5 mailing list