Преглед изворни кода

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

William Leibzon пре 13 година
родитељ
комит
6b844aea9f
3 измењених фајлова са 3 додато и 3 уклоњено
  1. 1 1
      plugins/check_http.c
  2. 1 1
      plugins/check_smtp.c
  3. 1 1
      plugins/check_tcp.c

+ 1 - 1
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=',';

+ 1 - 1
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=',';

+ 1 - 1
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++;