summaryrefslogtreecommitdiff
path: root/lib/libwrap
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1997-03-29 04:14:57 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1997-03-29 04:14:57 +0000
commitb569f413f3c5fa6267a2baac4e73eda7284968a2 (patch)
tree86646e1510a8e12fd48b1aaa0a7b5132f07e0bd5 /lib/libwrap
parent2858da924e18fbfe7c9bf52d5ffc4cef16496f56 (diff)
Use getdomainname() not yp_get_default_domain().
Diffstat (limited to 'lib/libwrap')
-rw-r--r--lib/libwrap/hosts_access.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libwrap/hosts_access.c b/lib/libwrap/hosts_access.c
index bb9ca0e4128..7ca0b493511 100644
--- a/lib/libwrap/hosts_access.c
+++ b/lib/libwrap/hosts_access.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hosts_access.c,v 1.1 1997/02/26 03:06:52 downsj Exp $ */
+/* $OpenBSD: hosts_access.c,v 1.2 1997/03/29 04:14:56 millert Exp $ */
/*
* This module implements a simple access control language that is based on
@@ -23,7 +23,7 @@
#if 0
static char sccsid[] = "@(#) hosts_access.c 1.21 97/02/12 02:13:22";
#else
-static char rcsid[] = "$OpenBSD: hosts_access.c,v 1.1 1997/02/26 03:06:52 downsj Exp $";
+static char rcsid[] = "$OpenBSD: hosts_access.c,v 1.2 1997/03/29 04:14:56 millert Exp $";
#endif
#endif
@@ -267,9 +267,9 @@ struct host_info *host;
if (tok[0] == '@') { /* netgroup: look it up */
#ifdef NETGROUP
- static char *mydomain = 0;
- if (mydomain == 0)
- yp_get_default_domain(&mydomain);
+ static char mydomain[MAXHOSTNAMELEN];
+ if (mydomain[0] == '\0')
+ getdomainname(mydomain, sizeof(mydomain));
return (innetgr(tok + 1, eval_hostname(host), (char *) 0, mydomain));
#else
tcpd_warn("netgroup support is disabled"); /* not tcpd_jump() */