printcap entries over 8 chars long
rob.naccarato at sheridanc.on.ca
Fri Aug 1 16:33:49 GMT 1997
Peter> My problem is browsing printers that names are more than
Peter> 8 chars long. Any printer that is longer than 8 chars (in the
Peter> printcap file) does not show up when browsing.
Peter> Anybody else affected by this? Is there a fix?
Jim> I had considered "fixing" the code but then I wondered whether I would run
Jim> into DOS's 8.3 filenaming convention from some Samba clients. Since I get
Jim> most of my printcap definitions from our NIS database I found it easier to
Jim> .add some local (printer) printcap entries with an 8 (or less) character
Jim> alias as the *first* alias of the printcap entry.
Well, I found a quick hack that'll work. I don't have any problems with
it so far..
In pcap.c near the very end, change line 359 from this:
if (strlen(p) <= 8 && strlen(p)>strlen(name) && !has_punctuation)
if (strlen(p) <= 16 && strlen(p)>strlen(name) && !has_punctuation)
and at line 377 from this:
name = 0;
name = 0;
It will now have a limit of 16 chars for queue names.
Hope this helps.
Rob Naccarato "I know I'm a lot of feathers,
Sys Admin but not much chicken."
Sheridan College -KM
Oakville, Ont. Canada
More information about the samba