Rick Cochran on  wrote...
| Anthony,
| 
| I think the "force_ipaddr_hostname" option will do what you want.
| 
| -Rick
| 
| Anthony Thyssen wrote:
| > Is there any way I can get access to the source host (IP) of a
| > print job in a filter?
| 

Great this will do what I need.

It replaced the  H  option in the control file with an IP which I can
now convert to FQDN format.

I want this for three reasons..
   1/ Accounting, I can look up the owner of the source host
   2/ Security, I really know it cam from that host and is
        not some one faking it.
   3/ Avoid unpleasent mis-configured PC weirdness (see below)
      which seems to be extremely common.

It could be a posible improvment to LPRng to list the source IP and or
the source FQDN (since lpd has already looked it up) in the CF file?



PC Weirdness...    A Warning to others using LPRng

We got caught out by some PC weirdness where a print job was accepted,
but when it came time to print, the job was just "removed" (no
explaination, just a "remove" message in the status file).

  ACCEPT SERVICE=P,R,Q REMOTEHOST=*.sci.gu.edu.au PRINTER=s2l0,s2l2,s1l2

What happened was we restricted the "domain" from which a printer would
print from (see above).  "SERVICE=R"  tested the source IP (and its FQDN
lookup) so worked correctly and the job was accepted.

Then as "SERVICE=P" was rejected by exactly the the same "lpd.perms"
rule, as the PC declared the job came from a machine with a different
name and no doamin!

This weirdness is very common, as users can change the name of the PC to
something other than its FQDN name, with little consequences.
Particuarly when they decide to export some file system shares, to other
PCs. This was the first time that this mis-match caused problems.

Not only that any and all print jobs from such a PC will be thought by
lpd servers as "FORWARD".  So if you reject "FORWARD" requests in
"lpd.perms", as shown in LPRng-HOWTO 17.2.15, then PC's which are not
properly configured will NOT be able to print., or run into the same
SERVICE=R and P difference above.


This may be something that should be added to the HOWTO guides.


  Anthony Thyssen ( System Programmer )    http://www.sct.gu.edu.au/~anthony/
 -----------------------------------------------------------------------------
   Klingon Programmer :- `` This machine is a piece of GAGH!
      I need dual Pentium processors if I am to do battle with this code! ''
 -----------------------------------------------------------------------------
     Anthony's Home is his Castle     http://www.sct.gu.edu.au/~anthony/

-----------------------------------------------------------------------------
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address

If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
with:                           | example:
subscribe LIST <mailaddr>       |  subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr>     |  unsubscribe lprng [EMAIL PROTECTED]

If you have major problems,  send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-----------------------------------------------------------------------------

Reply via email to