diff options
author | Volker Lendecke <vl@samba.org> | 2018-01-01 19:35:46 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2019-01-15 07:53:21 +0100 |
commit | e9e4aeafc0cf7030dbd885710d6e8a179110f9ce (patch) | |
tree | 93b93519135a7b0efd2af4700be3a65be67e220a /source3 | |
parent | ff2dbe24b80b24bdb4897d0152e76ed3931048f2 (diff) | |
download | samba-e9e4aeafc0cf7030dbd885710d6e8a179110f9ce.tar.gz |
libcli/dns: Add resolv.conf parsing
Right now this only looks at the nameserver setting. It is initally made for
asynchronous AD DC lookup routines, where we don't need the "search", "domain"
and other settings. When we convert general "net", "smbclient" and others to
use this, we might either add "domain" handling to this code or look at
something like c-ares which already does it.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3')
-rwxr-xr-x | source3/script/tests/test_resolvconf.sh | 20 | ||||
-rwxr-xr-x | source3/selftest/tests.py | 4 |
2 files changed, 24 insertions, 0 deletions
diff --git a/source3/script/tests/test_resolvconf.sh b/source3/script/tests/test_resolvconf.sh new file mode 100755 index 00000000000..ffe4da9d1f4 --- /dev/null +++ b/source3/script/tests/test_resolvconf.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +incdir=`dirname $0`/../../../testprogs/blackbox +. $incdir/subunit.sh + +if [ ! -x $BINDIR/resolvconftest ] ; then + # Some machines don't have /bin/true, simulate it + cat >$BINDIR/resolvconftest <<EOF +#!/bin/sh +exit 0 +EOF + chmod +x $BINDIR/resolvconftest +fi + +failed=0 + +testit "resolvconf" $VALGRIND $BINDIR/resolvconftest || + failed=`expr $failed + 1` + +testok $0 $failed diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py index c0fde3ad3f0..46f078759e1 100755 --- a/source3/selftest/tests.py +++ b/source3/selftest/tests.py @@ -406,6 +406,10 @@ if with_pthreadpool: "script/tests/test_libwbclient_threads.sh"), "$DOMAIN", "$DC_USERNAME"]) +plantestsuite( + "samba3.resolvconf", "none", + [os.path.join(samba3srcdir, "script/tests/test_resolvconf.sh")]) + plantestsuite("samba3.async_req", "nt4_dc", [os.path.join(samba3srcdir, "script/tests/test_async_req.sh")]) |