From 77019eeb5e2c8b357c19a94ecabca13319df66d5 Mon Sep 17 00:00:00 2001 From: Wouter Wijngaards Date: Mon, 3 Dec 2007 08:24:36 +0000 Subject: [PATCH] - changed checkconf/ to smallapp/ to make room for more support tools. (such as unbound-host). - install dirs created with -m 755 because they need to be accessible. - library extensive featurelist added to TODO. - please doxygen, lint. git-svn-id: file:///svn/unbound/trunk@794 be551aaa-1e26-0410-a405-d3ace91eadb9 --- Makefile.in | 20 ++++++++++---------- doc/Changelog | 7 +++++++ doc/TODO | 3 +++ libunbound/unbound.c | 3 +++ libunbound/unbound.h | 9 ++------- {checkconf => smallapp}/unbound-checkconf.c | 0 {checkconf => smallapp}/worker_cb.c | 0 7 files changed, 25 insertions(+), 17 deletions(-) rename {checkconf => smallapp}/unbound-checkconf.c (100%) rename {checkconf => smallapp}/worker_cb.c (100%) diff --git a/Makefile.in b/Makefile.in index d9523d0a0..6a3775382 100644 --- a/Makefile.in +++ b/Makefile.in @@ -62,27 +62,27 @@ COMMON_OBJ=$(addprefix $(BUILD),$(COMMON_SRC:.c=.o)) COMPAT_OBJ=$(addprefix $(BUILD)compat/,$(LIBOBJS)) UNITTEST_SRC=$(patsubst $(srcdir)/%,%, \ $(wildcard $(srcdir)/testcode/unit*.c)) \ - testcode/readhex.c testcode/ldns-testpkts.c checkconf/worker_cb.c \ + testcode/readhex.c testcode/ldns-testpkts.c smallapp/worker_cb.c \ $(COMMON_SRC) UNITTEST_OBJ=$(addprefix $(BUILD),$(UNITTEST_SRC:.c=.o)) $(COMPAT_OBJ) DAEMON_SRC=$(patsubst $(srcdir)/%,%, $(wildcard $(srcdir)/daemon/*.c)) \ $(COMMON_SRC) DAEMON_OBJ=$(addprefix $(BUILD),$(DAEMON_SRC:.c=.o)) $(COMPAT_OBJ) -CHECKCONF_SRC=checkconf/unbound-checkconf.c checkconf/worker_cb.c $(COMMON_SRC) +CHECKCONF_SRC=smallapp/unbound-checkconf.c smallapp/worker_cb.c $(COMMON_SRC) CHECKCONF_OBJ=$(addprefix $(BUILD),$(CHECKCONF_SRC:.c=.o)) $(COMPAT_OBJ) TESTBOUND_SRC=testcode/testbound.c testcode/ldns-testpkts.c \ daemon/worker.c daemon/acl_list.c daemon/daemon.c daemon/stats.c \ testcode/replay.c testcode/fake_event.c $(filter-out util/netevent.c \ services/listen_dnsport.c services/outside_network.c, $(COMMON_SRC)) TESTBOUND_OBJ=$(addprefix $(BUILD),$(TESTBOUND_SRC:.c=.o)) $(COMPAT_OBJ) -LOCKVERIFY_SRC=testcode/lock_verify.c checkconf/worker_cb.c $(COMMON_SRC) +LOCKVERIFY_SRC=testcode/lock_verify.c smallapp/worker_cb.c $(COMMON_SRC) LOCKVERIFY_OBJ=$(addprefix $(BUILD),$(LOCKVERIFY_SRC:.c=.o)) $(COMPAT_OBJ) -PKTVIEW_SRC=testcode/pktview.c testcode/readhex.c checkconf/worker_cb.c \ +PKTVIEW_SRC=testcode/pktview.c testcode/readhex.c smallapp/worker_cb.c \ $(COMMON_SRC) PKTVIEW_OBJ=$(addprefix $(BUILD),$(PKTVIEW_SRC:.c=.o)) $(COMPAT_OBJ) -SIGNIT_SRC=testcode/signit.c checkconf/worker_cb.c $(COMMON_SRC) +SIGNIT_SRC=testcode/signit.c smallapp/worker_cb.c $(COMMON_SRC) SIGNIT_OBJ=$(addprefix $(BUILD),$(SIGNIT_SRC:.c=.o)) $(COMPAT_OBJ) -MEMSTATS_SRC=testcode/memstats.c checkconf/worker_cb.c $(COMMON_SRC) +MEMSTATS_SRC=testcode/memstats.c smallapp/worker_cb.c $(COMMON_SRC) MEMSTATS_OBJ=$(addprefix $(BUILD),$(MEMSTATS_SRC:.c=.o)) $(COMPAT_OBJ) LIBUNBOUND_SRC=$(patsubst $(srcdir)/%,%, \ $(wildcard $(srcdir)/libunbound/*.c) $(COMMON_SRC)) @@ -213,10 +213,10 @@ strip: strip unbound-checkconf install: - $(INSTALL) -d $(bindir) - $(INSTALL) -d $(mandir) - $(INSTALL) -d $(mandir)/man8 - $(INSTALL) -d $(mandir)/man5 + $(INSTALL) -m 755 -d $(bindir) + $(INSTALL) -m 755 -d $(mandir) + $(INSTALL) -m 755 -d $(mandir)/man8 + $(INSTALL) -m 755 -d $(mandir)/man5 $(INSTALL) -m 755 -d $(libdir) $(LIBTOOL) --mode=install cp unbound $(bindir)/unbound $(LIBTOOL) --mode=install cp unbound-checkconf $(bindir)/unbound-checkconf diff --git a/doc/Changelog b/doc/Changelog index 53fde11ee..4e2dd4e9d 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,10 @@ +3 December 2007: Wouter + - changed checkconf/ to smallapp/ to make room for more support tools. + (such as unbound-host). + - install dirs created with -m 755 because they need to be accessible. + - library extensive featurelist added to TODO. + - please doxygen, lint. + 30 November 2007: Wouter - makefile that creates libunbound.la, basic file or libunbound.a when creating static executables (no libtool). diff --git a/doc/TODO b/doc/TODO index 124802664..4c3bcd963 100644 --- a/doc/TODO +++ b/doc/TODO @@ -58,3 +58,6 @@ o check if for PowerDNS(2.9.21) CNAME in Answer section & rcode=NXDOMAIN needs to be fixed up to be rcode=NOERROR? o On Windows use CryptGenRandom() to get random seed for arc4random. o Think about intermediate firewalls dropping EDNS UDP & handling that. +o library add convenience functions for A, AAAA, PTR, getaddrinfo, libresolve. +o library add function to get signature data (or whole reply message). +o library add function to validate input from app that is signed. diff --git a/libunbound/unbound.c b/libunbound/unbound.c index 2810ff3c8..4039f3605 100644 --- a/libunbound/unbound.c +++ b/libunbound/unbound.c @@ -186,12 +186,15 @@ ub_val_ctx_async(struct ub_val_ctx* ctx, int dothread) return UB_NOERROR; } +/** perform a select() on the result read pipe */ static int pollit(struct ub_val_ctx* ctx, struct timeval* t) { fd_set r; +#ifndef S_SPLINT_S FD_ZERO(&r); FD_SET(ctx->rrpipe[0], &r); +#endif if(select(ctx->rrpipe[0]+1, &r, NULL, NULL, t) == -1) { return 0; } diff --git a/libunbound/unbound.h b/libunbound/unbound.h index 82a065482..21be5a574 100644 --- a/libunbound/unbound.h +++ b/libunbound/unbound.h @@ -205,7 +205,7 @@ int ub_val_ctx_config(struct ub_val_ctx* ctx, char* fname); * At this time it is only possible to add trusted keys before the * first resolve is done. * @param ta: string, with zone-format RR on one line. - * + * [domainname] [TTL optional] [type] [class optional] [rdata contents] * @return 0 if OK, else error. */ int ub_val_ctx_add_ta(struct ub_val_ctx* ctx, char* ta); @@ -329,16 +329,11 @@ int ub_val_resolve_async(struct ub_val_ctx* ctx, char* name, int rrtype, * Its callback will not be called. * * @param ctx: context. + * @param async_id: which query to cancel. * @return 0 if OK, else error. */ int ub_val_cancel(struct ub_val_ctx* ctx, int async_id); -/* function to get dns result message in its entirety (a buf) */ -/* convenience function to get A */ -/* convenience to get AAAA */ -/* convenience to get PTR */ -/* convenience to get 'addrinfo', A, AAAA, canonname */ - /** * Free storage associated with a result structure. * @param result: to free diff --git a/checkconf/unbound-checkconf.c b/smallapp/unbound-checkconf.c similarity index 100% rename from checkconf/unbound-checkconf.c rename to smallapp/unbound-checkconf.c diff --git a/checkconf/worker_cb.c b/smallapp/worker_cb.c similarity index 100% rename from checkconf/worker_cb.c rename to smallapp/worker_cb.c -- 2.47.2