Ver Fonte

Fix bogus 'eq ( || )' constructions in check_ifoperstatus.pl.

git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1642 f882894a-f735-0410-b71e-b25c423dba1c
Gavin Carr há 19 anos atrás
pai
commit
8d0e8a652f
1 ficheiros alterados com 3 adições e 3 exclusões
  1. 3 3
      plugins-scripts/check_ifoperstatus.pl

+ 3 - 3
plugins-scripts/check_ifoperstatus.pl

@@ -384,15 +384,15 @@ sub process_arguments() {
 		if (defined $seclevel  && defined $secname) {
 		
 			# Must define a security level even though defualt is noAuthNoPriv
-			unless ($seclevel eq ('noAuthNoPriv' || 'authNoPriv' || 'authPriv' ) ) {
+			unless ( grep /^$seclevel$/, qw(noAuthNoPriv authNoPriv authPriv) ) {
 				usage();
 				exit $ERRORS{"UNKNOWN"};
 			}
 			
 			# Authentication wanted
-			if ($seclevel eq ('authNoPriv' || 'authPriv') ) {
+			if ( $seclevel eq 'authNoPriv' || $seclevel eq 'authPriv' ) {
 		
-				unless ($authproto eq ('MD5' || 'SHA1') ) {
+				unless ( $authproto eq 'MD5' || $authproto eq 'SHA1' ) {
 					usage();
 					exit $ERRORS{"UNKNOWN"};
 				}