Bug#26306: routines checking hosts.equiv do not check netgroups
[Harry Edmon]
> It interprets it as a host name (see the code for __ivaliduser).
I checked the current glibc source for this function, and was able to
locate it in inet/rcmd.c:
/*
* XXX
* Don't make static, used by lpd(8).
*
* This function is not used anymore. It is only present because lpd(8)
* calls it (!?!). We simply call __invaliduser2() with an illegal rhost
* argument. This means that netgroups won't work in .rhost/hosts.equiv
* files. If you want lpd to work with netgroups, fix lpd to use ruserok()
* or PAM.
* Returns 0 if ok, -1 if not ok.
*/
int
__ivaliduser(hostf, raddr, luser, ruser)
FILE *hostf;
u_int32_t raddr;
const char *luser, *ruser;
{
struct sockaddr_in ra;
memset(&ra, '\0', sizeof(ra));
ra.sin_family = AF_INET;
ra.sin_addr.s_addr = raddr;
return __validuser2_sa(hostf, (struct sockaddr *)&ra, sizeof(ra),
luser, ruser, "-");
}
Perhaps the failing application should be changed?
Reply to: