Problem
I have configured many remote printers on SCO OpenServer Release 5.0.4. I have noticed that when I execute "lpstat -v", some of the remote printer names and machine names are corrupt.
This may also cause SCO VisionFS to fail, since VisionFS relies upon the output of "lpstat -v" to check which printers are available when it initially starts up.
Cause
lpstat(C) uses the entries in the file /etc/printcap (see
printcap(SFF)) in order to display the names of the configured
remote printers, their associated devices and remote machines.
For example, an entry in /etc/printcap for the printer prt219
such as:prt219:\
:lp=:rm=remsys:ex:rp=remptr219:sd=/usr/spool/lpd/remprt219:would result in the following output for the command "lpstat -v":
device for prt219 is the remote printer remptr219 on remsys
lpstat(C) maintains a buffer of 512 characters which it uses to
accumulate _all_ of the remote printer and machine names in
/etc/printcap. (The remote printer and machine names correspond
to the "rp=" and "rm=" fields respectively.)Thus, in the above example, the number of characters stored by
lpstat(C) would be 17 (each name is terminated by a null character).If the number of characters for all of the remote printer and machine names in /etc/printcap exceeds 512, this may result in the corruption of output from "lpstat -v".
Solution
This has been fixed in SCO OpenServer 5.0.5.