comparison cli-runopts.c @ 446:2cd2edfa11ee

Just use /dev/urandom since that's what everyone ends up using anyway. Make -u a nop.
author Matt Johnston <matt@ucc.asn.au>
date Thu, 19 Jul 2007 15:47:32 +0000
parents d82a2a44c684
children 3e6c536bc023
comparison
equal deleted inserted replaced
445:edbee0596531 446:2cd2edfa11ee
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"
33 32
34 cli_runopts cli_opts; /* GLOBAL */ 33 cli_runopts cli_opts; /* GLOBAL */
35 34
36 static void printhelp(); 35 static void printhelp();
37 static void parsehostname(char* userhostarg); 36 static void parsehostname(char* userhostarg);
52 "-t Allocate a pty\n" 51 "-t Allocate a pty\n"
53 "-T Don't allocate a pty\n" 52 "-T Don't allocate a pty\n"
54 "-N Don't run a remote command\n" 53 "-N Don't run a remote command\n"
55 "-f Run in background after auth\n" 54 "-f Run in background after auth\n"
56 "-y Always accept remote host key if unknown\n" 55 "-y Always accept remote host key if unknown\n"
57 "-u Use /dev/urandom - use with caution\n"
58 #ifdef ENABLE_CLI_PUBKEY_AUTH 56 #ifdef ENABLE_CLI_PUBKEY_AUTH
59 "-i <identityfile> (multiple allowed)\n" 57 "-i <identityfile> (multiple allowed)\n"
60 #endif 58 #endif
61 #ifdef ENABLE_CLI_LOCALTCPFWD 59 #ifdef ENABLE_CLI_LOCALTCPFWD
62 "-L <listenport:remotehost:remoteport> Local port forwarding\n" 60 "-L <listenport:remotehost:remoteport> Local port forwarding\n"
86 int nextisremote = 0; 84 int nextisremote = 0;
87 #endif 85 #endif
88 char* dummy = NULL; /* Not used for anything real */ 86 char* dummy = NULL; /* Not used for anything real */
89 87
90 /* see printhelp() for options */ 88 /* see printhelp() for options */
91 opts.listen_fwd_all = 0;
92 cli_opts.progname = argv[0]; 89 cli_opts.progname = argv[0];
93 cli_opts.remotehost = NULL; 90 cli_opts.remotehost = NULL;
94 cli_opts.remoteport = NULL; 91 cli_opts.remoteport = NULL;
95 cli_opts.username = NULL; 92 cli_opts.username = NULL;
96 cli_opts.cmd = NULL; 93 cli_opts.cmd = NULL;
101 #ifdef ENABLE_CLI_PUBKEY_AUTH 98 #ifdef ENABLE_CLI_PUBKEY_AUTH
102 cli_opts.privkeys = NULL; 99 cli_opts.privkeys = NULL;
103 #endif 100 #endif
104 #ifdef ENABLE_CLI_LOCALTCPFWD 101 #ifdef ENABLE_CLI_LOCALTCPFWD
105 cli_opts.localfwds = NULL; 102 cli_opts.localfwds = NULL;
103 opts.listen_fwd_all = 0;
106 #endif 104 #endif
107 #ifdef ENABLE_CLI_REMOTETCPFWD 105 #ifdef ENABLE_CLI_REMOTETCPFWD
108 cli_opts.remotefwds = NULL; 106 cli_opts.remotefwds = NULL;
109 #endif 107 #endif
110 /* not yet 108 /* not yet
199 case 'h': 197 case 'h':
200 printhelp(); 198 printhelp();
201 exit(EXIT_SUCCESS); 199 exit(EXIT_SUCCESS);
202 break; 200 break;
203 case 'u': 201 case 'u':
204 random_dev = DROPBEAR_URANDOM_DEV; 202 /* backwards compatibility with old urandom option */
205 break; 203 break;
206 #ifdef DEBUG_TRACE 204 #ifdef DEBUG_TRACE
207 case 'v': 205 case 'v':
208 debug_trace = 1; 206 debug_trace = 1;
209 break; 207 break;