summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Faurot <eric@cvs.openbsd.org>2013-03-30 20:00:09 +0000
committerEric Faurot <eric@cvs.openbsd.org>2013-03-30 20:00:09 +0000
commit1d2bb98afe727a57333ce5cdcdb81a930b726185 (patch)
treea33410ef79489b8bc7d1d534e4185bd503c7eeac
parent6962e1ef12ad2ee6194530e2f530d63ca8ca421e (diff)
Do not assume local nameserver if resolv.conf doesn't exist, just use
/etc/hosts. discussed with deraadt@
-rw-r--r--lib/libc/asr/asr.c4
-rw-r--r--lib/libc/asr/async_resolver.311
2 files changed, 7 insertions, 8 deletions
diff --git a/lib/libc/asr/asr.c b/lib/libc/asr/asr.c
index 8d47653226c..ecf31322248 100644
--- a/lib/libc/asr/asr.c
+++ b/lib/libc/asr/asr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: asr.c,v 1.16 2013/03/30 08:06:42 otto Exp $ */
+/* $OpenBSD: asr.c,v 1.17 2013/03/30 20:00:08 eric Exp $ */
/*
* Copyright (c) 2010-2012 Eric Faurot <eric@openbsd.org>
*
@@ -57,7 +57,7 @@
#define DEFAULT_CONFFILE "/etc/resolv.conf"
#define DEFAULT_HOSTFILE "/etc/hosts"
-#define DEFAULT_CONF "lookup bind file\nnameserver 127.0.0.1\n"
+#define DEFAULT_CONF "lookup file\n"
#define DEFAULT_LOOKUP "lookup bind file"
#define RELOAD_DELAY 15 /* seconds */
diff --git a/lib/libc/asr/async_resolver.3 b/lib/libc/asr/async_resolver.3
index 202346fe7f3..b750e382ca4 100644
--- a/lib/libc/asr/async_resolver.3
+++ b/lib/libc/asr/async_resolver.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: async_resolver.3,v 1.8 2013/03/27 16:21:22 jmc Exp $
+.\" $OpenBSD: async_resolver.3,v 1.9 2013/03/30 20:00:08 eric Exp $
.\"
.\" Copyright (c) 2012, Eric Faurot <eric@openbsd.org>
.\"
@@ -14,7 +14,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: March 27 2013 $
+.Dd $Mdocdate: March 30 2013 $
.Dt ASYN_RESOLVER 3
.Os
.Sh NAME
@@ -106,11 +106,10 @@ file is used.
The context tracks file changes to automatically update its configuration
if needed, replacing the current setup if a valid one can be reloaded from
the file.
-If a configuration file cannot be loaded at context creation time, it falls
-back to the equivalent of:
+If the configuration file cannot be loaded at context creation time, it falls
+back to:
.Bd -literal -offset indent
-lookup bind file
-nameserver 127.0.0.1
+lookup file
.Ed
.Pp
If the first character of the