Completely remove the Unix Domain Socket support from BIND 9
The Unix Domain Sockets support in BIND 9 has been completely disabled since BIND 9.18 and it has been a fatal error since then. Cleanup the code and the documentation that suggest that Unix Domain Sockets are supported.
This commit is contained in:
committed by
Ondřej Surý
parent
652f2725a0
commit
7aebbec653
@@ -50,11 +50,6 @@ isc_netaddr_equal(const isc_netaddr_t *a, const isc_netaddr_t *b) {
|
||||
return (false);
|
||||
}
|
||||
break;
|
||||
case AF_UNIX:
|
||||
if (strcmp(a->type.un, b->type.un) != 0) {
|
||||
return (false);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return (false);
|
||||
}
|
||||
@@ -141,15 +136,6 @@ isc_netaddr_totext(const isc_netaddr_t *netaddr, isc_buffer_t *target) {
|
||||
case AF_INET6:
|
||||
type = &netaddr->type.in6;
|
||||
break;
|
||||
case AF_UNIX:
|
||||
alen = strlen(netaddr->type.un);
|
||||
if (alen > isc_buffer_availablelength(target)) {
|
||||
return (ISC_R_NOSPACE);
|
||||
}
|
||||
isc_buffer_putmem(target,
|
||||
(const unsigned char *)(netaddr->type.un),
|
||||
alen);
|
||||
return (ISC_R_SUCCESS);
|
||||
default:
|
||||
return (ISC_R_FAILURE);
|
||||
}
|
||||
@@ -308,19 +294,6 @@ isc_netaddr_fromin6(isc_netaddr_t *netaddr, const struct in6_addr *ina6) {
|
||||
netaddr->type.in6 = *ina6;
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
isc_netaddr_frompath(isc_netaddr_t *netaddr, const char *path) {
|
||||
if (strlen(path) > sizeof(netaddr->type.un) - 1) {
|
||||
return (ISC_R_NOSPACE);
|
||||
}
|
||||
|
||||
memset(netaddr, 0, sizeof(*netaddr));
|
||||
netaddr->family = AF_UNIX;
|
||||
strlcpy(netaddr->type.un, path, sizeof(netaddr->type.un));
|
||||
netaddr->zone = 0;
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
void
|
||||
isc_netaddr_setzone(isc_netaddr_t *netaddr, uint32_t zone) {
|
||||
/* we currently only support AF_INET6. */
|
||||
@@ -347,10 +320,6 @@ isc_netaddr_fromsockaddr(isc_netaddr_t *t, const isc_sockaddr_t *s) {
|
||||
memmove(&t->type.in6, &s->type.sin6.sin6_addr, 16);
|
||||
t->zone = s->type.sin6.sin6_scope_id;
|
||||
break;
|
||||
case AF_UNIX:
|
||||
memmove(t->type.un, s->type.sunix.sun_path, sizeof(t->type.un));
|
||||
t->zone = 0;
|
||||
break;
|
||||
default:
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user