Explorar o código

check_users: still allow zero thresholds

Signed-off-by: Sven Nierlein <sven@nierlein.de>
Sven Nierlein %!s(int64=9) %!d(string=hai) anos
pai
achega
52cd7d7934
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      plugins/check_users.c

+ 2 - 2
plugins/check_users.c

@@ -222,9 +222,9 @@ process_arguments (int argc, char **argv)
 	/* this will abort in case of invalid ranges */
 	set_thresholds (&thlds, warning_range, critical_range);
 
-	if (thlds->warning->end <= 0)
+	if (thlds->warning->end < 0)
 		usage4 (_("Warning threshold must be a positive integer"));
-	if (thlds->critical->end <= 0)
+	if (thlds->critical->end < 0)
 		usage4 (_("Critical threshold must be a positive integer"));
 
 	return OK;