As there seemed to have been a lot of discussion about this with people
wanting this, and no clear and easy solutions, I took a few hours today
and wrote a small patch set that introduces two new config variables in
lpd.conf (or printcap):

force_controlfile_originate_hostname=10.0.0.0/255.255.255.254
force_controlfile_username=_unauthenticated=10.0.0.0/255.255.255/254

They work like other options with network addresses, they take multiple
ones including netgroups.

The first, for the matching addresses, will rewrite the control file with
the real remote address. Just put 0.0.0.0/0.0.0.0 there to always do it.

The second, for matching addresses per username, will rewrite the username
in the control file with that username.

The patch set is really small is I used Patrick's coding style (which I
don't like but I can adjust) when writing them so they would fit nicely
with the rest of the code.

$ grep + getqueue.c.patch lp.h.patch vars.c.patch | wc -l
      54
$ grep - getqueue.c.patch lp.h.patch vars.c.patch | wc -l
      14

If someone is interested and can post the patches to the list.

Henrik

-----------------------------------------------------------------------------
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