diff --git a/rpm/SPECS/anvil.spec b/rpm/SPECS/anvil.spec index 162643dc..6691fe20 100644 --- a/rpm/SPECS/anvil.spec +++ b/rpm/SPECS/anvil.spec @@ -287,8 +287,8 @@ firewall-cmd --add-service=postgresql --permanent %changelog -* tbd Madison Kelly 3.0-26 -- +* Wed Oct 02 2019 Madison Kelly 3.0-26 +- Updated source * Mon Sep 23 2019 Madison Kelly 3.0-25 - Fixed a couple bugs found in the previous release. diff --git a/tools/anvil-configure-host b/tools/anvil-configure-host index bbb0aa77..ee7dc0b1 100755 --- a/tools/anvil-configure-host +++ b/tools/anvil-configure-host @@ -145,7 +145,6 @@ sub update_passwords } else { - my $return_code = ""; my ($output, $return_code) = $anvil->System->call({debug => 2, shell_call => $anvil->data->{path}{exe}{'anvil-change-password'}." -y --password-file ".$temp_file }); $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, secure => 0, list => { output => $output, return_code => $return_code }}); foreach my $line (split/\n/, $output) diff --git a/tools/anvil-manage-files b/tools/anvil-manage-files index 252eb852..c3763db9 100755 --- a/tools/anvil-manage-files +++ b/tools/anvil-manage-files @@ -463,11 +463,11 @@ AND remote_user => $remote_user, password => $password, target => $ip, - return_code => $return_code, }); $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { - error => $error, - output => $output, + error => $error, + output => $output, + return_code => $return_code, }}); foreach my $line (split/\n/, $output) { diff --git a/tools/striker-get-peer-data b/tools/striker-get-peer-data index c8641dd1..6ca1e7f0 100755 --- a/tools/striker-get-peer-data +++ b/tools/striker-get-peer-data @@ -319,7 +319,21 @@ sub get_password $anvil->nice_exit({exit_code => 1}); } - my $query = "SELECT state_note FROM states WHERE state_uuid=".$anvil->Database->quote($anvil->data->{switches}{'state-uuid'}).";"; + # Do we have a (valid) state_uuid? + if (not $anvil->data->{switches}{'state-uuid'}) + { + print "connected=0\n"; + $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, 'print' => 1, level => 0, priority => "err", key => "error_0083"}); + $anvil->nice_exit({exit_code => 1}); + } + elsif (not $anvil->Validate->is_uuid({uuid => $anvil->data->{switches}{'state-uuid'}})) + { + print "connected=0\n"; + $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, 'print' => 1, level => 0, priority => "err", key => "error_0082", variables => {state_uuid => $anvil->data->{switches}{'state-uuid'} }}); + $anvil->nice_exit({exit_code => 1}); + } + + my $query = "SELECT state_note FROM states WHERE state_uuid = ".$anvil->Database->quote($anvil->data->{switches}{'state-uuid'}).";"; $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => { query => $query }}); my $password = $anvil->Database->query({uuid => $anvil->data->{sys}{host_uuid}, debug => 3, query => $query, source => $THIS_FILE, line => __LINE__})->[0]->[0];