mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-01 10:06:57 +03:00
resolv: Remove SUNSECURITY preprocessor conditionals
The macro is never defined.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2016-04-28 Florian Weimer <fweimer@redhat.com>
|
||||||
|
|
||||||
|
* resolv/nss_dns/dns-host.c (_nss_dns_gethostbyaddr2_r): Remove
|
||||||
|
SUNSECURITY conditional.
|
||||||
|
* resolv/gethnamaddr.c (gethostbyaddr): Likewise.
|
||||||
|
|
||||||
2016-04-28 Florian Weimer <fweimer@redhat.com>
|
2016-04-28 Florian Weimer <fweimer@redhat.com>
|
||||||
|
|
||||||
* resolv/arpa/nameser.h: Include <sys/types.h> unconditionally.
|
* resolv/arpa/nameser.h: Include <sys/types.h> unconditionally.
|
||||||
|
@ -618,12 +618,6 @@ gethostbyaddr (const void *addr, socklen_t len, int af)
|
|||||||
querybuf *orig_buf;
|
querybuf *orig_buf;
|
||||||
struct hostent *hp;
|
struct hostent *hp;
|
||||||
char qbuf[MAXDNAME+1], *qp = NULL;
|
char qbuf[MAXDNAME+1], *qp = NULL;
|
||||||
#ifdef SUNSECURITY
|
|
||||||
struct hostent *rhp;
|
|
||||||
char **haddr;
|
|
||||||
u_long old_options;
|
|
||||||
char hname2[MAXDNAME+1];
|
|
||||||
#endif /*SUNSECURITY*/
|
|
||||||
|
|
||||||
if (__res_maybe_init (&_res, 0) == -1) {
|
if (__res_maybe_init (&_res, 0) == -1) {
|
||||||
__set_h_errno (NETDB_INTERNAL);
|
__set_h_errno (NETDB_INTERNAL);
|
||||||
@ -699,32 +693,6 @@ gethostbyaddr (const void *addr, socklen_t len, int af)
|
|||||||
free (buf.buf);
|
free (buf.buf);
|
||||||
if (!hp)
|
if (!hp)
|
||||||
return (NULL); /* h_errno was set by getanswer() */
|
return (NULL); /* h_errno was set by getanswer() */
|
||||||
#ifdef SUNSECURITY
|
|
||||||
if (af == AF_INET) {
|
|
||||||
/*
|
|
||||||
* turn off search as the name should be absolute,
|
|
||||||
* 'localhost' should be matched by defnames
|
|
||||||
*/
|
|
||||||
strncpy(hname2, hp->h_name, MAXDNAME);
|
|
||||||
hname2[MAXDNAME] = '\0';
|
|
||||||
old_options = _res.options;
|
|
||||||
_res.options &= ~RES_DNSRCH;
|
|
||||||
_res.options |= RES_DEFNAMES;
|
|
||||||
if (!(rhp = gethostbyname(hname2))) {
|
|
||||||
_res.options = old_options;
|
|
||||||
__set_h_errno (HOST_NOT_FOUND);
|
|
||||||
return (NULL);
|
|
||||||
}
|
|
||||||
_res.options = old_options;
|
|
||||||
for (haddr = rhp->h_addr_list; *haddr; haddr++)
|
|
||||||
if (!memcmp(*haddr, addr, INADDRSZ))
|
|
||||||
break;
|
|
||||||
if (!*haddr) {
|
|
||||||
__set_h_errno (HOST_NOT_FOUND);
|
|
||||||
return (NULL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif /*SUNSECURITY*/
|
|
||||||
hp->h_addrtype = af;
|
hp->h_addrtype = af;
|
||||||
hp->h_length = len;
|
hp->h_length = len;
|
||||||
memmove(host_addr, addr, len);
|
memmove(host_addr, addr, len);
|
||||||
|
@ -520,11 +520,6 @@ _nss_dns_gethostbyaddr2_r (const void *addr, socklen_t len, int af,
|
|||||||
if (status != NSS_STATUS_SUCCESS)
|
if (status != NSS_STATUS_SUCCESS)
|
||||||
return status;
|
return status;
|
||||||
|
|
||||||
#ifdef SUNSECURITY
|
|
||||||
This is not implemented because it is not possible to use the current
|
|
||||||
source from bind in a multi-threaded program.
|
|
||||||
#endif
|
|
||||||
|
|
||||||
result->h_addrtype = af;
|
result->h_addrtype = af;
|
||||||
result->h_length = len;
|
result->h_length = len;
|
||||||
memcpy (host_data->host_addr, addr, len);
|
memcpy (host_data->host_addr, addr, len);
|
||||||
|
Reference in New Issue
Block a user