Merge commit 'buxy/master' into merge
authorPeter Palfrader <peter@palfrader.org>
Fri, 24 Apr 2009 19:31:40 +0000 (21:31 +0200)
committerPeter Palfrader <peter@palfrader.org>
Fri, 24 Apr 2009 19:31:40 +0000 (21:31 +0200)
* commit 'buxy/master':
  weak-ssh-keys-check: add options to be able to use it on non-DSA system
  dsa-check-dabackup: add command-line options to override limits

Signed-off-by: Peter Palfrader <peter@palfrader.org>
dsa-nagios-checks/checks/dsa-check-dabackup
dsa-nagios-checks/share/weak-ssh-keys-check

index f400023..6ce30b2 100755 (executable)
@@ -60,7 +60,7 @@ sub help($$) {
        my ($exitcode, $fd) = @_;
        version ($fd, 0);
        print $fd "Usage: $PROGRAM_NAME --help\n";
-       print $fd "Usage: $PROGRAM_NAME";
+       print $fd "Usage: $PROGRAM_NAME [--fresh <minseconds>] [--maxage <seconds>]";
        exit $exitcode
 };
 
@@ -69,6 +69,8 @@ my $params = {};
 Getopt::Long::config('bundling');
 if (!GetOptions (
        'h|help'        =>  \$params->{'help'},
+        'f|fresh=i'    =>  \$TOO_FRESH,
+        'm|maxage=i'    =>  \$MAX_AGE,
        )) {
        die ("$PROGRAM_NAME: Usage: $PROGRAM_NAME [-fwhv]\n");
 };
index e35a8a1..7587862 100755 (executable)
@@ -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";