From 05ec4557e855c65801c736a08a872d72654350b2 Mon Sep 17 00:00:00 2001 From: Raphael Hertzog Date: Wed, 8 Apr 2009 08:16:49 +0000 Subject: [PATCH] weak-ssh-keys-check: add options to be able to use it on non-DSA system --- dsa-nagios-checks/share/weak-ssh-keys-check | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/dsa-nagios-checks/share/weak-ssh-keys-check b/dsa-nagios-checks/share/weak-ssh-keys-check index e35a8a1..7587862 100755 --- a/dsa-nagios-checks/share/weak-ssh-keys-check +++ b/dsa-nagios-checks/share/weak-ssh-keys-check @@ -92,11 +92,13 @@ use IPC::Open3; my $fprdb_fname = "/var/lib/dsa/ssh-weak-keys.db" ; my ($outfile, $help); my $dsa_nowarn = 0; +my $debian_org = 1; GetOptions( 'help|h' => \$help, #Help function 'statusfile|s=s' => \$outfile, 'fprdb|f=s' => \$fprdb_fname, - 'n|dsa_nowarn' => \$dsa_nowarn, + 'n|dsa_nowarn' => \$dsa_nowarn, + 'd|debian-org!' => \$debian_org, ); pod2usage(1) if $help; @@ -123,9 +125,11 @@ my $text = ''; my %key_sizes; - -#&from_user_all; -&from_debianorg_places; +if ($debian_org) { + &from_debianorg_places; +} else { + &from_user_all; +} &from_ssh_host(qw(localhost)); my $status="OK"; -- 2.20.1