hosts_access(3) - correct usage?
From: Dan Langille (dan_at_langille.org)
Date: 10/29/03
- Previous message: Pierre Beyssac: "Re: FreeBSD mail list etiquette"
- Next in thread: Guido van Rooij: "Re: hosts_access(3) - correct usage?"
- Reply: Guido van Rooij: "Re: hosts_access(3) - correct usage?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: FreeBSD-hackers@freebsd.org Date: Wed, 29 Oct 2003 09:38:50 -0500
Is this the right way to use hosts_access? The code blows up during
the hosts_access call. I'm told it runs OK on Linux/Solaris. I'm
wonderding if there's something different it needs to do be doing on
FreeBSD.
Thanks
#ifdef HAVE_LIBWRAP
P(mutex); /* hosts_access is not thread safe */
request_init(&request, RQ_DAEMON, my_name, RQ_FILE, newsockfd,
0);
fromhost(&request);
if (!hosts_access(&request)) {
V(mutex);
Jmsg2(NULL, M_WARNING, 0, _("Connection from %s:%d refused
by hosts.access"),
inet_ntoa(cli_addr.sin_addr), ntohs(cli_addr.sin_port));
close(newsockfd);
continue;
}
V(mutex);
#endif
-- Dan Langille : http://www.langille.org/ _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
- Previous message: Pierre Beyssac: "Re: FreeBSD mail list etiquette"
- Next in thread: Guido van Rooij: "Re: hosts_access(3) - correct usage?"
- Reply: Guido van Rooij: "Re: hosts_access(3) - correct usage?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]