Fix USR-Hiper SNMP code to match the cisco snmp bit.
authoraland <aland>
Tue, 15 Oct 2002 17:33:31 +0000 (17:33 +0000)
committeraland <aland>
Tue, 15 Oct 2002 17:33:31 +0000 (17:33 +0000)
src/main/checkrad.pl.in

index 738552e..0ee3b7e 100644 (file)
@@ -322,14 +322,14 @@ sub cisco_snmp {
 
        # Look up community string in naspasswd file.
        my ($login, $pass) = naspasswd($ARGV[1], 1);
-       if ($login && $login ne 'SNMP') {
+       if ($login eq '') {
+               $pass = 'public';
+       } elsif ($login ne 'SNMP') {
                if ($debug) {
                        print LOG
                        "   Error: Need SNMP community string for $ARGV[1]\n";
                }
                return 2;
-       } elsif ( $login ne 'SNMP') {
-               $pass = "public";
        }
 
        my $port = $ARGV[2];