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

* src/server_session.c (do_spawn_exec): Don't spawn a login-mode

shell.
(do_send_adjust): Check that files are alive before operating on
them.

Rev: src/server_session.c:1.32
parent 5aade899
...@@ -204,15 +204,18 @@ do_send_adjust(struct ssh_channel *s, ...@@ -204,15 +204,18 @@ do_send_adjust(struct ssh_channel *s,
{ {
CAST(server_session, session, s); CAST(server_session, session, s);
assert(session->out->read); /* FIXME: Perhaps it's better to just check the read pointers, and
/* assert(session->out->handler); */ * not bother with the alive-flags? */
if (session->out->super.alive)
session->out->want_read = 1; {
assert(session->out->read);
if (session->err) session->out->want_read = 1;
}
if (session->err && session->err->super.alive)
{ {
assert(session->err->read); assert(session->err->read);
/* assert(session->err->handler); */
session->err->want_read = 1; session->err->want_read = 1;
} }
...@@ -951,7 +954,7 @@ do_spawn_exec(struct channel_request *c, ...@@ -951,7 +954,7 @@ do_spawn_exec(struct channel_request *c,
assert(env_length <= MAX_ENV); assert(env_length <= MAX_ENV);
#undef MAX_ENV #undef MAX_ENV
USER_EXEC(session->user, 3, argv, env_length, env); USER_EXEC(session->user, 0, argv, env_length, env);
/* exec failed! */ /* exec failed! */
verbose("server_session: exec() failed (errno = %i): %z\n", verbose("server_session: exec() failed (errno = %i): %z\n",
......
Supports Markdown
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