use roken* macros

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3700 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1997-10-29 01:30:58 +00:00
parent c145f0f8e4
commit 62143c0e4a
9 changed files with 19 additions and 15 deletions

View File

@@ -69,7 +69,7 @@ get_kdc_address (krb5_context context,
if (hostent == NULL)
hostent = gethostbyname2 (p, AF_INET);
#else
hostent = gethostbyname (p);
hostent = roken_gethostbyname (p);
#endif
krb5_free_krbhst (context, hostlist);
if (hostent == NULL)

View File

@@ -66,7 +66,7 @@ gethostname_fallback (krb5_addresses *res)
if (gethostname (hostname, sizeof(hostname)))
return errno;
hostent = gethostbyname (hostname);
hostent = roken_gethostbyname (hostname);
if (hostent == NULL)
return errno;
res->len = 1;

View File

@@ -78,7 +78,7 @@ krb5_get_forwarded_creds (krb5_context context,
if (out_creds == NULL)
return ENOMEM;
hostent = gethostbyname (hostname);
hostent = roken_gethostbyname (hostname);
if (hostent == NULL)
return h_errno; /* XXX */

View File

@@ -73,9 +73,11 @@ krb5_get_host_realm(krb5_context context,
}
addr.s_addr = inet_addr(host);
hostent = gethostbyname (host);
hostent = roken_gethostbyname (host);
if (hostent == NULL && addr.s_addr != INADDR_NONE)
hostent = gethostbyaddr ((const char *)&addr, sizeof(addr), AF_INET);
hostent = roken_gethostbyaddr ((const char *)&addr,
sizeof(addr),
AF_INET);
if (hostent != NULL)
host = hostent->h_name;

View File

@@ -48,7 +48,7 @@ krb5_getportbyname (krb5_context context,
{
struct servent *sp;
if ((sp = getservbyname (service, proto)) == NULL) {
if ((sp = roken_getservbyname (service, proto)) == NULL) {
krb5_warnx(context, "%s/%s unknown service, using default port %d",
service, proto, default_port);
return htons(default_port);

View File

@@ -179,7 +179,8 @@ close_syslog(void *data)
}
static krb5_error_code
open_syslog(krb5_context context, krb5_log_facility *facility, int min, int max,
open_syslog(krb5_context context,
krb5_log_facility *facility, int min, int max,
const char *sev, const char *fac)
{
struct syslog_data *sd = malloc(sizeof(*sd));
@@ -195,8 +196,9 @@ open_syslog(krb5_context context, krb5_log_facility *facility, int min, int max,
if(i == -1)
i = LOG_AUTH;
sd->priority |= i;
openlog(facility->program, LOG_PID | LOG_NDELAY, i);
return krb5_addlog_func(context, facility, min, max, log_syslog, close_syslog, sd);
roken_openlog(facility->program, LOG_PID | LOG_NDELAY, i);
return krb5_addlog_func(context, facility, min, max,
log_syslog, close_syslog, sd);
}
struct file_data{

View File

@@ -494,7 +494,7 @@ krb5_425_conv_principal_ext(krb5_context context,
return HEIM_ERR_V4_PRINC_NO_CONV;
}
if(resolve){
struct hostent *hp = gethostbyname(instance);
struct hostent *hp = roken_gethostbyname(instance);
if(hp){
instance = hp->h_name;
ret = krb5_make_principal(context, &pr,
@@ -696,7 +696,7 @@ krb5_sname_to_principal (krb5_context context,
sname = "host";
if(type == KRB5_NT_SRV_HST){
struct hostent *hp;
hp = gethostbyname(hostname);
hp = roken_gethostbyname(hostname);
if(hp != NULL)
hostname = hp->h_name;
}

View File

@@ -180,7 +180,7 @@ krb5_sendto_kdc (krb5_context context,
if (hostent == NULL)
hostent = gethostbyname2 (p, AF_INET);
#else
hostent = gethostbyname (p);
hostent = roken_gethostbyname (p);
#endif
if(hostent == NULL)
continue;

View File

@@ -70,9 +70,9 @@ krb5_sock_to_principal (krb5_context context,
if (ret)
return ret;
hostent = gethostbyaddr (address.address.data,
address.address.length,
family);
hostent = roken_gethostbyaddr (address.address.data,
address.address.length,
family);
if (hostent == NULL)
return h_errno;