Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Aug 1995 16:52:51 -0700
From:      Bill Paul <wpaul>
To:        CVS-commiters, cvs-lib
Subject:   cvs commit: src/lib/libc/net rcmd.c
Message-ID:  <199508142352.QAA10635@freefall.FreeBSD.org>

next in thread | raw e-mail | index | archive | help
wpaul       95/08/14 16:52:50

  Modified:    lib/libc/net  rcmd.c
  Log:
  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*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199508142352.QAA10635>