summaryrefslogtreecommitdiff
path: root/ssh-rand-helper.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2009-11-20 15:16:35 +1100
committerDamien Miller <djm@mindrot.org>2009-11-20 15:16:35 +1100
commit409661f0d99bf9bc82543eb7bab1f502c9170281 (patch)
tree32f6b39f9c828f3697825f02dd755fb6546f1b15 /ssh-rand-helper.c
parent2191e04549839502631f3f97ededd301a1498cd0 (diff)
- (djm) [ssh-rand-helper.c] Print error and usage() when passed command-
line arguments as none are supported. Exit when passed unrecognised commandline flags. bz#1568 from gson AT araneus.fi
Diffstat (limited to 'ssh-rand-helper.c')
-rw-r--r--ssh-rand-helper.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/ssh-rand-helper.c b/ssh-rand-helper.c
index 8b1c4b4f4..0fcda7fff 100644
--- a/ssh-rand-helper.c
+++ b/ssh-rand-helper.c
@@ -853,11 +853,17 @@ main(int argc, char **argv)
853 default: 853 default:
854 error("Invalid commandline option"); 854 error("Invalid commandline option");
855 usage(); 855 usage();
856 exit(1);
856 } 857 }
857 } 858 }
858
859 log_init(argv[0], ll, SYSLOG_FACILITY_USER, 1); 859 log_init(argv[0], ll, SYSLOG_FACILITY_USER, 1);
860 860
861 if (argc != optind) {
862 error("Unexpected commandline arguments.");
863 usage();
864 exit(1);
865 }
866
861#ifdef USE_SEED_FILES 867#ifdef USE_SEED_FILES
862 prng_read_seedfile(); 868 prng_read_seedfile();
863#endif 869#endif