988dc76
From 9673b54064691a5b9c295ffea340d8a1f9ee1cb8 Mon Sep 17 00:00:00 2001
988dc76
From: Yasuhiro KIMURA <yasu@utahime.org>
988dc76
Date: Sat, 17 Aug 2013 22:05:27 +0900
988dc76
Subject: [PATCH] Make postgrey work with Perl 5.18
988dc76
988dc76
---
988dc76
 postgrey | 10 ++++++++++
988dc76
 1 file changed, 10 insertions(+)
988dc76
988dc76
diff --git a/postgrey b/postgrey
988dc76
index 7cb0352..37f69bd 100755
988dc76
--- a/postgrey
988dc76
+++ b/postgrey
988dc76
@@ -557,6 +557,16 @@ sub main()
988dc76
     if($opt{dbdir}) {
988dc76
         $opt{dbdir} =~ /^(.*)$/; $opt{dbdir} = $1;
988dc76
     }
988dc76
+    # untaint what is given on --pidfile. It is not security sensitive since
988dc76
+    # it is provided by the admin
988dc76
+    if($opt{pidfile}) {
988dc76
+        $opt{pidfile} =~ /^(.*)$/; $opt{pidfile} = $1;
988dc76
+    }
988dc76
+    # untaint what is given on --inet. It is not security sensitive since
988dc76
+    # it is provided by the admin
988dc76
+    if($opt{inet}) {
988dc76
+        $opt{inet} =~ /^(.*)$/; $opt{inet} = $1;
988dc76
+    }
988dc76
 
988dc76
     # determine proper "logsock" for Sys::Syslog
988dc76
     my $syslog_logsock;
988dc76
-- 
988dc76
1.8.4.2
988dc76