Subject: Re: lpd and dhcpd = problems
To: None <netbsd-users@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: netbsd-users
Date: 11/04/2005 09:04:09
>>> If this is tolerable on your network, one solution is to disable the hosts
>>> check in lpd completely.  Replace the - by a + in /etc/hosts.lpd and all
>>> hosts are allowed to print.
>>
>> Not true.  I already have this, and I still get the error.
>
> Try removing the file all together.

In Peter's case, it fails before that.

The src/usr.sbin/lpr/lpd/lpd.c's chkhost() routine does:

1) get the port number of remote connection -- or fail
2) make sure its a valid port (1024 or above) (see -W option)
3) get remote hostname
4) if none, then get "numeric form of the host's address" (as a string)
5) fail if no hostname (the hostname is used for temporary filenames)
6) gets the address in string form again or fails
7) does IP lookup or fails
8) reverse lookup for all IPs found and makes sure one matches your remote
    host or fails
9) if built with libwrap, uses TCP wrappers (fails if no access)
10) uses the libc/net/rcmd.c __ivaliduser_sa() code to check the
    /etc/hosts.equiv (if okay returns success and does not do next check) 
11) uses the libc/net/rcmd.c __ivaliduser_sa() code to check the
    /etc/hosts.lpd


  Jeremy C. Reed

  	  	 	 BSD News, BSD tutorials, BSD links
 	  	 	 http://www.bsdnewsletter.com/