[nagiosplug] fixing bug in certificate experiation patch ...

"Nagios Plugin Development" <[email protected]> Fri, 10 Aug 2012 12:40:28 +0000
Newsgroups gmane.network.nagios.plugins.cvs
Message-ID <[email protected]>
    Module: nagiosplug
    Branch: master
    Commit: 6b844aea9f285a545ffbacb8b03e1cf7da55a69a
    Author: William Leibzon <[email protected]>
 Committer: Holger Weiss <[email protected]>
      Date: Thu Jul 26 17:17:58 2012 -0700
       URL: http://nagiosplug.git.sf.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=commit;h=6b844ae

fixing bug in certificate experiation patch checking for bad warning threshold data

---

 plugins/check_http.c |    2 +-
 plugins/check_smtp.c |    2 +-
 plugins/check_tcp.c  |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/plugins/check_http.c b/plugins/check_http.c
index 5c8a80c..63addfc 100644
--- a/plugins/check_http.c
+++ b/plugins/check_http.c
@@ -285,7 +285,7 @@ process_arguments (int argc, char **argv)
 #ifdef HAVE_SSL
       if ((temp=strchr(optarg,','))!=NULL) {
         *temp='\0';
-        if (!is_intnonneg (temp))
+        if (!is_intnonneg (optarg))
           usage2 (_("Invalid certificate expiration period"), optarg);
         days_till_exp_warn = atoi(optarg);
         *temp=',';
diff --git a/plugins/check_smtp.c b/plugins/check_smtp.c
index a861a71..79fa482 100644
--- a/plugins/check_smtp.c
+++ b/plugins/check_smtp.c
@@ -593,7 +593,7 @@ process_arguments (int argc, char **argv)
 #ifdef USE_OPENSSL
                         if ((temp=strchr(optarg,','))!=NULL) {
                             *temp='\0';
-                            if (!is_intnonneg (temp))
+                            if (!is_intnonneg (optarg))
                                usage2 ("Invalid certificate expiration period", optarg);
                             days_till_exp_warn = atoi(optarg);
                             *temp=',';
diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c
index f464b15..af3ae24 100644
--- a/plugins/check_tcp.c
+++ b/plugins/check_tcp.c
@@ -555,7 +555,7 @@ process_arguments (int argc, char **argv)
 #  ifdef USE_OPENSSL /* XXX */
 			if ((temp=strchr(optarg,','))!=NULL) {
 			    *temp='\0';
-			    if (!is_intnonneg (temp))
+			    if (!is_intnonneg (optarg))
                                usage2 (_("Invalid certificate expiration period"), optarg);				 days_till_exp_warn = atoi(optarg);
 			    *temp=',';
 			    temp++;


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/