comparison cli-runopts.c @ 258:306499676384

* add -g (dbclient) and -a (dropbear) options for allowing non-local hosts to connect to forwarded ports. Rearranged various some of the tcp listening code. * changed to /* */ style brackets in svr-authpam.c
author Matt Johnston <matt@ucc.asn.au>
date Sun, 04 Dec 2005 16:13:11 +0000
parents aad4b3f58556
children 79bf1023cf11 740e782679be 0e4f225b7e07 ea0929224294
comparison
equal deleted inserted replaced
257:63601217f5ab 258:306499676384
45 45
46 fprintf(stderr, "Dropbear client v%s\n" 46 fprintf(stderr, "Dropbear client v%s\n"
47 "Usage: %s [options] [user@]host\n" 47 "Usage: %s [options] [user@]host\n"
48 "Options are:\n" 48 "Options are:\n"
49 "-p <remoteport>\n" 49 "-p <remoteport>\n"
50 "-l <username>\n"
50 "-t Allocate a pty\n" 51 "-t Allocate a pty\n"
51 "-T Don't allocate a pty\n" 52 "-T Don't allocate a pty\n"
52 #ifdef ENABLE_CLI_PUBKEY_AUTH 53 #ifdef ENABLE_CLI_PUBKEY_AUTH
53 "-i <identityfile> (multiple allowed)\n" 54 "-i <identityfile> (multiple allowed)\n"
54 #endif 55 #endif
55 #ifdef ENABLE_CLI_LOCALTCPFWD 56 #ifdef ENABLE_CLI_LOCALTCPFWD
56 "-L <listenport:remotehost:remoteport> Local port forwarding\n" 57 "-L <listenport:remotehost:remoteport> Local port forwarding\n"
58 "-g Allow remote hosts to connect to forwarded ports\n"
57 #endif 59 #endif
58 #ifdef ENABLE_CLI_REMOTETCPFWD 60 #ifdef ENABLE_CLI_REMOTETCPFWD
59 "-R <listenport:remotehost:remoteport> Remote port forwarding\n" 61 "-R <listenport:remotehost:remoteport> Remote port forwarding\n"
60 #endif 62 #endif
61 "-l <username>\n"
62 #ifdef DEBUG_TRACE 63 #ifdef DEBUG_TRACE
63 "-v verbose\n" 64 "-v verbose\n"
64 #endif 65 #endif
65 ,DROPBEAR_VERSION, cli_opts.progname); 66 ,DROPBEAR_VERSION, cli_opts.progname);
66 } 67 }
91 #ifdef ENABLE_CLI_PUBKEY_AUTH 92 #ifdef ENABLE_CLI_PUBKEY_AUTH
92 cli_opts.privkeys = NULL; 93 cli_opts.privkeys = NULL;
93 #endif 94 #endif
94 #ifdef ENABLE_CLI_LOCALTCPFWD 95 #ifdef ENABLE_CLI_LOCALTCPFWD
95 cli_opts.localfwds = NULL; 96 cli_opts.localfwds = NULL;
97 opts.listen_fwd_all = 0;
96 #endif 98 #endif
97 #ifdef ENABLE_CLI_REMOTETCPFWD 99 #ifdef ENABLE_CLI_REMOTETCPFWD
98 cli_opts.remotefwds = NULL; 100 cli_opts.remotefwds = NULL;
99 #endif 101 #endif
100 opts.nolocaltcp = 0;
101 opts.noremotetcp = 0;
102 /* not yet 102 /* not yet
103 opts.ipv4 = 1; 103 opts.ipv4 = 1;
104 opts.ipv6 = 1; 104 opts.ipv6 = 1;
105 */ 105 */
106 106
164 cli_opts.wantpty = 0; 164 cli_opts.wantpty = 0;
165 break; 165 break;
166 #ifdef ENABLE_CLI_LOCALTCPFWD 166 #ifdef ENABLE_CLI_LOCALTCPFWD
167 case 'L': 167 case 'L':
168 nextislocal = 1; 168 nextislocal = 1;
169 break;
170 case 'g':
171 opts.listen_fwd_all = 1;
169 break; 172 break;
170 #endif 173 #endif
171 #ifdef ENABLE_CLI_REMOTETCPFWD 174 #ifdef ENABLE_CLI_REMOTETCPFWD
172 case 'R': 175 case 'R':
173 nextisremote = 1; 176 nextisremote = 1;