From 9ea3303104b15dee62451b9855e4691d7d0595bc Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Mon, 20 Dec 2010 16:11:39 -0500 Subject: [PATCH] avoid some spurious error messages when no agent is found --- Crypt/Monkeysphere/MSVA.pm | 4 ++++ gpgkeys_hkpms | 1 + 2 files changed, 5 insertions(+) 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. -- 2.26.2