summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
Andreas Schneider [Fri, 22 Jun 2018 07:09:38 +0000 (09:09 +0200)]
Rename COPYING to LICENSE
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Andreas Schneider [Fri, 22 Jun 2018 07:06:59 +0000 (09:06 +0200)]
cpack: Do not package build dirs in source tarball
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Andreas Schneider [Fri, 22 Jun 2018 07:08:28 +0000 (09:08 +0200)]
cmake: Replace deprecated get_target_property()
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Andreas Schneider [Tue, 18 Jul 2017 08:23:20 +0000 (10:23 +0200)]
rwrap: Only report a notice when a search doesn't have a result
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Andreas Schneider [Tue, 18 Jul 2017 08:22:38 +0000 (10:22 +0200)]
rwrap: Only warn if we can't open the dns hosts file
It is possible that it hasn't been created yet. At least in Samba when
we start the test environment.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Andreas Schneider [Tue, 18 Jul 2017 08:16:21 +0000 (10:16 +0200)]
rwrap: Add NOTICE as log level
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Andreas Schneider [Tue, 18 Jul 2017 08:12:39 +0000 (10:12 +0200)]
rwrap: Do an early return if log level doesn't match
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Andreas Schneider [Tue, 18 Jul 2017 08:11:22 +0000 (10:11 +0200)]
rwrap: Always enable logging
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Andreas Schneider [Thu, 8 Sep 2016 06:51:03 +0000 (08:51 +0200)]
Bump version to 1.1.5
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Matt Rogers [Thu, 25 Aug 2016 16:59:31 +0000 (12:59 -0400)]
Test a URI query with multiple answers
Signed-off-by: Matt Rogers <mrogers@redhat.com
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Matt Rogers [Thu, 25 Aug 2016 16:57:09 +0000 (12:57 -0400)]
Support multiple URI answers
Add URI record use of recursion to rwrap_get_record(), for collecting
multiple URI answers under a single query. Increase the
RWRAP_MAX_RECURSION limit to handle more URI records.
Signed-off-by: Matt Rogers <mrogers@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Matt Rogers [Tue, 23 Aug 2016 04:56:14 +0000 (00:56 -0400)]
rwrap: Remove name compression from URI RR
Compression is wrong for URI records.
Signed-off-by: Matt Rogers <mrogers@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Jakub Hrozek [Thu, 18 Aug 2016 15:49:00 +0000 (17:49 +0200)]
Add support for the PTR DNS Resource Record type
Signed-off-by: Jakub Hrozek <jakub.hrozek@posteo.se>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Michael Adam [Mon, 29 Aug 2016 06:16:25 +0000 (08:16 +0200)]
rwrap: improve debug error messages
Signed-off-by: Michael Adam <obnox@samba.org>
Nathaniel McCallum [Tue, 16 Aug 2016 21:38:32 +0000 (17:38 -0400)]
Add support for the URI DNS Resource Record type
For more information, see RFC 7553.
Signed-off-by: Nathaniel McCallum <npmccallum@redhat.com>
Reviewed-by: Jakub Hrozek <jakub.hrozek@posteo.se>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Andreas Schneider [Tue, 31 May 2016 06:22:04 +0000 (08:22 +0200)]
Bump version to 1.1.4
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Richard Sharpe [Fri, 20 May 2016 13:36:05 +0000 (06:36 -0700)]
tests: Add a test for the NS record handling.
Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jakub Hrozek <jakub.hrozek@posteo.se>
Richard Sharpe [Fri, 20 May 2016 13:31:32 +0000 (06:31 -0700)]
rwrap: Add support to handle NS records
Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jakub Hrozek <jakub.hrozek@posteo.se>
Andreas Schneider [Wed, 2 Mar 2016 12:08:48 +0000 (13:08 +0100)]
cmake: Add missing HAVE_RESOLV_H define
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Guillaume Xavier Taillon [Tue, 1 Mar 2016 16:13:34 +0000 (11:13 -0500)]
rwrap: AIX compatibility fix, missing headers, bad directive
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11765
Signed-off-by: Guillaume Xavier Taillon <gtaillon@ca.ibm.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Jakub Wilk [Mon, 12 Oct 2015 12:59:01 +0000 (14:59 +0200)]
Fix typos
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Andreas Schneider [Fri, 21 Aug 2015 10:17:45 +0000 (12:17 +0200)]
Bump version to 1.1.3
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Jakub Hrozek [Thu, 20 Aug 2015 09:49:35 +0000 (11:49 +0200)]
tests: Call res_close in res_query and res_search tests
This fixes two memory leaks in the tests.
Signed-off-by: Jakub Hrozek <jakub.hrozek@posteo.se>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Jakub Hrozek [Mon, 9 Feb 2015 16:26:10 +0000 (17:26 +0100)]
doc: Use kinit instead of dig in the manpage example
Signed-off-by: Jakub Hrozek <jakub.hrozek@posteo.se>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Jakub Hrozek [Tue, 18 Aug 2015 09:22:14 +0000 (11:22 +0200)]
tests: Add tests for res_query and res_search
Signed-off-by: Jakub Hrozek <jakub.hrozek@posteo.se>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Jakub Hrozek [Tue, 18 Aug 2015 09:21:59 +0000 (11:21 +0200)]
Change my e-mail address
Signed-off-by: Jakub Hrozek <jakub.hrozek@posteo.se>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Andreas Schneider [Wed, 12 Aug 2015 13:59:53 +0000 (15:59 +0200)]
rwrap: Fix strict aliasing warnings for symbol binding
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Andreas Schneider [Wed, 12 Aug 2015 14:07:27 +0000 (16:07 +0200)]
tests: Migrate to new cmocka API
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Andrew Bartlett [Wed, 12 Aug 2015 01:50:48 +0000 (13:50 +1200)]
Find the correct symbol when res_* is a define to __res_*
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Andreas Schneider [Wed, 25 Feb 2015 10:20:59 +0000 (11:20 +0100)]
cmake: Drop test results via https.
Signed-off-by: Andreas Schneider <asn@samba.org>
Andreas Schneider [Tue, 13 Jan 2015 10:39:13 +0000 (11:39 +0100)]
Bump version to 1.1.2.
Andreas Schneider [Tue, 13 Jan 2015 10:37:31 +0000 (11:37 +0100)]
cmake: Fix ns_name_compress detection.
On some platforms it is a macro and not a function. So we need to check
if the macro exists.
Signed-off-by: Andreas Schneider <asn@samba.org>
Andreas Schneider [Mon, 12 Jan 2015 11:48:38 +0000 (12:48 +0100)]
Bump version to 1.1.1.
Reviewed-by: Guenther Deschner <gd@samba.org>
Andreas Schneider [Mon, 12 Jan 2015 11:45:38 +0000 (12:45 +0100)]
rwrap: Fix a possible NULL dereference.
CID: #84271
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jakub Hrozek <jakub.hrozek@gmail.com>
Reviewed-by: Guenther Deschner <gd@samba.org>
Andreas Schneider [Thu, 8 Jan 2015 15:32:19 +0000 (16:32 +0100)]
rwrap: If we do not have ns_name_compress() use dn_comp().
This should fix older Linux versions which do not export
ns_name_compress(). In newer glibc versions dn_comp() calls
ns_name_compress().
Reviewed-by: Jakub Hrozek <jakub.hrozek@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Tue, 2 Dec 2014 14:43:58 +0000 (15:43 +0100)]
Bump version to 1.1.0.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Jakub Hrozek [Tue, 2 Dec 2014 09:37:01 +0000 (10:37 +0100)]
tests: Add an invalid record to the fake_hosts file for tests
To make sure rwrap is able to skip invalid records as appropriate.
Signed-off-by: Jakub Hrozek <jakub.hrozek@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Jakub Hrozek [Tue, 2 Dec 2014 09:35:49 +0000 (10:35 +0100)]
rwrap: Don't dereference NULL when skipping broken records
CID: 83426
CID: 83425
Signed-off-by: Jakub Hrozek <jakub.hrozek@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Andreas Schneider [Fri, 28 Nov 2014 07:49:12 +0000 (08:49 +0100)]
tests: Define MIN if not available.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Jakub Hrozek [Tue, 25 Nov 2014 17:34:45 +0000 (18:34 +0100)]
tests: Query A record via CNAME
Signed-off-by: Jakub Hrozek <jakub.hrozek@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Jakub Hrozek [Tue, 25 Nov 2014 17:34:28 +0000 (18:34 +0100)]
rwrap: Support asking for A via CNAME
Adds support for querying for an A record using a name that only expands
into a CNAME.
Signed-off-by: Jakub Hrozek <jakub.hrozek@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Jakub Hrozek [Tue, 25 Nov 2014 17:33:29 +0000 (18:33 +0100)]
tests: test that CNAME and SRV records can recurse
Add tests for recursing into a CNAME record.
Signed-off-by: Jakub Hrozek <jakub.hrozek@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Jakub Hrozek [Tue, 25 Nov 2014 17:33:21 +0000 (18:33 +0100)]
rwrap: Recursively add additional data
Change how we construct the fake answer such that the header and
question are added first, then the answers and finally additional data.
Signed-off-by: Jakub Hrozek <jakub.hrozek@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Jakub Hrozek [Tue, 18 Nov 2014 10:33:42 +0000 (11:33 +0100)]
rwrap: Make the rwrap_fake_* functions only fake RRs
The rwrap_fake_common() function did too much. Remove it and use
separate functions to add fake header and question sections. The
rwrap_fake_$RR functions will receive packet including the header and
question and only add its RR data.
This will allow recursive processing later.
Signed-off-by: Jakub Hrozek <jakub.hrozek@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Jakub Hrozek [Sun, 23 Nov 2014 16:40:57 +0000 (17:40 +0100)]
rwrap: CNAME record can recurse into A, AAAA or CNAME
Signed-off-by: Jakub Hrozek <jakub.hrozek@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Jakub Hrozek [Sun, 23 Nov 2014 16:40:32 +0000 (17:40 +0100)]
rwrap: SRV record can recurse into A or AAAA
When querying for a SRV record, we'll need to include A or AAAA records
in additional section. Therefore, keep querying the host file until we
can either recurse the A/AAAA records or reach the recursion limit
Signed-off-by: Jakub Hrozek <jakub.hrozek@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Jakub Hrozek [Sun, 23 Nov 2014 15:57:32 +0000 (16:57 +0100)]
rwrap: Use the rwrap_fake_rr structure instead of raw uint8_t pointers
Currently only one instance of the rwrap_fake_rr structure is used. Recursion
will be implemented in a future patch.
Signed-off-by: Jakub Hrozek <jakub.hrozek@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Jakub Hrozek [Sun, 23 Nov 2014 15:47:55 +0000 (16:47 +0100)]
Add data structures and functions to represent and manipulate RRs
Adds a structure that, using unions represents all supported RRs. Add a
bunch of utility functions that can be used to create these structures.
Currently the functions are unused.
Signed-off-by: Jakub Hrozek <jakub.hrozek@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Andreas Schneider [Wed, 5 Nov 2014 12:48:49 +0000 (13:48 +0100)]
tests: Add a test which talks to real nameservers.
This is to inspect the answer buffer and be able to compare it.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Andreas Schneider [Tue, 4 Nov 2014 16:14:22 +0000 (17:14 +0100)]
rwrap: Correctly calculate the response size and return it.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Andreas Schneider [Tue, 4 Nov 2014 14:20:11 +0000 (15:20 +0100)]
rwrap: Handle trailing dot in dns names.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Jakub Hrozek [Tue, 4 Nov 2014 14:00:17 +0000 (15:00 +0100)]
rwrap: Compare dns names case insensitive.
Signed-off-by: Jakub Hrozek <jakub.hrozek@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Andreas Schneider [Tue, 4 Nov 2014 15:25:02 +0000 (16:25 +0100)]
torture: Increase time to wait for pid file.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Andreas Schneider [Fri, 24 Oct 2014 13:35:19 +0000 (15:35 +0200)]
cmake: Do not remove libresolv from required libraries.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Fri, 24 Oct 2014 08:13:23 +0000 (10:13 +0200)]
Add ChangeLog file.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Fri, 24 Oct 2014 08:13:01 +0000 (10:13 +0200)]
Add Jakub to AUTHORS file.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Fri, 24 Oct 2014 09:16:09 +0000 (11:16 +0200)]
rwrap: Fix the cleanup of the ns ext resources.
We should never set nssocks to something different than -1. And we only
should set it in the init function!
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Thu, 23 Oct 2014 10:41:52 +0000 (12:41 +0200)]
cmake: Fix tests on Solaris.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Thu, 23 Oct 2014 10:30:50 +0000 (12:30 +0200)]
torture: Fix socket directory name.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Thu, 23 Oct 2014 05:51:04 +0000 (07:51 +0200)]
tests: Fix test_res_ninit() with IPv4 only support.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Thu, 23 Oct 2014 05:46:53 +0000 (07:46 +0200)]
rwrap: Fix symbol binding on Solaris.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Jakub Hrozek [Tue, 21 Oct 2014 16:42:44 +0000 (18:42 +0200)]
tests: Use the right array size in tests.
Several unit tests used the wrong array size, which might cause buffer
overflows. This patch unifies on using sizeof(array) since all the
arrays are allocated on stack.
CID #68270
CID #68269
CID #68267
CID #68265
Signed-off-by: Jakub Hrozek <jakub.hrozek@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Jakub Hrozek [Tue, 21 Oct 2014 15:23:30 +0000 (17:23 +0200)]
rwrap: Don't use htons for bitfields.
On FreeBSD, using htons to set the bitfield led to warnings such as:
resolv_wrapper.c:162:8: warning: implicit truncation from '__uint16_t'
(aka 'unsigned short') to bitfield changes value from 256 to 0
[-Wbitfield-constant-conversion]
h->qr = htons(1); /* response flag */
^ ~~~~~~~~
Signed-off-by: Jakub Hrozek <jakub.hrozek@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Jakub Hrozek [Tue, 21 Oct 2014 13:34:28 +0000 (15:34 +0200)]
rwrap: Explicitly zero out sin_zero to silence gcc warnings.
On some platforms, failure to set the sin_zero structure lead to
warnings such as:
resolv_wrapper.c:969:5: warning: missing initializer for field ‘sin_zero’
of ‘struct sockaddr_in’ [-Wmissing-field-initializers]
};
^
In file included from /usr/include/arpa/inet.h:22:0,
from /.../source/src/resolv_wrapper.c:38:
Signed-off-by: Jakub Hrozek <jakub.hrozek@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Jakub Hrozek [Tue, 21 Oct 2014 13:27:54 +0000 (15:27 +0200)]
tests: Call res_nclose() in test_res_query_search.c.
The res_query and res_nsearch unit tests didn't call res_nclose as
appropriate, leading to a resource leak.
Signed-off-by: Jakub Hrozek <jakub.hrozek@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Jakub Hrozek [Tue, 21 Oct 2014 13:11:16 +0000 (15:11 +0200)]
rwrap: Close the resolv.conf file handle.
CID #68264
The file descriptor of resolv.conf wasn't closed properly.
Signed-off-by: Jakub Hrozek <jakub.hrozek@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Jakub Hrozek [Tue, 21 Oct 2014 13:00:36 +0000 (15:00 +0200)]
rwrap: Free IPv6 name servers on close.
rwrap's res_ninit allocates IPv6 name servers, but res_nclose didn't
free them, leading to a resource leak detectable with valgrind.
Signed-off-by: Jakub Hrozek <jakub.hrozek@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Tue, 21 Oct 2014 12:43:48 +0000 (14:43 +0200)]
rwrap: Move NEXT_KEY out of the NDEBUG ifdef.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Sun, 12 Oct 2014 18:04:11 +0000 (20:04 +0200)]
doc: Add section for dns faking to manpage.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Jakub Hrozek [Sat, 4 Oct 2014 16:10:42 +0000 (18:10 +0200)]
resolv: Implement CNAME faking
Signed-off-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Jakub Hrozek [Sat, 4 Oct 2014 15:55:50 +0000 (17:55 +0200)]
resolv: Implement SOA faking
Signed-off-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Jakub Hrozek [Sat, 4 Oct 2014 14:26:58 +0000 (16:26 +0200)]
resolv: Implement SRV faking
Signed-off-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Jakub Hrozek [Sun, 14 Sep 2014 09:12:56 +0000 (11:12 +0200)]
resolv: Implement faking A and AAAA DNS replies
Adds the possibility of faking a DNS reply based on a hosts-like file.
Signed-off-by: Jakub Hrozek <jakub.hrozek@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Tue, 16 Sep 2014 13:37:38 +0000 (15:37 +0200)]
cmake: Rely on the cmake config cmocka provides.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Jakub Hrozek [Fri, 12 Sep 2014 13:49:01 +0000 (15:49 +0200)]
tests: Add a unit test for res_nquery and res_nsearch
Adds a test that connects to a test DNS server and searches it using
res_query and res_search.
Signed-off-by: Jakub Hrozek <jakub.hrozek@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Jakub Hrozek [Sat, 13 Sep 2014 15:09:30 +0000 (17:09 +0200)]
tests: Add generating resolv.conf to torture
Adds a setup/teardown functions that allow a unit test to easily
generate a resolv.conf pointing to our test DNS server.
Signed-off-by: Jakub Hrozek <jakub.hrozek@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Jakub Hrozek [Fri, 12 Sep 2014 12:49:16 +0000 (14:49 +0200)]
tests: Add torture library from socket_wrapper
Pretty much a blatant copy of the torture library from socket_wrapper,
just s/echo_srv/dns_srv/
Signed-off-by: Jakub Hrozek <jakub.hrozek@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Jakub Hrozek [Mon, 8 Sep 2014 07:48:17 +0000 (09:48 +0200)]
tests: Add a simple DNS server
This DNS server will be usable for testing. Currently only supports A
records.
The server responds to any A query with the value of RWRAP_TEST_A_REC
environment variable. If undefined, the server always replies with
127.0.10.10.
Please note the server does *not* perform many security checks and is
completely unsuitable outside a test suite! Check out servers like
dnsmasq for anything more complex.
Signed-off-by: Jakub Hrozek <jakub.hrozek@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Thu, 4 Sep 2014 09:19:04 +0000 (11:19 +0200)]
doc: Update the manpage for resolv.conf.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Michael Adam [Wed, 15 Oct 2014 09:52:08 +0000 (11:52 +0200)]
doc: Add instructions how to point cmake to socket_wrapper
This is needed for unit testing.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Jakub Hrozek [Wed, 3 Sep 2014 15:32:27 +0000 (17:32 +0200)]
tests: Add a test for parsing resolv.conf
Signed-off-by: Jakub Hrozek <jakub.hrozek@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Jakub Hrozek [Wed, 3 Sep 2014 12:34:15 +0000 (14:34 +0200)]
rwrap: Add support to read a resolv.conf.
For now, only "nameserver" entries are interpreted.
Pair-Programmed-With: Andreas Schneider <asn@samba.org>
Signed-off-by: Jakub Hrozek <jakub.hrozek@gmail.com>
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Tue, 2 Sep 2014 12:19:32 +0000 (14:19 +0200)]
rwrap: Add support for res_[n]search().
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Tue, 2 Sep 2014 12:06:00 +0000 (14:06 +0200)]
rwrap: Add support for res_[n]query().
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Mon, 1 Sep 2014 15:23:13 +0000 (17:23 +0200)]
rwrap: Add support for res_nclose().
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Mon, 1 Sep 2014 10:41:17 +0000 (12:41 +0200)]
rwrap: Add initial support for res_[n]init().
This first approach does not parse a resolv.conf file
but instead takes a nameserver address from the environment
variable RESOLV_WRAPPER_NAMESERVER.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Thu, 4 Sep 2014 05:57:11 +0000 (07:57 +0200)]
rwrap: Add .gitignore.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Thu, 28 Aug 2014 15:47:06 +0000 (17:47 +0200)]
rwrap: Big bang!
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>