[exim-dev] [Bug 1495] Add checks for the -C option to exiqgr…

Top Page
Delete this message
Reply to this message
Author: Git Commit
Date:  
To: exim-dev
Subject: [exim-dev] [Bug 1495] Add checks for the -C option to exiqgrep
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1495

Git Commit <git@???> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |git@???





--- Comment #2 from Git Commit <git@???> 2014-07-02 15:17:09 ---
Git commit:
http://git.exim.org/exim.git/commitdiff/3ae173e7c0fd026a06c8804d38fe2c03d161e402

commit 3ae173e7c0fd026a06c8804d38fe2c03d161e402
Author:     Andrew Colin Kissa <andrew@???>
AuthorDate: Wed Jul 2 07:00:46 2014 -0700
Commit:     Todd Lyons <tlyons@???>
CommitDate: Wed Jul 2 07:00:46 2014 -0700


    Bug 1495: Exiqgrep -C check configfile readability
---
 doc/doc-txt/ChangeLog |    3 +++
 src/src/exiqgrep.src  |    2 +-
 2 files changed, 4 insertions(+), 1 deletions(-)


diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog
index 606c820..cafc8fa 100644
--- a/doc/doc-txt/ChangeLog
+++ b/doc/doc-txt/ChangeLog
@@ -135,6 +135,9 @@ JH/26 Port service names are now accepted for
tls_on_connect_ports, to
 TF/03 Fix udpsend. The ip_connectedsocket() function's socket type
       support and error reporting did not work properly.


+TL/13 Bug 1495: Exiqgrep check if -C config file specified on cli exists
+      and is readable.  Patch from Andrew Colin Kissa.
+


Exim version 4.82
-----------------
diff --git a/src/src/exiqgrep.src b/src/src/exiqgrep.src
index 94b17f5..afecbff 100644
--- a/src/src/exiqgrep.src
+++ b/src/src/exiqgrep.src
@@ -46,7 +46,7 @@ if ($^O eq 'darwin') { # aka MacOS X
getopts('hf:r:y:o:s:C:zxlibRca',\%opt);
if ($opt{h}) { &help; exit;}
if ($opt{a}) { $eargs = '-bp'; }
-if ($opt{C}) { $eargs .= ' -C '.$opt{C}; }
+if ($opt{C} && -e $opt{C} && -f $opt{C} && -R $opt{C}) { $eargs .= ' -C
'.$opt{C}; }

# Read message queue output into hash
&collect();


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email