1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-16 15:11:52 +00:00
freebsd/lib/libc/net
Bill Paul 97cb50947e Submitted by: Bill Fenner <fenner@parc.xerox.com>
Fix for PR #510. The original problem was that __ivaliduser() was
failing to grant access to a machine listed in a +@netgroup specified
in /etc/hosts.equiv, even though the host being checked was most
certainly in the +@netgroup.

The /etc/hosts.equiv file in question looked like this:

localhost
+@netgroup

The reason for the failure was had to do with gethostbyaddr(). Inside
the __ivaliduser() routine, we need to do a gethostbyaddr() in order
to get back the actual name of the host we're trying to validate since
we're only passed its IP address. The hostname returned by gethostbyaddr()
is later passed as an argument to innetgr(). The problem is that
__icheckhost() later does a gethostbyname() of its own, which clobbers
the buffer returned by gethostbyaddr().

The fix is just to copy the hostname into a private buffer and use
_that_ as the 'host' argument that gets passed to innetgr().

And here I was crawling all over the innetgr() code thinking the
problem was there. *sigh*
1995-08-14 23:52:49 +00:00
..
byteorder.3 BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00
ether_addr.c Just when you thought it was safe... 1995-08-07 03:42:14 +00:00
ethers.3 Add an ethers(3) man page. 1995-04-12 22:28:49 +00:00
gethostbydns.c Remove trailing whitespace. 1995-05-30 05:51:47 +00:00
gethostbyht.c Remove trailing whitespace. 1995-05-30 05:51:47 +00:00
gethostbyname.3 BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00
gethostbynis.c get* rework and new bind code 1994-09-25 02:12:49 +00:00
gethostnamadr.c Remove trailing whitespace. 1995-05-30 05:51:47 +00:00
getnetbyaddr.c BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00
getnetbydns.c Remove trailing whitespace. 1995-05-30 05:51:47 +00:00
getnetbyht.c Remove trailing whitespace. 1995-05-30 05:51:47 +00:00
getnetbyname.c BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00
getnetbynis.c Remove trailing whitespace. 1995-05-30 05:51:47 +00:00
getnetent.3 BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00
getnetent.c BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00
getnetnamadr.c Remove trailing whitespace. 1995-05-30 05:51:47 +00:00
getproto.c BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00
getprotoent.3 BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00
getprotoent.c BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00
getprotoname.c BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00
getservbyname.c BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00
getservbyport.c BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00
getservent.3 Fix the prototypes for getservby{name,port}(). 1995-07-09 08:17:01 +00:00
getservent.c BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00
herror.c Remove trailing whitespace. 1995-05-30 05:51:47 +00:00
inet_addr.c Remove trailing whitespace. 1995-05-30 05:51:47 +00:00
inet_lnaof.c BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00
inet_makeaddr.c BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00
inet_netof.c BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00
inet_network.c BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00
inet_ntoa.c BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00
inet.3 BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00
iso_addr.3 BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00
iso_addr.c Remove trailing whitespace. 1995-05-30 05:51:47 +00:00
linkaddr.3 BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00
linkaddr.c Remove trailing whitespace. 1995-05-30 05:51:47 +00:00
Makefile.inc Add an ethers(3) man page. 1995-04-12 22:28:49 +00:00
ns_addr.c Remove trailing whitespace. 1995-05-30 05:51:47 +00:00
ns_ntoa.c BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00
ns.3 BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00
rcmd.3 >Description: 1994-10-27 16:33:49 +00:00
rcmd.c Submitted by: Bill Fenner <fenner@parc.xerox.com> 1995-08-14 23:52:49 +00:00
recv.c BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00
res_comp.c Remove trailing whitespace. 1995-05-30 05:51:47 +00:00
res_debug.c Remove trailing whitespace. 1995-05-30 05:51:47 +00:00
res_init.c Remove trailing whitespace. 1995-05-30 05:51:47 +00:00
res_mkquery.c Remove trailing whitespace. 1995-05-30 05:51:47 +00:00
res_query.c Remove trailing whitespace. 1995-05-30 05:51:47 +00:00
res_send.c Remove trailing whitespace. 1995-05-30 05:51:47 +00:00
resolver.3 BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00
send.c BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00
sethostent.c BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00