From e755eb28ce74f65c182ae68bbe63d94d45c5bad0 Mon Sep 17 00:00:00 2001 From: drochner Date: Mon, 18 Jan 1999 19:47:36 +0000 Subject: [PATCH] fix the use of the libwrap methods: -fromhost() doesn't work because the file descriptor isn't available at this point, see PR bin/6813 -it needs some initialization for libwrap to grok the IP address and/or host names in its rule files (see PR bin/6831 by Andreas Wrede , the fix is different) Needless to say that libwrap's interface sucks. --- usr.sbin/portmap/portmap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/portmap/portmap.c b/usr.sbin/portmap/portmap.c index 257a762da45d..0d7155f245fc 100644 --- a/usr.sbin/portmap/portmap.c +++ b/usr.sbin/portmap/portmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: portmap.c,v 1.16 1999/01/16 20:59:05 hannken Exp $ */ +/* $NetBSD: portmap.c,v 1.17 1999/01/18 19:47:36 drochner Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -44,7 +44,7 @@ __COPYRIGHT( #if 0 static char sccsid[] = "@(#)portmap.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: portmap.c,v 1.16 1999/01/16 20:59:05 hannken Exp $"); +__RCSID("$NetBSD: portmap.c,v 1.17 1999/01/18 19:47:36 drochner Exp $"); #endif #endif /* not lint */ @@ -660,7 +660,7 @@ check_access(addr, proc, prog) #ifdef LIBWRAP request_init(&req, RQ_DAEMON, "portmap", RQ_CLIENT_SIN, addr, 0); - fromhost(&req); + sock_methods(&req); if(!hosts_access(&req)) { logit(deny_severity, addr, proc, prog, ": request from unauthorized host"); return 0;