]> sipb.mit.edu Git - ikiwiki.git/commitdiff
avoid tempfile warning
authorJoey Hess <joey@gnu.kitenet.net>
Mon, 14 Sep 2009 00:20:21 +0000 (20:20 -0400)
committerJoey Hess <joey@gnu.kitenet.net>
Mon, 14 Sep 2009 00:20:21 +0000 (20:20 -0400)
Allow tempfile to open the file, so it doesn't warn about possible
insecurity. This probably fixes a real, but unlikely security hole too.

IkiWiki/Plugin/cvs.pm

index 1a0bad75fa3e9a272c7a4bdc42e31306931256ca..f6db8bc98b0f723feb40363eb7978ffc469c9ab9 100644 (file)
@@ -322,7 +322,7 @@ sub rcs_recentchanges($) {
        eval q{use File::ReadBackwards};
        error($@) if $@;
 
-       my (undef, $tmpfile) = tempfile(OPEN=>0);
+       my ($tmphandle, $tmpfile) = tempfile();
        system("env TZ=UTC cvsps -q --cvs-direct -z 30 -x >$tmpfile");
        if ($? == -1) {
                error "couldn't run cvsps: $!\n";