> From [EMAIL PROTECTED] Sat Jul 6 00:01:15 2002 > Date: Sat, 6 Jul 2002 00:33:59 -0500 > From: Alex Hioreanu <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: LPRng: get client IP and keep cf 'H' line > > I need to know (in a filter) the IP or fqdn of clients who submit jobs > to LPRng. I looked into force_fqdn_hostname and force_ipaddr_hostname, > but these clobber the 'H' line the client sends in their control file, > which I also need. > > Is there an existing way to do this with LPRng, or do I need to patch it? > I just wanted to ensure I'm doing things the easy way before I dive > into the source.
You can add a 'control file filter' on incoming jobs that will massage the host name and user name fields. > > ---------------------------------------------------------------------- > > Also, something unexpected: suppose the client's FQDN is > "real-hostname.sub.domain.com", and the client sends "MyHostName" as > the 'H' line of the cf. Without force_fqdn_hostname, the control file > on the server looks like this: > > Alp@MyHostName+38 > CA > HMyHostName > Lusername > Plp > Qlp > Ntest.page.ps > fdfA038MyHostName > UdfA038MyHostName > > This is as expected. However, after force_fqdn_hostname is enabled on the > server, the cf looks like this: > > Alp@MyHostName+54 > CA > HMyHostName.sub.domain.com > Lusername > Plp > Qlp > Ntest.page.ps > fdfA054MyHostName.sub.domain.com > UdfA054MyHostName.sub.domain.com > > The problem is that "MyHostName.sub.domain.com" is not a valid hostname > - it has no DNS entries, but is just the 'H' line the client sent > appended with the user's domain. This is surprising (I was expecting > LPRng to do a getpeername() followed by a gethostbyaddr() so the 'H' > line would read "Hreal-hostname.sub.domain.com"). The documentation > might mention this. force_ipaddr_hostname works as expected. Using > LPRng 3.8.12. > > Thanks kindly, > > Alex Hioreanu Ummm... you won't like this... but this was a hack to allow folks who had systems such as PC's which allowed them to assign the host name by the user to send jobs and have some sort of FQDN name there. I think this was labelled a 'hack of the worst sort' in the CHANGES file... Sigh... ----------------------------------------------------------------------------- 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. -----------------------------------------------------------------------------
