[prev in list] [next in list] [prev in thread] [next in thread]
List: lprng
Subject: [LPRng] force_fqdn_hostname does not work!
From: Tore Halset <halset () pvv ! ntnu ! no>
Date: 1998-10-30 8:40:04
[Download RAW message or body]
On Thu, 22 Oct 1998, Joerg Bechlars wrote:
> This entry in lpd.conf may help:
> # Purpose: force FQDN HOST value in control file
> # force_fqdn_hostname@
> switch on:
> force_fqdn_hostname
> you dont get the IP-Number, but the corresponding "full qualified domain
> name"
No, you get the fake-name pluss the domainpart of the real fqdn. My
computer is kallisti.pvv.ntnu.no, but I can make it send jobs as hostname
fakekallisti. With force_fqdn_hostname turned on the fqdn will be
fakekallisti.pvv.ntnu.no. This is controled in src/LPD/lpd_rcvjob.c:
/* Kludge! Kludge!
* The following code will assign the FQDN Domain
* to be that of the Remote Host which is originating
* the job. This allows the server and the remote host tobe
* in different domains.
*/
s = strchr( FQDNRemote,'.');
plp_snprintf( qn, sizeof(qn), "H%s%s", cfp->FROMHOST+1, s);
I tried to switch this to
plp_snprintf( qn, sizeof(qn), "H%s", FQDNRemote);
And it almost worked. It did not work on printjobs from computers wher the
hostname wher faked.
My problem was that my filters and printer-router program did not get the
fqdn of the client. A better solution to my problem than messing whith
lpd_rcvjob.c was to mess whith setup_filter.c :) I simly added a two lines
to setup_envp() in setup_filter.c:
plp_snprintf( line, sizeof(line), "FQDN=%s", FQDNRemote);
add_env( filter, line );
And now all my filters and printer-router software can read the FQDN
encviron. nice? :)
But, I think that force_fqdn_hostname does not work the way it should
work. You can all try it if you have a mac whith MacOS around. Open the
FileSharing control-panel and set the computername to someting funny and
send a printjob to your LPRng server whith force_fqdn_hostname turned on.
You must use the desktop-printing.
- Tore.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic