bug in viewprt?

Bob Stockler bob at trebor.iglou.com
Wed May 12 11:20:46 PDT 2004


On Wed, May 12, 2004 at 12:52:31PM -0400, Jay R. Ashworth wrote:
| I believe I've discovered a design deficiency in viewprt.
| 
| Apparently, in certain circumstances, filepro creates -p output files
| which are not readable by the general public.  For some reason, while
| the less command spawned by viewprt can read them (it apparently
| inherits viewprt's EUID), lp pukes because it cannot (a permission
| error).  I believe this is because it's the lp *unspooler* program,
| which runs as user lp, that tries to open said file.  I saw two
| possible solutions: chmod the temp file inside viewprt, or modify
| 
| lp -n $print $dir/$file
| 
| into
| 
| cat $dir/$file | lp -n $print

Useless use of "cat" #50,999,999.  Replace with:

   <$dir/$file lp -n $print

Bob

| I chose the latter for security reasons, though it does make the output
| of lpstat... well, no, on SCO it won't at least.
| 
| In any event, if no one contends this isn't a bug, I'm going to sumbit
| it.

-- 
Bob Stockler - bob at trebor.iglou.com
Author: MENU EDIT II - The BEST Creator/Editor/Manager for filePro User Menus.
Fully functional (time-limited) demos available by email request (specify OS).


More information about the Filepro-list mailing list