From 940d9b6dbab9883ad4eac75aba640ca7b42eae3e Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Sun, 11 Mar 2001 03:21:13 +0000 Subject: [PATCH] * def_realm.c: Move prototype for krb5_try_realm_txt_rr() to os-proto.h. * init_os_ctx.c: Include os-proto.h * changepw.c, locate_kdc.c: Do not shadow sin() with local variable name. * os-proto.h: Add prototypes for krb5_try_realm_txt_rr() and the obsolete krb5_secure_config_files(). git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13074 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/os/ChangeLog | 13 +++++++++++++ src/lib/krb5/os/changepw.c | 8 ++++---- src/lib/krb5/os/def_realm.c | 1 - src/lib/krb5/os/init_os_ctx.c | 1 + src/lib/krb5/os/locate_kdc.c | 12 ++++++------ src/lib/krb5/os/os-proto.h | 6 ++++++ 6 files changed, 30 insertions(+), 11 deletions(-) diff --git a/src/lib/krb5/os/ChangeLog b/src/lib/krb5/os/ChangeLog index c086048a7..8647ce0b8 100644 --- a/src/lib/krb5/os/ChangeLog +++ b/src/lib/krb5/os/ChangeLog @@ -1,3 +1,16 @@ +2001-03-10 Ezra Peisach + + * def_realm.c: Move prototype for krb5_try_realm_txt_rr() to + os-proto.h. + + * init_os_ctx.c: Include os-proto.h + + * changepw.c, locate_kdc.c: Do not shadow sin() with local + variable name. + + * os-proto.h: Add prototypes for krb5_try_realm_txt_rr() and the + obsolete krb5_secure_config_files(). + 2001-03-05 Ken Raeburn * localaddr.c (krb5_os_localaddr): Don't look for -1 return value diff --git a/src/lib/krb5/os/changepw.c b/src/lib/krb5/os/changepw.c index 3d3ea25a7..61cfea01f 100644 --- a/src/lib/krb5/os/changepw.c +++ b/src/lib/krb5/os/changepw.c @@ -76,8 +76,8 @@ krb5_locate_kpasswd(context, realm, addr_pp, naddrs) /* success with admin_server but now we need to change the port */ /* number to use DEFAULT_KPASSWD_PORT. */ for ( i=0;i<*naddrs;i++ ) { - struct sockaddr_in *sin = (struct sockaddr_in *) addr_pp[i]; - sin->sin_port = htons(DEFAULT_KPASSWD_PORT); + struct sockaddr_in *sockin = (struct sockaddr_in *) addr_pp[i]; + sockin->sin_port = htons(DEFAULT_KPASSWD_PORT); } } } @@ -97,8 +97,8 @@ krb5_locate_kpasswd(context, realm, addr_pp, naddrs) /* success with admin_server but now we need to change the port */ /* number to use DEFAULT_KPASSWD_PORT. */ for ( i=0;i<*naddrs;i++ ) { - struct sockaddr_in *sin = (struct sockaddr_in *) addr_pp[i]; - sin->sin_port = htons(DEFAULT_KPASSWD_PORT); + struct sockaddr_in *sockin = (struct sockaddr_in *) addr_pp[i]; + sockin->sin_port = htons(DEFAULT_KPASSWD_PORT); } } } diff --git a/src/lib/krb5/os/def_realm.c b/src/lib/krb5/os/def_realm.c index 01fd46517..65e3902cd 100644 --- a/src/lib/krb5/os/def_realm.c +++ b/src/lib/krb5/os/def_realm.c @@ -52,7 +52,6 @@ #define MAX_DNS_NAMELEN (15*(MAXHOSTNAMELEN + 1)+1) -extern int krb5_try_realm_txt_rr(char *,char *, char **); #endif /* KRB5_DNS_LOOKUP */ /* diff --git a/src/lib/krb5/os/init_os_ctx.c b/src/lib/krb5/os/init_os_ctx.c index 676c46d29..1f430610f 100644 --- a/src/lib/krb5/os/init_os_ctx.c +++ b/src/lib/krb5/os/init_os_ctx.c @@ -28,6 +28,7 @@ #define NEED_WINDOWS #include "k5-int.h" +#include "os-proto.h" #ifdef macintosh #include diff --git a/src/lib/krb5/os/locate_kdc.c b/src/lib/krb5/os/locate_kdc.c index 91e12b19d..48a014770 100644 --- a/src/lib/krb5/os/locate_kdc.c +++ b/src/lib/krb5/os/locate_kdc.c @@ -348,7 +348,7 @@ krb5_locate_srv_dns(realm, service, protocol, addr_pp, naddrs) unsigned char *p=NULL; char host[MAX_DNS_NAMELEN], *h; struct sockaddr *addr = NULL; - struct sockaddr_in *sin = NULL; + struct sockaddr_in *sin_p = NULL; struct hostent *hp = NULL; int type, class; int priority, weight, size, len, numanswers, numqueries, rdlen; @@ -553,11 +553,11 @@ krb5_locate_srv_dns(realm, service, protocol, addr_pp, naddrs) #ifdef HAVE_NETINET_IN_H case AF_INET: for (j=0; hp->h_addr_list[j]; j++) { - sin = (struct sockaddr_in *) &addr[out++]; - memset ((char *) sin, 0, sizeof (struct sockaddr)); - sin->sin_family = hp->h_addrtype; - sin->sin_port = htons(entry->port); - memcpy((char *) &sin->sin_addr, + sin_p = (struct sockaddr_in *) &addr[out++]; + memset ((char *) sin_p, 0, sizeof (struct sockaddr)); + sin_p->sin_family = hp->h_addrtype; + sin_p->sin_port = htons(entry->port); + memcpy((char *) &sin_p->sin_addr, (char *) hp->h_addr_list[j], sizeof(struct in_addr)); if (out + 1 >= count) { diff --git a/src/lib/krb5/os/os-proto.h b/src/lib/krb5/os/os-proto.h index 37782df7d..12e2afb48 100644 --- a/src/lib/krb5/os/os-proto.h +++ b/src/lib/krb5/os/os-proto.h @@ -55,6 +55,12 @@ krb5_error_code krb5_make_full_ipaddr #endif /* HAVE_NETINET_IN_H */ +krb5_error_code krb5_try_realm_txt_rr(const char *, const char *, + char **realm); + +/* Obsolete interface - leave prototype here until code removed */ +krb5_error_code krb5_secure_config_files(krb5_context ctx); + int _krb5_use_dns_realm KRB5_PROTOTYPE((krb5_context)); int _krb5_use_dns_kdc KRB5_PROTOTYPE((krb5_context)); int _krb5_conf_boolean KRB5_PROTOTYPE((const char *)); -- 2.26.2