mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-03 22:08:25 -04:00
Merge branch 'fanf-prune-libbind9' into 'main'
Move the last bits of libbind9 into libisc See merge request isc-projects/bind9!7462
This commit is contained in:
commit
caafb15e1e
23 changed files with 34 additions and 98 deletions
3
CHANGES
3
CHANGES
|
|
@ -1,3 +1,6 @@
|
|||
6106. [cleanup] Move bind9_getaddresses() to isc_getaddresses()
|
||||
and remove the now empty libbind9. [GL !7462]
|
||||
|
||||
6105. [bug] Detach 'rpzs' and 'catzs' from the previous view in
|
||||
configure_rpz() and configure_catz(), respectively,
|
||||
just after attaching it to the new view. [GL #3880]
|
||||
|
|
|
|||
|
|
@ -57,9 +57,3 @@ LIBISCCC_CFLAGS = \
|
|||
|
||||
LIBISCCC_LIBS = \
|
||||
$(top_builddir)/lib/isccc/libisccc.la
|
||||
|
||||
LIBBIND9_CFLAGS = \
|
||||
-I$(top_srcdir)/lib/bind9/include
|
||||
|
||||
LIBBIND9_LIBS = \
|
||||
$(top_builddir)/lib/bind9/libbind9.la
|
||||
|
|
|
|||
|
|
@ -4,8 +4,7 @@ AM_CPPFLAGS += \
|
|||
$(LIBISC_CFLAGS) \
|
||||
$(LIBDNS_CFLAGS) \
|
||||
$(LIBNS_CFLAGS) \
|
||||
$(LIBISCCFG_CFLAGS) \
|
||||
$(LIBBIND9_CFLAGS)
|
||||
$(LIBISCCFG_CFLAGS)
|
||||
|
||||
AM_CPPFLAGS += \
|
||||
-DNAMED_CONFFILE=\"${sysconfdir}/named.conf\"
|
||||
|
|
@ -21,8 +20,7 @@ LDADD += \
|
|||
$(LIBISC_LIBS) \
|
||||
$(LIBDNS_LIBS) \
|
||||
$(LIBNS_LIBS) \
|
||||
$(LIBISCCFG_LIBS) \
|
||||
$(LIBBIND9_LIBS)
|
||||
$(LIBISCCFG_LIBS)
|
||||
|
||||
bin_PROGRAMS = named-checkconf named-checkzone
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ AM_CPPFLAGS += \
|
|||
$(LIBDNS_CFLAGS) \
|
||||
$(LIBISCCFG_CFLAGS) \
|
||||
$(LIBIRS_CFLAGS) \
|
||||
$(LIBBIND9_CFLAGS) \
|
||||
$(LIBIDN2_CFLAGS) \
|
||||
$(LIBUV_CFLAGS)
|
||||
|
||||
|
|
@ -15,7 +14,6 @@ LDADD += \
|
|||
$(LIBDNS_LIBS) \
|
||||
$(LIBISCCFG_LIBS) \
|
||||
$(LIBIRS_LIBS) \
|
||||
$(LIBBIND9_LIBS) \
|
||||
$(LIBIDN2_LIBS)
|
||||
|
||||
noinst_LTLIBRARIES = libdighost.la
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@
|
|||
|
||||
#include <isc/base64.h>
|
||||
#include <isc/file.h>
|
||||
#include <isc/getaddresses.h>
|
||||
#include <isc/hex.h>
|
||||
#include <isc/lang.h>
|
||||
#include <isc/log.h>
|
||||
|
|
@ -79,8 +80,6 @@
|
|||
|
||||
#include <irs/resconf.h>
|
||||
|
||||
#include <bind9/getaddresses.h>
|
||||
|
||||
#include "dighost.h"
|
||||
|
||||
#define systemlocale(l) (void)setlocale(l, "")
|
||||
|
|
@ -534,8 +533,7 @@ set_nameserver(char *opt) {
|
|||
}
|
||||
|
||||
isc_loopmgr_blocking(loopmgr);
|
||||
result = bind9_getaddresses(opt, 0, sockaddrs, DIG_MAX_ADDRESSES,
|
||||
&count);
|
||||
result = isc_getaddresses(opt, 0, sockaddrs, DIG_MAX_ADDRESSES, &count);
|
||||
isc_loopmgr_nonblocking(loopmgr);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fatal("couldn't get address for '%s': %s", opt,
|
||||
|
|
@ -4528,7 +4526,7 @@ get_address(char *host, in_port_t myport, isc_sockaddr_t *sockaddr) {
|
|||
isc_result_t result;
|
||||
|
||||
isc_loopmgr_blocking(loopmgr);
|
||||
result = bind9_getaddresses(host, myport, sockaddr, 1, &count);
|
||||
result = isc_getaddresses(host, myport, sockaddr, 1, &count);
|
||||
isc_loopmgr_nonblocking(loopmgr);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
return (result);
|
||||
|
|
@ -4549,8 +4547,8 @@ getaddresses(dig_lookup_t *lookup, const char *host, isc_result_t *resultp) {
|
|||
char tmp[ISC_NETADDR_FORMATSIZE];
|
||||
|
||||
isc_loopmgr_blocking(loopmgr);
|
||||
result = bind9_getaddresses(host, 0, sockaddrs, DIG_MAX_ADDRESSES,
|
||||
&count);
|
||||
result = isc_getaddresses(host, 0, sockaddrs, DIG_MAX_ADDRESSES,
|
||||
&count);
|
||||
isc_loopmgr_nonblocking(loopmgr);
|
||||
if (resultp != NULL) {
|
||||
*resultp = result;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ AM_CPPFLAGS += \
|
|||
$(LIBNS_CFLAGS) \
|
||||
$(LIBISCCC_CFLAGS) \
|
||||
$(LIBISCCFG_CFLAGS) \
|
||||
$(LIBBIND9_CFLAGS) \
|
||||
$(OPENSSL_CFLAGS) \
|
||||
$(LIBCAP_CFLAGS) \
|
||||
$(LMDB_CFLAGS) \
|
||||
|
|
@ -103,7 +102,6 @@ named_LDADD = \
|
|||
$(LIBNS_LIBS) \
|
||||
$(LIBISCCC_LIBS) \
|
||||
$(LIBISCCFG_LIBS) \
|
||||
$(LIBBIND9_LIBS) \
|
||||
$(OPENSSL_LIBS) \
|
||||
$(LIBCAP_LIBS) \
|
||||
$(LMDB_LIBS) \
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ AM_CPPFLAGS += \
|
|||
$(LIBDNS_CFLAGS) \
|
||||
$(LIBISCCFG_CFLAGS) \
|
||||
$(LIBIRS_CFLAGS) \
|
||||
$(LIBBIND9_CFLAGS) \
|
||||
$(GSSAPI_CFLAGS) \
|
||||
$(KRB5_CFLAGS) \
|
||||
$(READLINE_CFLAGS)
|
||||
|
|
@ -18,7 +17,6 @@ LDADD += \
|
|||
$(LIBDNS_LIBS) \
|
||||
$(LIBISCCFG_LIBS) \
|
||||
$(LIBIRS_LIBS) \
|
||||
$(LIBBIND9_LIBS) \
|
||||
$(GSSAPI_LIBS) \
|
||||
$(KRB5_LIBS)
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@
|
|||
#include <isc/buffer.h>
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/file.h>
|
||||
#include <isc/getaddresses.h>
|
||||
#include <isc/hash.h>
|
||||
#include <isc/job.h>
|
||||
#include <isc/lex.h>
|
||||
|
|
@ -91,8 +92,6 @@
|
|||
|
||||
#endif /* HAVE_GSSAPI */
|
||||
|
||||
#include <bind9/getaddresses.h>
|
||||
|
||||
#include "../dig/readline.h"
|
||||
|
||||
#define MAXCMD (128 * 1024)
|
||||
|
|
@ -104,7 +103,7 @@
|
|||
|
||||
#define DNSDEFAULTPORT 53
|
||||
|
||||
/* Number of addresses to request from bind9_getaddresses() */
|
||||
/* Number of addresses to request from isc_getaddresses() */
|
||||
#define MAX_SERVERADDRS 4
|
||||
|
||||
static uint16_t dnsport = DNSDEFAULTPORT;
|
||||
|
|
@ -1008,7 +1007,7 @@ get_addresses(char *host, in_port_t port, isc_sockaddr_t *sockaddr,
|
|||
isc_result_t result;
|
||||
|
||||
isc_loopmgr_blocking(loopmgr);
|
||||
result = bind9_getaddresses(host, port, sockaddr, naddrs, &count);
|
||||
result = isc_getaddresses(host, port, sockaddr, naddrs, &count);
|
||||
isc_loopmgr_nonblocking(loopmgr);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
error("couldn't get address for '%s': %s", host,
|
||||
|
|
|
|||
|
|
@ -4,8 +4,7 @@ AM_CPPFLAGS += \
|
|||
$(LIBISC_CFLAGS) \
|
||||
$(LIBDNS_CFLAGS) \
|
||||
$(LIBISCCFG_CFLAGS) \
|
||||
$(LIBISCCC_CFLAGS) \
|
||||
$(LIBBIND9_CFLAGS)
|
||||
$(LIBISCCC_CFLAGS)
|
||||
|
||||
AM_CPPFLAGS += \
|
||||
-DRNDC_CONFFILE=\"${sysconfdir}/rndc.conf\" \
|
||||
|
|
@ -22,5 +21,4 @@ rndc_LDADD = \
|
|||
$(LIBISC_LIBS) \
|
||||
$(LIBDNS_LIBS) \
|
||||
$(LIBISCCC_LIBS) \
|
||||
$(LIBISCCFG_LIBS) \
|
||||
$(LIBBIND9_LIBS)
|
||||
$(LIBISCCFG_LIBS)
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
#include <isc/buffer.h>
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/file.h>
|
||||
#include <isc/getaddresses.h>
|
||||
#include <isc/log.h>
|
||||
#include <isc/loop.h>
|
||||
#include <isc/managers.h>
|
||||
|
|
@ -48,8 +49,6 @@
|
|||
|
||||
#include <isccfg/namedconf.h>
|
||||
|
||||
#include <bind9/getaddresses.h>
|
||||
|
||||
#include "util.h"
|
||||
|
||||
#define SERVERADDRS 10
|
||||
|
|
@ -278,7 +277,7 @@ get_addresses(const char *host, in_port_t port) {
|
|||
}
|
||||
} else {
|
||||
count = SERVERADDRS - nserveraddrs;
|
||||
result = bind9_getaddresses(
|
||||
result = isc_getaddresses(
|
||||
host, port, &serveraddrs[nserveraddrs], count, &found);
|
||||
nserveraddrs += found;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,16 +18,6 @@ bin_PROGRAMS = \
|
|||
arpaname_LDADD = \
|
||||
$(LIBISC_LIBS)
|
||||
|
||||
mdig_CPPFLAGS = \
|
||||
$(AM_CPPFLAGS) \
|
||||
$(LIBBIND9_CFLAGS)
|
||||
|
||||
mdig_LDADD = \
|
||||
$(LIBBIND9_LIBS) \
|
||||
$(LIBISCCFG_LIBS) \
|
||||
$(LIBDNS_LIBS) \
|
||||
$(LIBISC_LIBS)
|
||||
|
||||
if HAVE_DNSTAP
|
||||
bin_PROGRAMS += \
|
||||
dnstap-read
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
#include <isc/attributes.h>
|
||||
#include <isc/base64.h>
|
||||
#include <isc/getaddresses.h>
|
||||
#include <isc/hash.h>
|
||||
#include <isc/hex.h>
|
||||
#include <isc/log.h>
|
||||
|
|
@ -51,8 +52,6 @@
|
|||
#include <dns/types.h>
|
||||
#include <dns/view.h>
|
||||
|
||||
#include <bind9/getaddresses.h>
|
||||
|
||||
#define CHECK(str, x) \
|
||||
{ \
|
||||
if ((x) != ISC_R_SUCCESS) { \
|
||||
|
|
@ -2109,7 +2108,7 @@ main(int argc, char *argv[]) {
|
|||
}
|
||||
|
||||
ns = 0;
|
||||
result = bind9_getaddresses(server, port, &dstaddr, 1, &ns);
|
||||
result = isc_getaddresses(server, port, &dstaddr, 1, &ns);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fatal("couldn't get address for '%s': %s", server,
|
||||
isc_result_totext(result));
|
||||
|
|
|
|||
|
|
@ -1560,8 +1560,7 @@ AC_CONFIG_FILES([lib/Makefile
|
|||
lib/ns/Makefile
|
||||
lib/irs/Makefile
|
||||
lib/isccfg/Makefile
|
||||
lib/isccc/Makefile
|
||||
lib/bind9/Makefile])
|
||||
lib/isccc/Makefile])
|
||||
|
||||
# Documentation
|
||||
|
||||
|
|
|
|||
|
|
@ -268,11 +268,8 @@ libraries.
|
|||
* `bind9/lib/dns`: implements higher-level DNS functionality:
|
||||
red-black trees, rdatasets, views, zones, ACLs, resolver, validator, etc
|
||||
* `bind9/lib/dns/tests`: unit tests for libdns
|
||||
* `bind9/lib/bind9`: library implementing bind9-specific functionality,
|
||||
principally configuration validity checking (used in `named` and
|
||||
`named-checkconf` when reading `named.conf`).
|
||||
* `bind9/lib/isccfg`: library implementing the `named.conf`
|
||||
configuration parser.
|
||||
configuration parser and checker.
|
||||
* `bind9/lib/isccc`: library implementing the control channel used
|
||||
by `rndc`
|
||||
* `bind9/lib/irs`: provides mechanisms for reading `/etc/resolv.conf`
|
||||
|
|
|
|||
|
|
@ -475,7 +475,6 @@ INPUT = @BIND9_TOP_BUILDDIR@/lib/isc \
|
|||
@BIND9_TOP_BUILDDIR@/lib/isccfg \
|
||||
@BIND9_TOP_BUILDDIR@/lib/isccc \
|
||||
@BIND9_TOP_BUILDDIR@/lib/ns \
|
||||
@BIND9_TOP_BUILDDIR@/lib/bind9 \
|
||||
@BIND9_TOP_BUILDDIR@/bin/check \
|
||||
@BIND9_TOP_BUILDDIR@/bin/dig \
|
||||
@BIND9_TOP_BUILDDIR@/bin/dnssec \
|
||||
|
|
|
|||
|
|
@ -29,6 +29,10 @@ Removed Features
|
|||
A C11 compliant compiler (or better) is now required to compile BIND 9.
|
||||
:gl:`#3729`
|
||||
|
||||
- The functions that were in the ``libbind9`` shared library have been
|
||||
moved to the ``libisc`` and ``libisccfg`` libraries, and the
|
||||
now-empty ``libbind9`` has been removed and is no longer installed.
|
||||
|
||||
Feature Changes
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
include $(top_srcdir)/Makefile.top
|
||||
|
||||
SUBDIRS = isc dns isccc ns isccfg bind9 irs
|
||||
SUBDIRS = isc dns isccc ns isccfg irs
|
||||
|
|
|
|||
|
|
@ -1,35 +0,0 @@
|
|||
include $(top_srcdir)/Makefile.top
|
||||
|
||||
lib_LTLIBRARIES = libbind9.la
|
||||
|
||||
libbind9_ladir = $(includedir)/bind9
|
||||
|
||||
libbind9_la_HEADERS = \
|
||||
include/bind9/getaddresses.h
|
||||
|
||||
libbind9_la_SOURCES = \
|
||||
$(libbind9_la_HEADERS) \
|
||||
getaddresses.c
|
||||
|
||||
libbind9_la_CPPFLAGS = \
|
||||
$(AM_CPPFLAGS) \
|
||||
$(LIBISC_CFLAGS) \
|
||||
$(LIBDNS_CFLAGS) \
|
||||
$(LIBISCCFG_CFLAGS) \
|
||||
$(LIBNS_CFLAGS) \
|
||||
$(LIBBIND9_CFLAGS) \
|
||||
$(OPENSSL_CFLAGS)
|
||||
|
||||
libbind9_la_LIBADD = \
|
||||
$(LIBNS_LIBS) \
|
||||
$(LIBISCCFG_LIBS) \
|
||||
$(LIBDNS_LIBS) \
|
||||
$(LIBISC_LIBS)
|
||||
|
||||
libbind9_la_LDFLAGS = \
|
||||
$(AM_LDFLAGS) \
|
||||
-release "$(PACKAGE_VERSION)"
|
||||
|
||||
if HAVE_DNSTAP
|
||||
libbind9_la_CPPFLAGS += $(DNSTAP_CFLAGS)
|
||||
endif
|
||||
|
|
@ -1 +0,0 @@
|
|||
../../../.clang-format.headers
|
||||
|
|
@ -31,6 +31,7 @@ libisc_la_HEADERS = \
|
|||
include/isc/formatcheck.h \
|
||||
include/isc/fsaccess.h \
|
||||
include/isc/fuzz.h \
|
||||
include/isc/getaddresses.h \
|
||||
include/isc/glob.h \
|
||||
include/isc/hash.h \
|
||||
include/isc/hashmap.h \
|
||||
|
|
@ -130,6 +131,7 @@ libisc_la_SOURCES = \
|
|||
fsaccess.c \
|
||||
fsaccess_common.c \
|
||||
fsaccess_common_p.h \
|
||||
getaddresses.c \
|
||||
glob.c \
|
||||
hash.c \
|
||||
hashmap.c \
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <isc/getaddresses.h>
|
||||
#include <isc/net.h>
|
||||
#include <isc/netaddr.h>
|
||||
#include <isc/netscope.h>
|
||||
|
|
@ -26,11 +27,9 @@
|
|||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <bind9/getaddresses.h>
|
||||
|
||||
isc_result_t
|
||||
bind9_getaddresses(const char *hostname, in_port_t port, isc_sockaddr_t *addrs,
|
||||
int addrsize, int *addrcount) {
|
||||
isc_getaddresses(const char *hostname, in_port_t port, isc_sockaddr_t *addrs,
|
||||
int addrsize, int *addrcount) {
|
||||
struct in_addr in4;
|
||||
struct in6_addr in6;
|
||||
bool have_ipv4, have_ipv6;
|
||||
|
|
@ -22,8 +22,8 @@
|
|||
ISC_LANG_BEGINDECLS
|
||||
|
||||
isc_result_t
|
||||
bind9_getaddresses(const char *hostname, in_port_t port, isc_sockaddr_t *addrs,
|
||||
int addrsize, int *addrcount);
|
||||
isc_getaddresses(const char *hostname, in_port_t port, isc_sockaddr_t *addrs,
|
||||
int addrsize, int *addrcount);
|
||||
/*%<
|
||||
* Use the system resolver to get the addresses associated with a hostname.
|
||||
* If successful, the number of addresses found is returned in 'addrcount'.
|
||||
|
|
@ -2926,7 +2926,7 @@ token_addr(cfg_parser_t *pctx, unsigned int flags, isc_netaddr_t *na) {
|
|||
}
|
||||
}
|
||||
if ((flags & CFG_ADDR_V6OK) != 0 && strlen(s) <= 127U) {
|
||||
char buf[128]; /* see lib/bind9/getaddresses.c */
|
||||
char buf[128]; /* see isc_getaddresses() */
|
||||
char *d; /* zone delimiter */
|
||||
uint32_t zone = 0; /* scope zone ID */
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue