~ubuntu-branches/ubuntu/utopic/dropbear/utopic-proposed

« back to all changes in this revision

Viewing changes to cli-runopts.c

  • Committer: Bazaar Package Importer
  • Author(s): Matt Johnston
  • Date: 2005-12-08 19:20:21 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051208192021-nyp9rwnt77nsg6ty
Tags: 0.47-1
* New upstream release.
* SECURITY: Fix incorrect buffer sizing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
                                        "Usage: %s [options] [user@]host\n"
48
48
                                        "Options are:\n"
49
49
                                        "-p <remoteport>\n"
 
50
                                        "-l <username>\n"
50
51
                                        "-t    Allocate a pty\n"
51
52
                                        "-T    Don't allocate a pty\n"
52
53
#ifdef ENABLE_CLI_PUBKEY_AUTH
53
54
                                        "-i <identityfile>   (multiple allowed)\n"
54
55
#endif
55
56
#ifdef ENABLE_CLI_LOCALTCPFWD
56
 
                                        "-L <listenport:remotehsot:reportport> 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
59
#endif
58
60
#ifdef ENABLE_CLI_REMOTETCPFWD
59
61
                                        "-R <listenport:remotehost:remoteport> Remote port forwarding\n"
60
62
#endif
61
 
                                        "-l <username>\n"
62
63
#ifdef DEBUG_TRACE
63
64
                                        "-v    verbose\n"
64
65
#endif
89
90
        cli_opts.cmd = NULL;
90
91
        cli_opts.wantpty = 9; /* 9 means "it hasn't been touched", gets set later */
91
92
#ifdef ENABLE_CLI_PUBKEY_AUTH
92
 
        cli_opts.pubkeys = NULL;
 
93
        cli_opts.privkeys = NULL;
93
94
#endif
94
95
#ifdef ENABLE_CLI_LOCALTCPFWD
95
96
        cli_opts.localfwds = NULL;
 
97
        opts.listen_fwd_all = 0;
96
98
#endif
97
99
#ifdef ENABLE_CLI_REMOTETCPFWD
98
100
        cli_opts.remotefwds = NULL;
99
101
#endif
100
 
        opts.nolocaltcp = 0;
101
 
        opts.noremotetcp = 0;
102
102
        /* not yet
103
103
        opts.ipv4 = 1;
104
104
        opts.ipv6 = 1;
167
167
                                case 'L':
168
168
                                        nextislocal = 1;
169
169
                                        break;
 
170
                                case 'g':
 
171
                                        opts.listen_fwd_all = 1;
 
172
                                        break;
170
173
#endif
171
174
#ifdef ENABLE_CLI_REMOTETCPFWD
172
175
                                case 'R':
271
274
#ifdef ENABLE_CLI_PUBKEY_AUTH
272
275
static void loadidentityfile(const char* filename) {
273
276
 
274
 
        struct PubkeyList * nextkey;
 
277
        struct SignKeyList * nextkey;
275
278
        sign_key *key;
276
279
        int keytype;
277
280
 
284
287
 
285
288
        } else {
286
289
 
287
 
                nextkey = (struct PubkeyList*)m_malloc(sizeof(struct PubkeyList));
 
290
                nextkey = (struct SignKeyList*)m_malloc(sizeof(struct SignKeyList));
288
291
                nextkey->key = key;
289
 
                nextkey->next = cli_opts.pubkeys;
 
292
                nextkey->next = cli_opts.privkeys;
290
293
                nextkey->type = keytype;
291
 
                cli_opts.pubkeys = nextkey;
 
294
                cli_opts.privkeys = nextkey;
292
295
        }
293
296
}
294
297
#endif