mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
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
@@ -136,25 +136,6 @@ isc_sockaddr_totext(const isc_sockaddr_t *sockaddr, isc_buffer_t *target) {
|
||||
snprintf(pbuf, sizeof(pbuf), "%u",
|
||||
ntohs(sockaddr->type.sin6.sin6_port));
|
||||
break;
|
||||
case AF_UNIX:
|
||||
plen = strlen(sockaddr->type.sunix.sun_path);
|
||||
if (plen >= isc_buffer_availablelength(target)) {
|
||||
return (ISC_R_NOSPACE);
|
||||
}
|
||||
|
||||
isc_buffer_putmem(
|
||||
target,
|
||||
(const unsigned char *)sockaddr->type.sunix.sun_path,
|
||||
plen);
|
||||
|
||||
/*
|
||||
* Null terminate after used region.
|
||||
*/
|
||||
isc_buffer_availableregion(target, &avail);
|
||||
INSIST(avail.length >= 1);
|
||||
avail.base[0] = '\0';
|
||||
|
||||
return (ISC_R_SUCCESS);
|
||||
default:
|
||||
return (ISC_R_FAILURE);
|
||||
}
|
||||
@@ -460,19 +441,6 @@ isc_sockaddr_isnetzero(const isc_sockaddr_t *sockaddr) {
|
||||
return (false);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
isc_sockaddr_frompath(isc_sockaddr_t *sockaddr, const char *path) {
|
||||
if (strlen(path) >= sizeof(sockaddr->type.sunix.sun_path)) {
|
||||
return (ISC_R_NOSPACE);
|
||||
}
|
||||
memset(sockaddr, 0, sizeof(*sockaddr));
|
||||
sockaddr->length = sizeof(sockaddr->type.sunix);
|
||||
sockaddr->type.sunix.sun_family = AF_UNIX;
|
||||
strlcpy(sockaddr->type.sunix.sun_path, path,
|
||||
sizeof(sockaddr->type.sunix.sun_path));
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
isc_sockaddr_fromsockaddr(isc_sockaddr_t *isa, const struct sockaddr *sa) {
|
||||
unsigned int length = 0;
|
||||
@@ -484,9 +452,6 @@ isc_sockaddr_fromsockaddr(isc_sockaddr_t *isa, const struct sockaddr *sa) {
|
||||
case AF_INET6:
|
||||
length = sizeof(isa->type.sin6);
|
||||
break;
|
||||
case AF_UNIX:
|
||||
length = sizeof(isa->type.sunix);
|
||||
break;
|
||||
default:
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
Reference in New Issue
Block a user