Commit c6c34258 authored by Niels Möller's avatar Niels Möller
Browse files

* src/client.c: Moved -x option to lsh.c.

Rev: src/client.c:1.125
Rev: src/lsh.c:1.145
parent 12fcdd90
...@@ -169,7 +169,6 @@ make_request_service(int service) ...@@ -169,7 +169,6 @@ make_request_service(int service)
static void static void
do_exit_status(struct channel_request *c, do_exit_status(struct channel_request *c,
struct ssh_channel *channel, struct ssh_channel *channel,
struct ssh_connection *connection UNUSED,
struct channel_request_info *info, struct channel_request_info *info,
struct simple_buffer *args, struct simple_buffer *args,
struct command_continuation *s, struct command_continuation *s,
...@@ -200,7 +199,6 @@ do_exit_status(struct channel_request *c, ...@@ -200,7 +199,6 @@ do_exit_status(struct channel_request *c,
static void static void
do_exit_signal(struct channel_request *c, do_exit_signal(struct channel_request *c,
struct ssh_channel *channel, struct ssh_channel *channel,
struct ssh_connection *connection UNUSED,
struct channel_request_info *info, struct channel_request_info *info,
struct simple_buffer *args, struct simple_buffer *args,
struct command_continuation *s, struct command_continuation *s,
...@@ -286,7 +284,7 @@ new_session(struct channel_open_command *s, ...@@ -286,7 +284,7 @@ new_session(struct channel_open_command *s,
CAST(session_open_command, self, s); CAST(session_open_command, self, s);
struct ssh_channel *res; struct ssh_channel *res;
self->session->write = connection->write; self->session->connection = connection;
*request = format_channel_open(ATOM_SESSION, *request = format_channel_open(ATOM_SESSION,
local_channel_number, local_channel_number,
...@@ -498,11 +496,7 @@ client_options[] = ...@@ -498,11 +496,7 @@ client_options[] =
/* FIXME: Perhaps this should be moved from client.c to lsh.c? It /* FIXME: Perhaps this should be moved from client.c to lsh.c? It
* doesn't work with lshg. Or perhaps that can be fixed? * doesn't work with lshg. Or perhaps that can be fixed?
* About the same problem applies to -R. */ * About the same problem applies to -R. */
#if 1
{ "x11-forward", 'x', NULL, 0, "Enable X11 forwarding.", 0 },
{ "no-x11-forward", 'x' | ARG_NOT, NULL, 0,
"Disable X11 forwarding (default).", 0 },
#endif
#if WITH_PTY_SUPPORT #if WITH_PTY_SUPPORT
{ "pty", 't', NULL, 0, "Request a remote pty (default).", 0 }, { "pty", 't', NULL, 0, "Request a remote pty (default).", 0 },
{ "no-pty", 't' | ARG_NOT, NULL, 0, "Don't request a remote pty.", 0 }, { "no-pty", 't' | ARG_NOT, NULL, 0, "Don't request a remote pty.", 0 },
...@@ -1128,7 +1122,6 @@ client_argp_parser(int key, char *arg, struct argp_state *state) ...@@ -1128,7 +1122,6 @@ client_argp_parser(int key, char *arg, struct argp_state *state)
#if WITH_PTY_SUPPORT #if WITH_PTY_SUPPORT
CASE_FLAG('t', with_pty); CASE_FLAG('t', with_pty);
#endif /* WITH_PTY_SUPPORT */ #endif /* WITH_PTY_SUPPORT */
CASE_FLAG('x', with_x11);
CASE_ARG(OPT_STDIN, stdin_file, "/dev/null"); CASE_ARG(OPT_STDIN, stdin_file, "/dev/null");
CASE_ARG(OPT_STDOUT, stdout_file, "/dev/null"); CASE_ARG(OPT_STDOUT, stdout_file, "/dev/null");
......
...@@ -630,6 +630,11 @@ main_options[] = ...@@ -630,6 +630,11 @@ main_options[] =
{ "forward-remote-port", 'R', "remote-port:target-host:target-port", { "forward-remote-port", 'R', "remote-port:target-host:target-port",
0, "", CLIENT_ARGP_ACTION_GROUP }, 0, "", CLIENT_ARGP_ACTION_GROUP },
{ "gateway", 'G', NULL, 0, "Setup a local gateway", 0 }, { "gateway", 'G', NULL, 0, "Setup a local gateway", 0 },
{ "x11-forward", 'x', NULL, 0, "Enable X11 forwarding.", CLIENT_ARGP_MODIFIER_GROUP },
{ "no-x11-forward", 'x' | ARG_NOT, NULL, 0,
"Disable X11 forwarding (default).", 0 },
{ NULL, 0, NULL, 0, NULL, 0 } { NULL, 0, NULL, 0, NULL, 0 }
}; };
...@@ -849,6 +854,7 @@ main_argp_parser(int key, char *arg, struct argp_state *state) ...@@ -849,6 +854,7 @@ main_argp_parser(int key, char *arg, struct argp_state *state)
} }
CASE_FLAG('G', start_gateway); CASE_FLAG('G', start_gateway);
CASE_FLAG('x', super.with_x11);
} }
return 0; return 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment