mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-16 15:11:52 +00:00
Use same configuration file, /etc/host.conf, for both gethost* and
getnet* configuration. (It's highly unlikely that you'd want to do something different, and network lookups aren't common enough to justify their own configuration file.)
This commit is contained in:
parent
d2920e07e6
commit
f64c928f58
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=3136
@ -24,8 +24,8 @@
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
static char sccsid[] = "@(#)$Id$";
|
||||
static char rcsid[] = "$Id$";
|
||||
static char sccsid[] = "@(#)$Id: getnetnamadr.c,v 1.1 1994/09/25 02:12:29 pst Exp $";
|
||||
static char rcsid[] = "$Id: getnetnamadr.c,v 1.1 1994/09/25 02:12:29 pst Exp $";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -45,7 +45,9 @@ extern struct netent * _getnetbyhtaddr __P((long, int));
|
||||
extern struct netent * _getnetbydnsaddr __P((long, int));
|
||||
extern struct netent * _getnetbynisaddr __P((long, int));
|
||||
|
||||
#define _PATH_NETCONF "/etc/net.conf"
|
||||
#ifndef _PATH_NETCONF
|
||||
#define _PATH_NETCONF "/etc/host.conf"
|
||||
#endif
|
||||
|
||||
enum service_type {
|
||||
SERVICE_NONE = 0,
|
||||
@ -58,10 +60,10 @@ static struct {
|
||||
const char *name;
|
||||
enum service_type type;
|
||||
} service_names[] = {
|
||||
{ "nets", SERVICE_TABLE },
|
||||
{ "/etc/nets", SERVICE_TABLE },
|
||||
{ "nettable", SERVICE_TABLE },
|
||||
{ "ntable", SERVICE_TABLE },
|
||||
{ "hosts", SERVICE_TABLE },
|
||||
{ "/etc/hosts", SERVICE_TABLE },
|
||||
{ "hosttable", SERVICE_TABLE },
|
||||
{ "htable", SERVICE_TABLE },
|
||||
{ "bind", SERVICE_BIND },
|
||||
{ "dns", SERVICE_BIND },
|
||||
{ "domain", SERVICE_BIND },
|
||||
|
Loading…
Reference in New Issue
Block a user