File: 1003_correctly-quote-when-opening-pipe.patch

package info (click to toggle)
uif 1.1.9-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 656 kB
  • sloc: perl: 1,992; sh: 499; makefile: 37
file content (32 lines) | stat: -rw-r--r-- 744 bytes parent folder | download
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
32
Description: Use double quotes in open statement to properly evaluate variables.
Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>

--- a/uif.pl
+++ b/uif.pl
@@ -1490,7 +1490,7 @@
 
 	@$Listing=map { $_."\n" } @$Listing;
 
-	open (IPT, '$iptables_save|');
+	open (IPT, "$iptables_save|");
 
 	@oldrules = <IPT>;
 	close (IPT);
@@ -1500,7 +1500,7 @@
 	$SIG{'QUIT'} = 'signalCatcher';
 	$SIG{'TERM'} = 'signalCatcher';
 
-	open (IPT, '|$iptables_restore');
+	open (IPT, "|$iptables_restore");
 
 	print IPT @$Listing;
 	close (IPT);
@@ -1510,7 +1510,7 @@
 		sleep $timeout;
 	}
 	if ($timeout || $SignalCatched || $error) {
-		open (IPT, '|$iptables_restore');
+		open (IPT, "|$iptables_restore");
 
 		print IPT @oldrules;
 		close (IPT);