Subject: Re: lpwrapper
To: None <tech-userlevel@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-userlevel
Date: 03/20/2003 19:48:38
> lpr programs (CUPS, etc.) are like sendmail in that they are
> typically invoked by a number of different programs by execing lpr
> (or lp).
If the caller execs lpr, there's no problem: you get whichever one is
in the user's path, which is presumably the right one or the user
wouldn't be able to print in the first place, and if the user can't
print I see nothing wrong with the user's programs being unable to
print either.
If the caller execs /usr/ucb/lpr (or whatever full path the author felt
like using), it's broken (or nonportable or whatever your favourite
adjective for such cases is), and this is just one of multiple reasons
why.
That's the tack I take with sendmail (the sendmail I use is in
/local/bin/sendmail, with /local/bin early in my path; any sendmails
that may be lying around elsewhere are unused artifacts, much like
fsplit or rpcgen or any of many other programs I don't use). It's the
tack I would take with lpr if I used lpr.
It's true that sendmail and lpr are slightly special cases in that it
tends to be dangerous to leave unused versions lying around because
they usually are set-id and old versions often have holes, but this is
in no way affected by the use, or lack of use, of a wrapper a la
mailwrapper.
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML mouse@rodents.montreal.qc.ca
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B