X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=dsa-nagios-checks%2Fshare%2Fweak-ssh-keys-check;h=a9bd75239814b91c07c1744cd5066d849d3f2e34;hb=8cd22f5f26b527cd737ecb50158cfac3bd9010bb;hp=7587862b0c5765dbdb8bf8ac41010261ede0d39f;hpb=c3212c3f62d849d3de462cfed6f0c9aaa6d1e9d9;p=mirror%2Fdsa-nagios.git diff --git a/dsa-nagios-checks/share/weak-ssh-keys-check b/dsa-nagios-checks/share/weak-ssh-keys-check index 7587862..a9bd752 100755 --- a/dsa-nagios-checks/share/weak-ssh-keys-check +++ b/dsa-nagios-checks/share/weak-ssh-keys-check @@ -202,6 +202,7 @@ sub from_ssh_key_file ($) { my $name = shift; if (open (my $FH, '<', $name)) { my $key = <$FH>; + close($FH); if (! defined $key) { $weird_keyfiles++; $text .= "cannot read $name properly - empty?\n"; @@ -336,7 +337,7 @@ sub from_debianorg_places () { for my $file (grep { ! -d $d.'/'.$_ } readdir(D)) { next if ($file eq 'README-DSA-BUILDD'); my $f = $d.'/'.$file; - from_ssh_key_file $f if -r $f; + from_ssh_auth_file $f if -r $f; }; }; }