(plugin) apps::protocols::nrpe - remove basic and credentials options (#3526)

This commit is contained in:
qgarnier 2022-03-07 11:45:57 +01:00 committed by GitHub
parent a2e65c1592
commit b0b7838cd8
1 changed files with 1 additions and 3 deletions

View File

@ -49,8 +49,6 @@ sub new {
'hostname:s' => { name => 'hostname' }, 'hostname:s' => { name => 'hostname' },
'port:s' => { name => 'port' }, 'port:s' => { name => 'port' },
'proto:s' => { name => 'proto' }, 'proto:s' => { name => 'proto' },
'credentials' => { name => 'credentials' },
'basic' => { name => 'basic' },
'username:s' => { name => 'username' }, 'username:s' => { name => 'username' },
'password:s' => { name => 'password' }, 'password:s' => { name => 'password' },
'legacy-password:s' => { name => 'legacy_password' }, 'legacy-password:s' => { name => 'legacy_password' },
@ -107,7 +105,7 @@ sub build_options_for_httplib {
$self->{option_results}->{proto} = $self->{proto}; $self->{option_results}->{proto} = $self->{proto};
$self->{option_results}->{timeout} = $self->{timeout}; $self->{option_results}->{timeout} = $self->{timeout};
if (defined($self->{username})) { if (defined($self->{username}) && $self->{username} ne '') {
$self->{option_results}->{username} = $self->{username}; $self->{option_results}->{username} = $self->{username};
$self->{option_results}->{password} = $self->{password}; $self->{option_results}->{password} = $self->{password};
$self->{option_results}->{credentials} = 1; $self->{option_results}->{credentials} = 1;