I am not sure you got my last patch for this and other stuff. I can resend them if you like.
On Sun, 20 Jul 2003, Patrick Powell wrote: PP> Hi Chis. PP> PP> Well, I am back from the Dark Side of the Moon and have been looking at PP> a slew of patches that Darin ([EMAIL PROTECTED]) has handed me. PP> PP> (Note to list readers: if you MUST get hold of me ASAP, then call PP> Darin (858-874-6543) or send him email ([EMAIL PROTECTED]) with PP> LPRNG PROBLEM in the subject line. I am currently a bit email impaired. PP> PP> I plan to devote the next couple of weeks putting in all of the patches, changes, PP> etc., that people have posted. PP> PP> I have looked at this one fairly carefully. PP> PP> There is a subtle problem with using this type of thing on a host with PP> multiple Network Interfaces. I have discovered that the network address PP> chosen for origination depends on OS, OS Version, Phase of Moon, and Whim PP> of Implementor. (This was about 3 years ago, and I think the situation has PP> not changed much.) So I might need to add some language about this. PP> PP> There is also the issue of a forwarded job. If the job is forwarded from PP> a server, then you do NOT want to change the origination address. So, PP> you need to do something like: PP> PP> parm=!ip.addr.server,other.ip.address PP> PP> I suggest that you use , to separate the IP address values, and do not PP> use spaces. PP> PP> Patrick PP> PP> > From [EMAIL PROTECTED] Thu Jun 19 11:51:48 2003 PP> > Date: Thu, 19 Jun 2003 20:51:20 +0200 (MEST) PP> > From: Christoph Beyer <[EMAIL PROTECTED]> PP> > To: <[EMAIL PROTECTED]> PP> > Cc: <[EMAIL PROTECTED]> PP> > Subject: LPRng: Re: Rewrite the control file hostname with real requesting PP> > hostname (fwd) PP> > PP> > PP> > PP> > best regards PP> > ~christoph PP> > PP> > PP> > -- PP> > /* Christoph Beyer | Office: Building 2b / 23 *\ PP> > * DESY | Phone: 040-8998-2317 * PP> > * - IT - | Fax: 040-8998-4060 * PP> > \* 22603 Hamburg | http://www.desy.de */ PP> > PP> > PP> > ---------- Forwarded message ---------- PP> > Date: Thu, 19 Jun 2003 13:27:54 +0200 (CEST) PP> > From: Henrik Edlund <[EMAIL PROTECTED]> PP> > Reply-To: [EMAIL PROTECTED] PP> > To: [EMAIL PROTECTED] PP> > Subject: LPRng: Re: Rewrite the control file hostname with real requesting PP> > hostname PP> > PP> > And yet another fix to this patch, fixing Value_sep to File_sep in one PP> > place. Hopefully this will be the last post about this, as I am rewriting PP> > this patch to put a trusted username in the R record (accounting info) in PP> > the control file instead, and leaving the P record (username) to be PP> > whatever the user sets and hence untrusted. PP> > PP> > --- LPRng-3.8.21/src/common/getqueue.c.orig Wed Apr 16 01:37:42 2003 PP> > +++ LPRng-3.8.21/src/common/getqueue.c Thu Jun 19 13:23:11 2003 PP> > @@ -2104,11 +2104,53 @@ PP> > int status = 0, fd, i; PP> > struct stat statb; PP> > PP> > + struct line_list l, listv; PP> > + char *s, *t; PP> > + Init_line_list(&l); PP> > + Init_line_list(&listv); PP> > + PP> > if(DEBUGL3) Dump_job( "Create_control: before fixing", job ); PP> > PP> > /* deal with authentication */ PP> > PP> > Make_identifier( job ); PP> > + PP> > + /* PP> > + * if we get a request from these hosts, change host name in control PP> > + * file (possibly faked if from untrusted host) to FQDN of remote host PP> > + */ PP> > + if( Force_controlfile_originate_hostname_DYN ){ PP> > + Free_line_list(&l); PP> > + Split(&l,Force_controlfile_originate_hostname_DYN,File_sep,0,0,0,0,0,0); PP> > + if( Match_ipaddr_value( &l, &RemoteHost_IP ) == 0 ){ PP> > + DEBUG1("Create_control: remotehost '%s'", FQDNRemote_FQDN ); PP> > + Set_str_value(&job->info,FROMHOST,FQDNRemote_FQDN); PP> > + fromhost = Find_str_value(&job->info,FROMHOST,Value_sep); PP> > + } PP> > + Free_line_list(&l); PP> > + } PP> > + PP> > + /* PP> > + * if we get a request from these hosts, change user name in control PP> > + * file (possibly faked if from untrusted host) to specified PP> > + */ PP> > + if( Force_controlfile_username_DYN ){ PP> > + Free_line_list(&listv); PP> > + Split(&listv,Force_controlfile_username_DYN,";",0,0,0,0,0,0); PP> > + for(i = 0; i < listv.count; ++i ){ PP> > + s = listv.list[i]; PP> > + if( (t = safestrpbrk(s,Value_sep)) ) *t++ = 0; PP> > + Free_line_list(&l); PP> > + Split(&l,t,File_sep,0,0,0,0,0,0); PP> > + if( Match_ipaddr_value( &l, &RemoteHost_IP ) == 0 ){ PP> > + DEBUG1("Create_control: username '%s'", s ); PP> > + Set_str_value(&job->info,LOGNAME,s); PP> > + break; PP> > + } PP> > + } PP> > + Free_line_list(&l); PP> > + Free_line_list(&listv); PP> > + } PP> > PP> > if( !(fromhost = Find_str_value(&job->info,FROMHOST,Value_sep)) || Is_clean_name(fromhost) ){ PP> > Set_str_value(&job->info,FROMHOST,FQDNRemote_FQDN); PP> > PP> > ----------------------------------------------------------------------------- PP> > YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST PP> > The address you post from MUST be your subscription address PP> > PP> > If you need help, send email to [EMAIL PROTECTED] (or lprng-requests PP> > or lprng-digest-requests) with the word 'help' in the body. For the impatient, PP> > to subscribe to a list with name LIST, send mail to [EMAIL PROTECTED] PP> > with: | example: PP> > subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED] PP> > unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED] PP> > PP> > If you have major problems, send email to [EMAIL PROTECTED] with the word PP> > LPRNGLIST in the SUBJECT line. PP> > ----------------------------------------------------------------------------- PP> > PP> > PP> PP> ----------------------------------------------------------------------------- PP> YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST PP> The address you post from MUST be your subscription address PP> PP> If you need help, send email to [EMAIL PROTECTED] (or lprng-requests PP> or lprng-digest-requests) with the word 'help' in the body. For the impatient, PP> to subscribe to a list with name LIST, send mail to [EMAIL PROTECTED] PP> with: | example: PP> subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED] PP> unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED] PP> PP> If you have major problems, send email to [EMAIL PROTECTED] with the word PP> LPRNGLIST in the SUBJECT line. PP> ----------------------------------------------------------------------------- PP> ----------------------------------------------------------------------------- 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. -----------------------------------------------------------------------------
