Mercurial > dropbear
comparison cli-runopts.c @ 442:d82a2a44c684
Add -u option to specify /dev/urandom instead
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Mon, 16 Apr 2007 13:39:50 +0000 |
parents | ab57ba0cb667 |
children | 2cd2edfa11ee |
comparison
equal
deleted
inserted
replaced
441:fdf06a5a54e4 | 442:d82a2a44c684 |
---|---|
27 #include "signkey.h" | 27 #include "signkey.h" |
28 #include "buffer.h" | 28 #include "buffer.h" |
29 #include "dbutil.h" | 29 #include "dbutil.h" |
30 #include "algo.h" | 30 #include "algo.h" |
31 #include "tcpfwd.h" | 31 #include "tcpfwd.h" |
32 #include "random.h" | |
32 | 33 |
33 cli_runopts cli_opts; /* GLOBAL */ | 34 cli_runopts cli_opts; /* GLOBAL */ |
34 | 35 |
35 static void printhelp(); | 36 static void printhelp(); |
36 static void parsehostname(char* userhostarg); | 37 static void parsehostname(char* userhostarg); |
51 "-t Allocate a pty\n" | 52 "-t Allocate a pty\n" |
52 "-T Don't allocate a pty\n" | 53 "-T Don't allocate a pty\n" |
53 "-N Don't run a remote command\n" | 54 "-N Don't run a remote command\n" |
54 "-f Run in background after auth\n" | 55 "-f Run in background after auth\n" |
55 "-y Always accept remote host key if unknown\n" | 56 "-y Always accept remote host key if unknown\n" |
57 "-u Use /dev/urandom - use with caution\n" | |
56 #ifdef ENABLE_CLI_PUBKEY_AUTH | 58 #ifdef ENABLE_CLI_PUBKEY_AUTH |
57 "-i <identityfile> (multiple allowed)\n" | 59 "-i <identityfile> (multiple allowed)\n" |
58 #endif | 60 #endif |
59 #ifdef ENABLE_CLI_LOCALTCPFWD | 61 #ifdef ENABLE_CLI_LOCALTCPFWD |
60 "-L <listenport:remotehost:remoteport> Local port forwarding\n" | 62 "-L <listenport:remotehost:remoteport> Local port forwarding\n" |
84 int nextisremote = 0; | 86 int nextisremote = 0; |
85 #endif | 87 #endif |
86 char* dummy = NULL; /* Not used for anything real */ | 88 char* dummy = NULL; /* Not used for anything real */ |
87 | 89 |
88 /* see printhelp() for options */ | 90 /* see printhelp() for options */ |
91 opts.listen_fwd_all = 0; | |
89 cli_opts.progname = argv[0]; | 92 cli_opts.progname = argv[0]; |
90 cli_opts.remotehost = NULL; | 93 cli_opts.remotehost = NULL; |
91 cli_opts.remoteport = NULL; | 94 cli_opts.remoteport = NULL; |
92 cli_opts.username = NULL; | 95 cli_opts.username = NULL; |
93 cli_opts.cmd = NULL; | 96 cli_opts.cmd = NULL; |
98 #ifdef ENABLE_CLI_PUBKEY_AUTH | 101 #ifdef ENABLE_CLI_PUBKEY_AUTH |
99 cli_opts.privkeys = NULL; | 102 cli_opts.privkeys = NULL; |
100 #endif | 103 #endif |
101 #ifdef ENABLE_CLI_LOCALTCPFWD | 104 #ifdef ENABLE_CLI_LOCALTCPFWD |
102 cli_opts.localfwds = NULL; | 105 cli_opts.localfwds = NULL; |
103 opts.listen_fwd_all = 0; | |
104 #endif | 106 #endif |
105 #ifdef ENABLE_CLI_REMOTETCPFWD | 107 #ifdef ENABLE_CLI_REMOTETCPFWD |
106 cli_opts.remotefwds = NULL; | 108 cli_opts.remotefwds = NULL; |
107 #endif | 109 #endif |
108 /* not yet | 110 /* not yet |
195 next = &cli_opts.username; | 197 next = &cli_opts.username; |
196 break; | 198 break; |
197 case 'h': | 199 case 'h': |
198 printhelp(); | 200 printhelp(); |
199 exit(EXIT_SUCCESS); | 201 exit(EXIT_SUCCESS); |
202 break; | |
203 case 'u': | |
204 random_dev = DROPBEAR_URANDOM_DEV; | |
200 break; | 205 break; |
201 #ifdef DEBUG_TRACE | 206 #ifdef DEBUG_TRACE |
202 case 'v': | 207 case 'v': |
203 debug_trace = 1; | 208 debug_trace = 1; |
204 break; | 209 break; |