~ubuntu-branches/ubuntu/jaunty/texlive-bin/jaunty-updates

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#! /bin/sh /usr/share/dpatch/dpatch-run
## 52_feynmf-perl-sec-fix.dpatch by Kevin B. McCarty
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: secure tmp file handling

@DPATCH@
--- ./texmf-dist/source/latex/feynmf/feynmf.pl.orig
+++ ./texmf-dist/source/latex/feynmf/feynmf.pl
@@ -270,10 +270,11 @@
     my @tfm = @_;
     # Prepare a fake temporary PL file
     # (/dev/null won't do, because the font must not be empty):
-    my ($pl) = "/tmp/feynmf$$.pl";
+    my ($pl) = `/bin/tempfile -p feynmf -s .pl`;
     my ($tfm);
     $pltotf_prog
 	or die "feynmf: fatal: pltopf programm required unless -notfm\n";
+    chop ($pl);
     open (PL, ">$pl") or die "feynmf: can't open temporary file $pl: $!\n";
     push @temporay_files, $pl;
     print PL <<__END_PL__;
@@ -373,7 +374,7 @@
 			maybe_run "$gftopk_prog $gf" if $gftopk_prog;
 		    }
 		}
-		close (<LOG>);
+		close (LOG);
 	    }
 	}
     }