-/* $OpenBSD: asr.c,v 1.35 2015/01/16 16:48:51 deraadt Exp $ */
+/* $OpenBSD: asr.c,v 1.36 2015/05/26 19:28:57 eric Exp $ */
/*
* Copyright (c) 2010-2012 Eric Faurot <eric@openbsd.org>
*
#endif
#define DEFAULT_CONFFILE "/etc/resolv.conf"
-#define DEFAULT_HOSTFILE "/etc/hosts"
#define DEFAULT_CONF "lookup file\n"
#define DEFAULT_LOOKUP "lookup bind file"
ac->ac_family[1] = AF_INET6;
ac->ac_family[2] = -1;
- ac->ac_hostfile = DEFAULT_HOSTFILE;
-
ac->ac_nscount = 0;
ac->ac_nstimeout = 5;
ac->ac_nsretries = 4;
-/* $OpenBSD: asr_debug.c,v 1.17 2014/03/26 18:13:15 eric Exp $ */
+/* $OpenBSD: asr_debug.c,v 1.18 2015/05/26 19:28:57 eric Exp $ */
/*
* Copyright (c) 2012 Eric Faurot <eric@openbsd.org>
*
for (i = 0; i < ac->ac_nscount; i++)
fprintf(f, " %s\n", print_sockaddr(ac->ac_ns[i], buf,
sizeof buf));
- fprintf(f, "HOSTFILE %s\n", ac->ac_hostfile);
fprintf(f, "LOOKUP %s", ac->ac_db);
fprintf(f, "\n------------------------------------\n");
}
-/* $OpenBSD: asr_private.h,v 1.27 2015/02/14 20:15:05 jca Exp $ */
+/* $OpenBSD: asr_private.h,v 1.28 2015/05/26 19:28:57 eric Exp $ */
/*
* Copyright (c) 2012 Eric Faurot <eric@openbsd.org>
*
char ac_db[ASR_MAXDB + 1];
int ac_family[3];
- char *ac_hostfile;
-
int ac_nscount;
int ac_nstimeout;
int ac_nsretries;
-/* $OpenBSD: getaddrinfo_async.c,v 1.38 2015/05/25 21:59:37 jca Exp $ */
+/* $OpenBSD: getaddrinfo_async.c,v 1.39 2015/05/26 19:28:57 eric Exp $ */
/*
* Copyright (c) 2012 Eric Faurot <eric@openbsd.org>
*
break;
case ASR_DB_FILE:
- f = fopen(as->as_ctx->ac_hostfile, "re");
+ f = fopen(_PATH_HOSTS, "re");
if (f == NULL) {
async_set_state(as, ASR_STATE_NEXT_DB);
break;
-/* $OpenBSD: gethostnamadr_async.c,v 1.35 2015/03/02 14:22:48 brynet Exp $ */
+/* $OpenBSD: gethostnamadr_async.c,v 1.36 2015/05/26 19:28:57 eric Exp $ */
/*
* Copyright (c) 2012 Eric Faurot <eric@openbsd.org>
*
/* Try to find a match in the host file */
- if ((f = fopen(as->as_ctx->ac_hostfile, "re")) == NULL)
+ if ((f = fopen(_PATH_HOSTS, "re")) == NULL)
break;
if (as->as_type == ASR_GETHOSTBYNAME) {