]> andersk Git - openssh.git/blobdiff - ssh-rand-helper.c
- djm@cvs.openbsd.org 2010/01/30 02:54:53
[openssh.git] / ssh-rand-helper.c
index ebee90014d3cbb42ae9d8cd744fde27c711aa74b..0fcda7fff169f8b9ea2b0b959ab0b34158a2b776 100644 (file)
 #include <sys/wait.h>
 #include <sys/socket.h>
 
+#include <stdarg.h>
+#include <stddef.h>
+#include <string.h>
+
 #include <netinet/in.h>
+#include <arpa/inet.h>
 
 #ifdef HAVE_SYS_UN_H
 # include <sys/un.h>
 #endif
 
+#include <errno.h>
 #include <fcntl.h>
 #include <pwd.h>
 #include <signal.h>
+#include <time.h>
+#include <unistd.h>
 
 #include <openssl/rand.h>
 #include <openssl/sha.h>
@@ -845,11 +853,17 @@ main(int argc, char **argv)
                default:
                        error("Invalid commandline option");
                        usage();
+                       exit(1);
                }
        }
-
        log_init(argv[0], ll, SYSLOG_FACILITY_USER, 1);
 
+       if (argc != optind) {
+               error("Unexpected commandline arguments.");
+               usage();
+               exit(1);
+       }
+
 #ifdef USE_SEED_FILES
        prng_read_seedfile();
 #endif
This page took 0.088741 seconds and 4 git commands to generate.