use roken* macros
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3700 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -69,7 +69,7 @@ get_kdc_address (krb5_context context,
|
|||||||
if (hostent == NULL)
|
if (hostent == NULL)
|
||||||
hostent = gethostbyname2 (p, AF_INET);
|
hostent = gethostbyname2 (p, AF_INET);
|
||||||
#else
|
#else
|
||||||
hostent = gethostbyname (p);
|
hostent = roken_gethostbyname (p);
|
||||||
#endif
|
#endif
|
||||||
krb5_free_krbhst (context, hostlist);
|
krb5_free_krbhst (context, hostlist);
|
||||||
if (hostent == NULL)
|
if (hostent == NULL)
|
||||||
|
@@ -66,7 +66,7 @@ gethostname_fallback (krb5_addresses *res)
|
|||||||
|
|
||||||
if (gethostname (hostname, sizeof(hostname)))
|
if (gethostname (hostname, sizeof(hostname)))
|
||||||
return errno;
|
return errno;
|
||||||
hostent = gethostbyname (hostname);
|
hostent = roken_gethostbyname (hostname);
|
||||||
if (hostent == NULL)
|
if (hostent == NULL)
|
||||||
return errno;
|
return errno;
|
||||||
res->len = 1;
|
res->len = 1;
|
||||||
|
@@ -78,7 +78,7 @@ krb5_get_forwarded_creds (krb5_context context,
|
|||||||
if (out_creds == NULL)
|
if (out_creds == NULL)
|
||||||
return ENOMEM;
|
return ENOMEM;
|
||||||
|
|
||||||
hostent = gethostbyname (hostname);
|
hostent = roken_gethostbyname (hostname);
|
||||||
if (hostent == NULL)
|
if (hostent == NULL)
|
||||||
return h_errno; /* XXX */
|
return h_errno; /* XXX */
|
||||||
|
|
||||||
|
@@ -73,9 +73,11 @@ krb5_get_host_realm(krb5_context context,
|
|||||||
}
|
}
|
||||||
|
|
||||||
addr.s_addr = inet_addr(host);
|
addr.s_addr = inet_addr(host);
|
||||||
hostent = gethostbyname (host);
|
hostent = roken_gethostbyname (host);
|
||||||
if (hostent == NULL && addr.s_addr != INADDR_NONE)
|
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)
|
if (hostent != NULL)
|
||||||
host = hostent->h_name;
|
host = hostent->h_name;
|
||||||
|
|
||||||
|
@@ -48,7 +48,7 @@ krb5_getportbyname (krb5_context context,
|
|||||||
{
|
{
|
||||||
struct servent *sp;
|
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",
|
krb5_warnx(context, "%s/%s unknown service, using default port %d",
|
||||||
service, proto, default_port);
|
service, proto, default_port);
|
||||||
return htons(default_port);
|
return htons(default_port);
|
||||||
|
@@ -179,7 +179,8 @@ close_syslog(void *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static krb5_error_code
|
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)
|
const char *sev, const char *fac)
|
||||||
{
|
{
|
||||||
struct syslog_data *sd = malloc(sizeof(*sd));
|
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)
|
if(i == -1)
|
||||||
i = LOG_AUTH;
|
i = LOG_AUTH;
|
||||||
sd->priority |= i;
|
sd->priority |= i;
|
||||||
openlog(facility->program, LOG_PID | LOG_NDELAY, i);
|
roken_openlog(facility->program, LOG_PID | LOG_NDELAY, i);
|
||||||
return krb5_addlog_func(context, facility, min, max, log_syslog, close_syslog, sd);
|
return krb5_addlog_func(context, facility, min, max,
|
||||||
|
log_syslog, close_syslog, sd);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct file_data{
|
struct file_data{
|
||||||
|
@@ -494,7 +494,7 @@ krb5_425_conv_principal_ext(krb5_context context,
|
|||||||
return HEIM_ERR_V4_PRINC_NO_CONV;
|
return HEIM_ERR_V4_PRINC_NO_CONV;
|
||||||
}
|
}
|
||||||
if(resolve){
|
if(resolve){
|
||||||
struct hostent *hp = gethostbyname(instance);
|
struct hostent *hp = roken_gethostbyname(instance);
|
||||||
if(hp){
|
if(hp){
|
||||||
instance = hp->h_name;
|
instance = hp->h_name;
|
||||||
ret = krb5_make_principal(context, &pr,
|
ret = krb5_make_principal(context, &pr,
|
||||||
@@ -696,7 +696,7 @@ krb5_sname_to_principal (krb5_context context,
|
|||||||
sname = "host";
|
sname = "host";
|
||||||
if(type == KRB5_NT_SRV_HST){
|
if(type == KRB5_NT_SRV_HST){
|
||||||
struct hostent *hp;
|
struct hostent *hp;
|
||||||
hp = gethostbyname(hostname);
|
hp = roken_gethostbyname(hostname);
|
||||||
if(hp != NULL)
|
if(hp != NULL)
|
||||||
hostname = hp->h_name;
|
hostname = hp->h_name;
|
||||||
}
|
}
|
||||||
|
@@ -180,7 +180,7 @@ krb5_sendto_kdc (krb5_context context,
|
|||||||
if (hostent == NULL)
|
if (hostent == NULL)
|
||||||
hostent = gethostbyname2 (p, AF_INET);
|
hostent = gethostbyname2 (p, AF_INET);
|
||||||
#else
|
#else
|
||||||
hostent = gethostbyname (p);
|
hostent = roken_gethostbyname (p);
|
||||||
#endif
|
#endif
|
||||||
if(hostent == NULL)
|
if(hostent == NULL)
|
||||||
continue;
|
continue;
|
||||||
|
@@ -70,9 +70,9 @@ krb5_sock_to_principal (krb5_context context,
|
|||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
hostent = gethostbyaddr (address.address.data,
|
hostent = roken_gethostbyaddr (address.address.data,
|
||||||
address.address.length,
|
address.address.length,
|
||||||
family);
|
family);
|
||||||
|
|
||||||
if (hostent == NULL)
|
if (hostent == NULL)
|
||||||
return h_errno;
|
return h_errno;
|
||||||
|
Reference in New Issue
Block a user