achhabra@uceng.uc.edu (atul k chhabra) (02/22/89)
We were running a filter for an Imagen laser printer connected to a Sun 3/160 running Sun Unix Release 3.0. On upgrading to Sun Release 3.5, the filter stopped working. The first line of the filter is: #!/bin/csh -f When lpd invokes /bin/csh, it repeatedly logs the following error message in the log-file: csh: Permission denied /usr/lib/lpd: imagen: restarting As stated above, the filter used to work fine on Sun Release 3.0. You may try to recreate the situation on Sun Release 3.5 as follows: 1. Add the following entry in /etc/printcap dumb|test printer:\ :lp=/tmp/junk:\ :lf=/tmp/log:\ :sd=/tmp:\ :vf=/tmp/dummyfilter: 2. Create the file /tmp/dummyfilter with just the following line #!/bin/csh -f 3. chmod 755 /tmp/dummyfilter 4. cat /dev/null > /tmp/log ; chmod 666 /tmp/log 5. cat /dev/null > /tmp/junk ; chmod 666 /tmp/junk 6. Execute the command "lpr -Pdumb -v ANYFILE". You will notice that the message "csh: Permission denied" is logged into the file /tmp/log. This seems to be a problem specific to Sun Release 3.5. The above stuff works without any error messages on VAX Ultrix 2.3. We cannot rewrite the Imagen filters using "sh" instead of "csh". QMS-Imagen could not help. Sun software assistance for Unix is running a backlog of three days!!! I would appreciate if anyone on the net could shed some light on the lpd problem. Atul Chhabra, Dept. of Electrical & Computer Engineering, ML 030, University of Cincinnati, Cincinnati, OH 45221-0030. voice: (513)556-4766 internet: achhabra@ucesp1.ece.uc.edu OR achhabra@uceng.uc.edu
matt@oddjob.uchicago.edu (Matt Crawford) (03/07/89)
A confident guess: Change "#!/bin/csh -f" to "/bin/csh -fb". I bet the filter is being invoked from a setuid program which does not reset its real and effective uids to the same value. Thus, as far as csh knows, it is being invoked for a setuid script. Matt Crawford
arisco%cadillac.cad.mcc.com@mcc.com (John Arisco) (03/09/89)
> ... On upgrading to Sun Release 3.5, the filter stopped working. The > first line of the filter is: > > #!/bin/csh -f This is almost certainly a set-userid shell script. The C-shell now requires that the -b option be present for a shell script to run set-userid. If it is not present, you get the error message "csh: Permission denied". John Arisco, MCC CAD Program | ARPA: arisco@mcc.com | Phone: [512] 338-3576 Box 200195, Austin, TX 78720 | UUCP: ...!cs.utexas.edu!milano!cadillac!arisco