]> git.pld-linux.org Git - packages/groff.git/commitdiff
- secure /tmp use (from fedora)
authorJan Rękorajski <baggins@pld-linux.org>
Tue, 7 Nov 2006 14:25:20 +0000 (14:25 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    groff-sectmp.patch -> 1.1

groff-sectmp.patch [new file with mode: 0644]

diff --git a/groff-sectmp.patch b/groff-sectmp.patch
new file mode 100644 (file)
index 0000000..cab31fe
--- /dev/null
@@ -0,0 +1,43 @@
+--- groff-1.18.1.4/contrib/eqn2graph/eqn2graph.sh.sectmp       2006-10-23 14:12:41.000000000 +0200
++++ groff-1.18.1.4/contrib/eqn2graph/eqn2graph.sh      2006-10-23 14:20:20.000000000 +0200
+@@ -63,12 +63,14 @@
+ # 2. Process through eqn(1) to emit troff markup.
+ # 3. Process through groff(1) to emit Postscript.
+ # 4. Use convert(1) to crop the Postscript and turn it into a bitmap.
+-tmp=/tmp/eqn2graph-$$
+-trap "rm ${tmp}.*" 0 2 15 
++
++tmpps=`mktemp /tmp/eqn2graph-XXXXXXXX.ps`
++tmpfmt=`mktemp /tmp/eqn2graph-XXXXXXXX.$format`
++trap "rm $tmpps $tmpfmt" 0 2 15
+ read equation
+ (echo ".EQ"; echo 'delim $$'; echo ".EN"; echo '$'"${equation}"'$') | \
+-      groff -e $groff_opts -Tps >${tmp}.ps \
+-      && convert -crop 0x0 $convert_opts ${tmp}.ps ${tmp}.${format} \
+-      && cat ${tmp}.${format}
++       groff -e $groff_opts -Tps >$tmpps \
++       && convert -crop 0x0 $convert_opts $tmpps $tmpfmt \
++       && cat $tmpfmt
+ # End
+--- groff-1.18.1.4/contrib/pic2graph/pic2graph.sh.sectmp       2006-10-23 14:12:41.000000000 +0200
++++ groff-1.18.1.4/contrib/pic2graph/pic2graph.sh      2006-10-23 14:18:57.000000000 +0200
+@@ -73,11 +73,13 @@
+ # 2. Process through eqn and pic to emit troff markup.
+ # 3. Process through groff to emit Postscript.
+ # 4. Use convert(1) to crop the PostScript and turn it into a bitmap.
+-tmp=/tmp/pic2graph-$$
+-trap "rm ${tmp}.*" 0 2 15 
++
++tmpps=`mktemp /tmp/pic2graph-XXXXXXXX.ps`
++tmpfmt=`mktemp /tmp/pic2graph-XXXXXXXX.$format`
++trap "rm $tmpps $tmpfmt" 0 2 15
+ (echo ".EQ"; echo $eqndelim; echo ".EN"; echo ".PS"; cat; echo ".PE") | \
+-       groff -e -p $groffpic_opts -Tps >${tmp}.ps \
+-       && convert -crop 0x0 $convert_opts ${tmp}.ps ${tmp}.${format} \
+-       && cat ${tmp}.${format}
++       groff -e -p $groffpic_opts -Tps >$tmpps \
++       && convert -crop 0x0 $convert_opts $tmpps $tmpfmt \
++       && cat $tmpfmt
+ # End
This page took 0.363733 seconds and 4 git commands to generate.