Merge branch 'ent-6979-fallo-discovery-contraseñas-caracteres-especiales' into 'develop'
Fix issue Closes pandora_enterprise#6979 See merge request artica/pandorafms!3821
This commit is contained in:
commit
c4b6f709c9
|
@ -2116,17 +2116,17 @@ sub snmp_get_command {
|
|||
my $command = "snmpwalk -M$DEVNULL -r$self->{'snmp_checks'} -t$self->{'snmp_timeout'} -v$self->{'snmp_version'} -On -Oe ";
|
||||
if ($self->{'snmp_version'} eq "3") {
|
||||
if ($self->{'community'}) { # Context
|
||||
$command .= " -N $self->{'community'} ";
|
||||
$command .= " -N \'$self->{'community'}\' ";
|
||||
}
|
||||
$command .= " -l$self->{'snmp_security_level'} ";
|
||||
if ($self->{'snmp_security_level'} ne "noAuthNoPriv") {
|
||||
$command .= " -u$self->{'snmp_auth_user'} -a$self->{'snmp_auth_method'} -A$self->{'snmp_auth_pass'} ";
|
||||
$command .= " -u$self->{'snmp_auth_user'} -a $self->{'snmp_auth_method'} -A \'$self->{'snmp_auth_pass'}\' ";
|
||||
}
|
||||
if ($self->{'snmp_security_level'} eq "authPriv") {
|
||||
$command .= " -x$self->{'snmp_privacy_method'} -X$self->{'snmp_privacy_pass'} ";
|
||||
$command .= " -x$self->{'snmp_privacy_method'} -X \'$self->{'snmp_privacy_pass'}\' ";
|
||||
}
|
||||
} else {
|
||||
$command .= " -c$community$vlan ";
|
||||
$command .= " -c\'$community\'$vlan ";
|
||||
}
|
||||
|
||||
return "$command $device $oid 2>$DEVNULL";
|
||||
|
|
Loading…
Reference in New Issue