From: Daniel Kahn Gillmor Date: Mon, 20 Dec 2010 21:11:39 +0000 (-0500) Subject: avoid some spurious error messages when no agent is found X-Git-Tag: msva-perl_debian/0.8-1~1^2 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=9ea3303104b15dee62451b9855e4691d7d0595bc;p=monkeysphere-validation-agent.git avoid some spurious error messages when no agent is found --- diff --git a/Crypt/Monkeysphere/MSVA.pm b/Crypt/Monkeysphere/MSVA.pm index bd81606..cadfee6 100755 --- a/Crypt/Monkeysphere/MSVA.pm +++ b/Crypt/Monkeysphere/MSVA.pm @@ -217,6 +217,10 @@ sub getpidswithsocketinode { my $sockid = shift; + if (! defined ($sockid)) { + msvalog('verbose', "No client socket ID to check. The MSVA is probably not running as a service.\n"); + return []; + } # this appears to be how Linux symlinks open sockets in /proc/*/fd, # as of at least 2.6.26: my $socktarget = sprintf('socket:[%d]', $sockid); diff --git a/gpgkeys_hkpms b/gpgkeys_hkpms index 03a79f2..75ce01b 100755 --- a/gpgkeys_hkpms +++ b/gpgkeys_hkpms @@ -92,6 +92,7 @@ use warnings; ($status, $ret) = $self->{client}->query_agent('https', $self->{config}->{host}, 'server', 'x509pem', $certpem, 'never'); } else { use Crypt::Monkeysphere::MSVA; + $self->{logger}->log('verbose', "Could not find a running agent (MONKEYSPHERE_VALIDATION_AGENT_SOCKET env var).\nFalling back to in-process certificate checks.\n"); # If there is no running agent, we might want to be able to fall # back here.