Browse Source

check_nrpe does not parse passed arguments correctly

Fix for issue http://tracker.nagios.org/view.php?id=222
John C. Frickson 10 năm trước cách đây
mục cha
commit
43ab15f8a7
2 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 1 0
      Changelog
  2. 1 1
      src/check_nrpe.c

+ 1 - 0
Changelog

@@ -11,6 +11,7 @@ FIXES
 - Added ifdefs for complete_SSL_shutdown to compile without SSL. (Matthew L. Daniel)
 - Renamed configure.in to configure.ac and added check for sigaction (John Frickson)
 - Replaced all instances of signal() with sigaction() + blocking (John Frickson)
+- check_nrpe does not parse passed arguments correctly (John Frickson)
 
 2.15 - 09/06/2013
 -----------------

+ 1 - 1
src/check_nrpe.c

@@ -374,7 +374,7 @@ int process_arguments(int argc, char **argv){
 #else
 		c=getopt(argc,argv,optchars);
 #endif
-		if(c==-1 || c==EOF)
+		if(c==-1 || c==EOF || argindex > 0)
 			break;
 
 		/* process all arguments */