tag 496374 patch
thanks

The following patch should fix this issue (fully untested though, I
will not upload this):

#! /bin/sh /usr/share/dpatch/dpatch-run
## livetest-temp-files.dpatch by Frank Lichtenheld <[EMAIL PROTECTED]>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Fix some insecure tempfile usages.

@DPATCH@
diff -urNad openswan-2.4.12+dfsg~/programs/livetest/livetest.in 
openswan-2.4.12+dfsg/programs/livetest/livetest.in
--- openswan-2.4.12+dfsg~/programs/livetest/livetest.in 2005-07-15 
18:39:25.000000000 +0200
+++ openswan-2.4.12+dfsg/programs/livetest/livetest.in  2008-09-14 
01:43:43.000000000 +0200
@@ -36,13 +36,17 @@
 
 #echo wget  http://192.168.0.1/olts/?leftid=$leftid\&$leftrsasigkey&$version
 
-wget -o /dev/null  -O /tmp/ipseclive.conn 
"http://192.168.0.1/olts/?leftid=$leftid&$leftrsasigkey&version=$version";
+connection=$(mktemp -t ipseclive.conn.XXXXXX)
+local_log=$(mktemp -t ipsec.olts.local.log.XXXXXX)
+remote_log=$(mktemp -t ipsec.olts.remote.log.XXXXXX)
 
-sh < /tmp/ipseclive.conn
+wget -o /dev/null  -O $connection 
"http://192.168.0.1/olts/?leftid=$leftid&$leftrsasigkey&version=$version";
+
+sh < $connection
 ipsec eroute.pl
 leftid=`echo $leftid | sed "s/@//"`
-ipsec whack --delete --name olts-$leftid >> /tmp/ipsec.olts.local.log
-wget -o /dev/null -O /tmp/ipsec.olts.remote.log 
"http://192.168.0.1/olts/log.php?leftid=$leftid";
+ipsec whack --delete --name olts-$leftid > $local_log
+wget -o /dev/null -O $remote_log 
"http://192.168.0.1/olts/log.php?leftid=$leftid";
 
 #
 # $Log: livetest.in,v $

Gruesse,
-- 
Frank Lichtenheld <[EMAIL PROTECTED]>
www: http://www.djpig.de/



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to