Please unblock radiance 3R9+20080530-4
Hi Release Team,
pleas eunblock radiance 3R9+20080530-4 as it fixes a security related
bug - some scripts shipped with radiance used temp files in an insecure
way. The changelog is pasted below, debdiff is attached.
Thanks,
Bernd
radiance (3R9+20080530-4) unstable; urgency=high
* debian/patches:
- Adding 'using_mktemp_security_fix' patch to avoid a possible
symlink attack. Now scripts are using mktemp(1) to create files in
/tmp. Thanks to Dmitry E. Oboukhov for the report (Closes: #496423).
-- Bernd Zeimetz <bzed@debian.org> Thu, 28 Aug 2008 00:33:52 +0200
--
Bernd Zeimetz Debian GNU/Linux Developer
GPG Fingerprint: 06C8 C9A2 EAAD E37E 5B2C BE93 067A AD04 C93B FF79
diff --git a/debian/changelog b/debian/changelog
index 478ba29..563fb8a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+radiance (3R9+20080530-4) unstable; urgency=high
+
+ * debian/patches:
+ - Adding 'using_mktemp_security_fix' patch to avoid a possible
+ symlink attack. Now scripts are using mktemp(1) to create files in
+ /tmp. Thanks to Dmitry E. Oboukhov for the report (Closes: #496423).
+
+ -- Bernd Zeimetz <bzed@debian.org> Thu, 28 Aug 2008 00:33:52 +0200
+
radiance (3R9+20080530-3) unstable; urgency=low
* debian/rules:
diff --git a/debian/patches/series b/debian/patches/series
index 2eefb80..89c6e1a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
+using_mktemp_security_fix -p1
0001-Branching-the-tiff-header-files.patch
0002-Update-common-Rmakefile-to-use-the-systemwide-libtif.patch
0003-Update-px-Rmakefile-to-use-the-systemwide-libtiff-if.patch
diff --git a/debian/patches/using_mktemp_security_fix b/debian/patches/using_mktemp_security_fix
new file mode 100644
index 0000000..2bda670
--- /dev/null
+++ b/debian/patches/using_mktemp_security_fix
@@ -0,0 +1,488 @@
+diff --git a/src/cv/optics2rad.csh b/src/cv/optics2rad.csh
+index d094f12..2844805 100644
+--- a/src/cv/optics2rad.csh
++++ b/src/cv/optics2rad.csh
+@@ -1,5 +1,5 @@
+ #!/bin/csh -f
+-# RCSid $Id: optics2rad.csh,v 2.2 2006/05/19 21:33:12 greg Exp $
++# RCSid $Id: optics2rad.csh,v 2.3 2008/08/25 04:50:31 greg Exp $
+ #
+ # Convert Optics 5 output to correct Radiance input
+ #
+@@ -7,7 +7,8 @@ if ($#argv < 1) then
+ echo "Usage: $0 optics.mat .."
+ exit 1
+ endif
+-cat > /tmp/opt.fmt << '_EOF_'
++set optf=`mktemp /tmp/optfmt.XXXXXXX`
++cat > $optf << '_EOF_'
+ void glass $(name)_glass
+ 0
+ 0
+@@ -35,7 +36,8 @@ void BRTDfunc $(name)_back
+ echo "# Output generated by $0 from $*"
+ sed -e '/^[^#]/d' -e '/^$/d' $*
+
+-cat > /tmp/out$$.fmt << '_EOF_'
++set outf=`mktemp /tmp/outfmt.XXXXXX`
++cat > $outf << '_EOF_'
+
+ void glass $(name)
+ 0
+@@ -48,9 +50,9 @@ rcalc -l -e 'abs(x):if(x,x,-x);and(a,b):if(a,b,a);not(x):if(x,-1,1)' \
+ -e 'trans=lum(Rtau,Gtau,Btau)' \
+ -e 'rfront=lum(fRrho,fGrho,fBrho);rback=lum(bRrho,bGrho,bBrho)' \
+ -e 'cond=0.005-abs(rfront-rback)' \
+- -i /tmp/opt.fmt -o /tmp/out$$.fmt $*
++ -i $optf -o $outf $*
+
+-cat > /tmp/out$$.fmt << '_EOF_'
++cat > $outf << '_EOF_'
+
+ void BRTDfunc $(name)
+ 10
+@@ -69,9 +71,9 @@ rcalc -l -e 'abs(x):if(x,x,-x);and(a,b):if(a,b,a);not(x):if(x,-1,1)' \
+ -e 'trans=lum(Rtau,Gtau,Btau)' \
+ -e 'rfront=lum(fRrho,fGrho,fBrho);rback=lum(bRrho,bGrho,bBrho)' \
+ -e 'cond=and(trans-.645, not(0.005-abs(rfront-rback)))' \
+- -i /tmp/opt.fmt -o /tmp/out$$.fmt $*
++ -i $optf -o $outf $*
+
+-cat > /tmp/out$$.fmt << '_EOF_'
++cat > $outf << '_EOF_'
+
+ void BRTDfunc $(name)
+ 10
+@@ -90,6 +92,6 @@ rcalc -l -e 'abs(x):if(x,x,-x);and(a,b):if(a,b,a);not(x):if(x,-1,1)' \
+ -e 'trans=lum(Rtau,Gtau,Btau)' \
+ -e 'rfront=lum(fRrho,fGrho,fBrho);rback=lum(bRrho,bGrho,bBrho)' \
+ -e 'cond=and(not(trans-.645), not(0.005-abs(rfront-rback)))' \
+- -i /tmp/opt.fmt -o /tmp/out$$.fmt $*
++ -i $optf -o $outf $*
+
+-rm -f /tmp/opt.fmt /tmp/out$$.fmt
++rm -f $optf $outf
+diff --git a/src/gen/genbackg.csh b/src/gen/genbackg.csh
+index 49d2b4b..42cfe99 100644
+--- a/src/gen/genbackg.csh
++++ b/src/gen/genbackg.csh
+@@ -1,5 +1,5 @@
+ #!/bin/csh -f
+-# RCSid: $Id: genbackg.csh,v 2.1 2003/02/22 02:07:23 greg Exp $
++# RCSid: $Id: genbackg.csh,v 2.2 2008/08/25 04:50:32 greg Exp $
+ #
+ # Generate height field to surround a mesh with an irregular border
+ #
+@@ -66,7 +66,8 @@ if (! $?step ) then
+ set step=`ev "sqrt(($c11[1]-$c00[1])*($c11[1]-$c00[1])+($c11[2]-$c00[2])*($c11[2]-$c00[2]))/70"`
+ endif
+ set res=(`ev "ceil(sqrt(($c01[1]-$c00[1])*($c01[1]-$c00[1])+($c01[2]-$c00[2])*($c01[2]-$c00[2]))/$step)" "ceil(sqrt(($c10[1]-$c00[1])*($c10[1]-$c00[1])+($c10[2]-$c00[2])*($c10[2]-$c00[2]))/$step)"`)
+-cat > /tmp/edge$$.rad << _EOF_
++set edgef=`mktemp /tmp/edgerad.XXXXXX`
++cat > $edgef << _EOF_
+ void sphere c00
+ 0 0 4
+ $c00 .001
+@@ -92,7 +93,8 @@ void cylinder ey1
+ 0 0 7
+ $c10 $c11 .001
+ _EOF_
+-cat > /tmp/mesh$$.cal << _EOF_
++set meshcal=`mkdir /tmp/meshcal.XXXXXX`
++cat > $meshcal << _EOF_
+ lerp(x,y0,y1):(1-x)*y0+x*y1;
+ and(a,b):if(a,b,-1);
+ or(a,b):if(a,1,b);
+@@ -120,14 +122,16 @@ inmesh=and(not(onedge),eq(sumfun2(wt,-1,1,-1,1),sumfun2(maxwt,-1,1,-1,1)));
+ lo=if(inmesh,1e10,if(wts-EPS,sum/wts,($lim[5]+$lim[6])/2));
+ _EOF_
+ # Generate height image
+-xform -m void $mesh | oconv - /tmp/edge$$.rad > /tmp/mesh$$.oct
++set meshoct=`/tmp/meshoct.XXXXXXX`
++xform -m void $mesh | oconv - $edgef > $meshoct
++set meshpic=`mktemp /tmp/meshpic.XXXXXX`
+ cnt $res[2] $res[1] \
+ | rcalc -e 'sp=$2/'"($res[1]-1)" -e 'tp=1-$1/'"($res[2]-1)" \
+- -f /tmp/mesh$$.cal -e "xp=xpos(sp,tp);yp=ypos(sp,tp)" \
++ -f $meshcal -e "xp=xpos(sp,tp);yp=ypos(sp,tp)" \
+ -e '$1=xp;$2=yp;$3=z0;$4=0;$5=0;$6=1' \
+- | rtrace -w -faf -oL -x $res[1] -y $res[2] /tmp/mesh$$.oct \
+- | pvalue -r -b -df > /tmp/mesh$$.pic
+-rm /tmp/edge$$.rad /tmp/mesh$$.oct
++ | rtrace -w -faf -oL -x $res[1] -y $res[2] $meshoct \
++ | pvalue -r -b -df > $meshpic
++rm $edgef $meshoct
+ # Output mesh surround
+ cat << _EOF_
+ # $0 $argv[*]
+@@ -137,14 +141,14 @@ cat << _EOF_
+ # $c11
+ # $c10
+ _EOF_
+-pflip -v /tmp/mesh$$.pic \
+- | pcomb -f /tmp/mesh$$.cal - \
++pflip -v $meshpic \
++ | pcomb -f $meshcal - \
+ | pvalue -h -H -pG -d \
+ | gensurf $mat $nam 'xpos(s,t)' 'ypos(s,t)' - \
+ `ev $res[1]-1 $res[2]-1` \
+ -e 'valid(xf,yf)=1e9-Z`SYS(xf,yf)' \
+- -f /tmp/mesh$$.cal $smooth
+-rm /tmp/mesh$$.cal /tmp/mesh$$.pic
++ -f $meshcal $smooth
++rm $meshcal $meshpic
+ # All done -- exit
+ exit 0
+ # Usage error message
+diff --git a/src/px/falsecolor.csh b/src/px/falsecolor.csh
+index 8c011bb..566f769 100644
+--- a/src/px/falsecolor.csh
++++ b/src/px/falsecolor.csh
+@@ -1,12 +1,12 @@
+ #!/bin/csh -fe
+-# RCSid: $Id: falsecolor.csh,v 2.17 2006/11/15 08:17:13 greg Exp $
++# RCSid: $Id: falsecolor.csh,v 2.18 2008/08/25 04:50:32 greg Exp $
+ #
+ # Create false color image with legend
+ #
+ # Added user-definable legend 2004/01/20 Rob Guglielmetti
+
+-set td=/tmp/fc$$
+ onintr quit
++set td=`mktemp -d /tmp/fc.XXXXXX`
+ set mult=179
+ set label=Nits
+ set scale=1000
+@@ -100,7 +100,6 @@ while ($#argv > 0)
+ endsw
+ shift argv
+ end
+-mkdir $td
+ if ($?needfile && "$picture" == '-') then
+ cat > $td/picture
+ set picture=$td/picture
+diff --git a/src/px/normpat.csh b/src/px/normpat.csh
+index 3f734ef..76e3318 100644
+--- a/src/px/normpat.csh
++++ b/src/px/normpat.csh
+@@ -1,5 +1,5 @@
+ #!/bin/csh -f
+-# RCSid: $Id: normpat.csh,v 2.6 2005/02/16 05:40:11 greg Exp $
++# RCSid: $Id: normpat.csh,v 2.7 2008/08/25 04:50:32 greg Exp $
+ #
+ # Normalize a pattern for tiling (-b option blends edges) by removing
+ # lowest frequencies from image (-f option) and reducing to
+@@ -35,8 +35,7 @@ while ($#argv > 0)
+ end
+ dofiles:
+ onintr quit
+-set td=/tmp/np$$
+-mkdir $td
++set td=`mktemp -d /tmp/np.XXXXXX`
+ goto skipthis
+ cat > $td/coef.fmt << '_EOF_'
+ rm:${ $25 }; gm:${ $26 }; bm:${ $27 };
+diff --git a/src/px/pbilat.csh b/src/px/pbilat.csh
+index d650a3d..276ce5b 100644
+--- a/src/px/pbilat.csh
++++ b/src/px/pbilat.csh
+@@ -1,5 +1,5 @@
+ #!/bin/csh -f
+-# RCSid $Id: pbilat.csh,v 1.1 2007/10/22 18:04:38 greg Exp $
++# RCSid $Id: pbilat.csh,v 1.2 2008/08/25 04:50:32 greg Exp $
+ #
+ # Bilateral Filter (fixed parameters for now)
+ #
+@@ -15,8 +15,7 @@ set extrem=`pextrem -o $inp:q | rcalc -e "vmin:$vmin" -e 'max(a,b):if(a-b,a,b);$
+ set nseg=`ev "ceil(log10($extrem[2]/$extrem[1])/$sigma)"`
+ if ( $nseg > 20 ) set nseg=20
+ onintr done
+-set tdir=/tmp/blf$$
+-mkdir $tdir
++set tdir=`mktemp -d /tmp/blf.XXXXXX`
+ set gfunc="sq(x):x*x;gfunc(x):if(sq(x)-sq($sigma),0,sq(1-sq(x/$sigma)))"
+ set i=0
+ set imglist=()
+diff --git a/src/px/pdelta.csh b/src/px/pdelta.csh
+index d7b831b..24a70c2 100644
+--- a/src/px/pdelta.csh
++++ b/src/px/pdelta.csh
+@@ -1,5 +1,5 @@
+ #!/bin/csh -f
+-# RCSid: $Id: pdelta.csh,v 3.1 2003/02/22 02:07:27 greg Exp $
++# RCSid: $Id: pdelta.csh,v 3.2 2008/08/25 04:52:57 greg Exp $
+ #
+ # Compute 1976 CIE Lab deltaE* between two Radiance pictures
+ #
+@@ -22,10 +22,11 @@ endif
+ if ( "`getinfo < $f2:q | grep '^FORMAT=32-bit_rle_xyze'`" == "" ) then
+ set inp2='x2=X(ri(2),gi(2),bi(2));y2=Y(ri(2),gi(2),bi(2));z2=Z(ri(2),gi(2),bi(2))'
+ endif
+-pfilt -1 -x 128 -y 128 -p 1 $f1:q | pvalue -o -h -H -d > /tmp/tf$$.dat
+-set wht=(`total -u /tmp/tf$$.dat`)
+-set avg=`rcalc -e '$1=$2' /tmp/tf$$.dat | total -m`
+-rm /tmp/tf$$.dat
++set tempf=`mktemp /tmp/tf.XXXXXX`
++pfilt -1 -x 128 -y 128 -p 1 $f1:q | pvalue -o -h -H -d > $tempf
++set wht=(`total -u $tempf`)
++set avg=`rcalc -e '$1=$2' $tempf | total -m`
++rm $tempf
+ pcomb -e $cielab:q -e $rgb2xyz:q \
+ -e "Yw:179*3*$avg; Xw:$wht[1]*Yw/$wht[2]; Zw:$wht[3]*Yw/$wht[2]" \
+ -e $inp1:q -e $inp2:q -e 'lo=dE(x1,y1,z1,x2,y2,z2)' \
+diff --git a/src/px/phisto.csh b/src/px/phisto.csh
+index 9b26d10..9cbac64 100644
+--- a/src/px/phisto.csh
++++ b/src/px/phisto.csh
+@@ -1,24 +1,24 @@
+ #!/bin/csh -f
+-# RCSid: $Id: phisto.csh,v 3.4 2005/02/16 05:40:11 greg Exp $
++# RCSid: $Id: phisto.csh,v 3.5 2008/08/25 04:50:32 greg Exp $
+ #
+ # Compute foveal histogram for picture set
+ #
+-set tf=/tmp/ph$$
++set tf=`mktemp /tmp/phdat.XXXXX`
+ onintr quit
+ if ( $#argv == 0 ) then
+ pfilt -1 -x 128 -y 128 -p 1 \
+- | pvalue -o -h -H -d -b > $tf.dat
++ | pvalue -o -h -H -d -b > $tf
+ else
+- rm -f $tf.dat
++ rm -f $tf
+ foreach i ( $* )
+ pfilt -1 -x 128 -y 128 -p 1 $i \
+- | pvalue -o -h -H -d -b >> $tf.dat
++ | pvalue -o -h -H -d -b >> $tf
+ if ( $status ) exit 1
+ end
+ endif
+-set Lmin=`total -l $tf.dat | rcalc -e 'L=$1*179;$1=if(L-1e-7,log10(L)-.01,-7)'`
+-set Lmax=`total -u $tf.dat | rcalc -e '$1=log10($1*179)+.01'`
+-rcalc -e 'L=$1*179;cond=L-1e-7;$1=log10(L)' $tf.dat \
++set Lmin=`total -l $tf | rcalc -e 'L=$1*179;$1=if(L-1e-7,log10(L)-.01,-7)'`
++set Lmax=`total -u $tf | rcalc -e '$1=log10($1*179)+.01'`
++rcalc -e 'L=$1*179;cond=L-1e-7;$1=log10(L)' $tf \
+ | histo $Lmin $Lmax 100
+ quit:
+-rm -f $tf.dat
++rm -f $tf
+diff --git a/src/px/ran2tiff.csh b/src/px/ran2tiff.csh
+index 5a42511..75337a5 100644
+--- a/src/px/ran2tiff.csh
++++ b/src/px/ran2tiff.csh
+@@ -65,8 +65,7 @@ if ($#argv < 2) then
+ exit 1
+ endif
+ # Get shrunken image luminances
+-set vald=/tmp/val$$
+-mkdir $vald
++set vald=`mktemp -d /tmp/val.XXXXXX`
+ foreach inp ($argv:q)
+ set datf="$inp:t"
+ set datf="$vald/$datf:r.dat"
+diff --git a/src/px/vlpic.csh b/src/px/vlpic.csh
+index 659d576..a52862a 100644
+--- a/src/px/vlpic.csh
++++ b/src/px/vlpic.csh
+@@ -1,5 +1,5 @@
+ #!/bin/csh -f
+-# RCSid: $Id: vlpic.csh,v 3.3 2005/02/16 05:40:11 greg Exp $
++# RCSid: $Id: vlpic.csh,v 3.4 2008/08/25 04:50:32 greg Exp $
+ #
+ # Compute falsecolor image of visibility level
+ # using the wacky formulas of Werner Adrian.
+@@ -22,11 +22,11 @@ while ($#argv > 1)
+ endsw
+ shift argv
+ end
+-set tc=/tmp/vl$$.cal
+-set tp1=/tmp/vl$$r1.pic
+-set tp2=/tmp/vl$$r2.pic
+-set tp4=/tmp/vl$$r4.pic
+-set tp8=/tmp/vl$$r8.pic
++set tc=`mktemp /tmp/vlcal.XXXXXXX`
++set tp1=`mktemp /tmp/vlpic.XXXXXX`
++set tp2=`mktemp /tmp/vlr2pic.XXXXXX`
++set tp4=`mktemp /tmp/vlr4pic.XXXXXX`
++set tp8=`mktemp /tmp/vlr8pic.XXXXXX`
+ set tf=($tc $tp1 $tp2 $tp4 $tp8)
+ set inpic=$argv[1]
+ onintr quit
+diff --git a/src/px/xyzimage.csh b/src/px/xyzimage.csh
+index 26b34a5..7ed0610 100644
+--- a/src/px/xyzimage.csh
++++ b/src/px/xyzimage.csh
+@@ -1,5 +1,5 @@
+ #!/bin/csh -f
+-# RCSid: $Id: xyzimage.csh,v 2.4 2005/02/16 05:40:11 greg Exp $
++# RCSid: $Id: xyzimage.csh,v 2.5 2008/08/25 04:50:32 greg Exp $
+ #
+ # Display one or more CIE XYZE pictures using ximage
+ #
+@@ -48,10 +48,9 @@ while ( $i <= $#argv && ! $firstarg )
+ endsw
+ set i=$i1
+ end
+-set td=/tmp/xyz$$
+ set ecode=1
+ onintr quit
+-mkdir $td
++set td=`mktemp -d /tmp/xyz.XXXXXX`
+ if ( ! $firstarg ) then
+ ra_xyze -r -u $popt > $td/stdin
+ if ( $status ) goto quit
+diff --git a/src/util/compamb.csh b/src/util/compamb.csh
+index 435e46b..91c2a4c 100644
+--- a/src/util/compamb.csh
++++ b/src/util/compamb.csh
+@@ -1,5 +1,5 @@
+ #!/bin/csh -f
+-# RCSid: $Id: compamb.csh,v 3.6 2005/02/16 05:40:11 greg Exp $
++# RCSid: $Id: compamb.csh,v 3.7 2008/08/25 04:50:32 greg Exp $
+ #
+ # Compute best ambient value for a scene and append to rad input file
+ #
+@@ -22,7 +22,8 @@ if ( $#argv != 1 ) then
+ exit 1
+ endif
+ onintr quit
+-set tf=/tmp/ca$$
++set td=`mktemp -d /tmp/ca.XXXXXX`
++set tf=$td/compamb
+ set oct=`rad -w -s -e -v 0 $argv[1] QUA=High AMB=$tf.amb OPT=$tf.opt | sed -n 's/^OCTREE= //p'`
+ rad -n -s -V $argv[1] \
+ | rpict @$tf.opt -av 0 0 0 -aw 16 -dv- -S 1 -x 16 -y 16 -ps 1 $oct \
+@@ -43,4 +44,4 @@ else
+ endif
+ echo "render= -av $av" >> $argv[1]
+ quit:
+-exec rm -f $tf.{amb,opt,dat}
++exec rm -r $td
+diff --git a/src/util/dayfact.csh b/src/util/dayfact.csh
+index 5545bde..a865d06 100644
+--- a/src/util/dayfact.csh
++++ b/src/util/dayfact.csh
+@@ -1,5 +1,5 @@
+ #!/bin/csh -f
+-# RCSid: $Id: dayfact.csh,v 2.7 2005/10/06 05:49:44 greg Exp $
++# RCSid: $Id: dayfact.csh,v 2.8 2008/08/25 04:50:32 greg Exp $
+ #
+ # Interactive script to calculate daylight factors
+ #
+@@ -16,6 +16,7 @@ set wporig=(0 0 0)
+ set wpsize=(1 1)
+ set rtargs=(-ab 1 -ad 256 -as 128 -aa .15 -av .3 .3 .3)
+ set maxres=128
++set td=`mktemp -d /tmp/df.XXXXXX`
+
+ alias readvar 'echo -n Enter \!:1 "[$\!:1]: ";set ans="$<";if("$ans" != "")set \!:1="$ans"'
+
+@@ -74,18 +75,18 @@ if ( $genskyf == $nofile ) then
+ echo "You will not be able to compute daylight factors"
+ echo "or energy savings since there is no gensky file."
+ else
+- xform -e $genskyf > /tmp/gsf$$
+- grep '^# gensky ' /tmp/gsf$$
++ xform -e $genskyf > $td/gsf
++ grep '^# gensky ' $td/gsf
+ if ( $status ) then
+ echo "The file $genskyf does not contain a gensky command\!"
+- rm -f /tmp/gsf$$
++ rm -f $td/gsf
+ goto getgenskyf
+ endif
+- set title=$title\ `sed -n 's/^# gensky *\([0-9][0-9]* *[0-9][0-9]* *[0-9][0-9.]*\).*$/\1/p' /tmp/gsf$$`
+- set extamb=`sed -n 's/^# Ground ambient level: //p' /tmp/gsf$$`
+- grep -s '^# gensky .* -c' /tmp/gsf$$
++ set title=$title\ `sed -n 's/^# gensky *\([0-9][0-9]* *[0-9][0-9]* *[0-9][0-9.]*\).*$/\1/p' $td/gsf`
++ set extamb=`sed -n 's/^# Ground ambient level: //p' $td/gsf`
++ grep -s '^# gensky .* -c' $td/gsf
+ set nodaysav=$status
+- rm -f /tmp/gsf$$
++ rm -f $td/gsf
+ if ( $nodaysav ) then
+ echo "The gensky command was not done for an overcast sky"
+ echo "(-c option), so energy savings cannot be calculated."
+@@ -115,18 +116,17 @@ if ( $ilpict == $nofile && $dfpict == $nofile && $dspict == $nofile ) then
+ endif
+ echo "Title for output picture"
+ readvar title
+-set sctemp=/tmp/sc$$.csh
++set sctemp=$td/sc.csh
+ cat <<'_EOF_' > $sctemp
+ if ( $illumpic != $nofile ) then
+ set iltemp=""
+ else
+- set iltemp=/tmp/il$$.pic
++ set iltemp=$td/il.pic
+ set illumpic=$iltemp
+ endif
+-set tltemp=/tmp/tl$$.pic
+-set dstemp=/tmp/ds$$.pic
+-set temp1=/tmp/tfa$$
+-set tempfiles=($iltemp $sctemp $tltemp $dstemp $temp1)
++set tltemp=$td/tl.pic
++set dstemp=$td/ds.pic
++set temp1=$td/tfa
+ echo "Your dayfact job is finished."
+ echo "Please check for error messages below."
+ echo ""
+@@ -160,7 +160,7 @@ if ( $dspict != $nofile ) then
+ $fcopts -m 100 -p $illumpic \\
+ | pcompos -a 1 - $tltemp > $dspict' >> $sctemp
+ endif
+-echo 'rm -f $tempfiles' >> $sctemp
++echo 'rm -r $td' >> $sctemp
+ (source $sctemp) |& mail `whoami` &
+ echo "Your job is started in the background."
+ echo "You will be notified by mail when it is done."
+diff --git a/src/util/objline.csh b/src/util/objline.csh
+index 83053e3..fee7857 100644
+--- a/src/util/objline.csh
++++ b/src/util/objline.csh
+@@ -1,11 +1,10 @@
+ #!/bin/csh -f
+-# RCSid: $Id: objline.csh,v 2.4 2005/02/16 05:40:12 greg Exp $
++# RCSid: $Id: objline.csh,v 2.5 2008/08/25 04:50:32 greg Exp $
+ # Create four standard views of scene and present as line drawings
+ #
+ set oblqxf="-rz 45 -ry 45"
+-set d=/tmp/ol$$
+ onintr quit
+-mkdir $d
++set d=`mktemp -d /tmp/ol.XXXXXX`
+ if ($#argv) then
+ set origf=""
+ set oblqf=""
+diff --git a/src/util/raddepend.csh b/src/util/raddepend.csh
+index e938411..9c9f1e6 100644
+--- a/src/util/raddepend.csh
++++ b/src/util/raddepend.csh
+@@ -1,5 +1,5 @@
+ #!/bin/csh -f
+-# RCSid: $Id: raddepend.csh,v 2.7 2003/02/22 02:07:30 greg Exp $
++# RCSid: $Id: raddepend.csh,v 2.8 2008/08/25 04:50:32 greg Exp $
+ #
+ # Find scene dependencies in this directory
+ #
+@@ -8,14 +8,15 @@ onintr quit
+ rm -f EMPTY
+ echo -n > EMPTY
+ sleep 2
+-( ls $* | sed -e 's~/~\\/~g' -e 's@^@/^@' -e 's@$@$/d@' ; echo '/^EMPTY$/,$d' ) > /tmp/sed$$
++set sedf=`mktemp /tmp/sed.XXXXXX`
++( ls $* | sed -e 's~/~\\/~g' -e 's@^@/^@' -e 's@$@$/d@' ; echo '/^EMPTY$/,$d' ) > $sedf
+ getbbox -w $* >/dev/null
+ set es=$status
+ if ( $es == 0 ) then
+ sync
+ sleep 2
+- ls -tuL | sed -f /tmp/sed$$ | sort
++ ls -tuL | sed -f $sedf | sort
+ endif
+ quit:
+-rm -f /tmp/sed$$ EMPTY
++rm -f $sedf EMPTY
+ exit $es
Reply to: