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,
{
CAST(server_session, session, s);
/* FIXME: Perhaps it's better to just check the read pointers, and
* not bother with the alive-flags? */
if (session->out->super.alive)
{
assert(session->out->read);
/* assert(session->out->handler); */
session->out->want_read = 1;
}
if (session->err)
if (session->err && session->err->super.alive)
{
assert(session->err->read);
/* assert(session->err->handler); */
session->err->want_read = 1;
}
......@@ -951,7 +954,7 @@ do_spawn_exec(struct channel_request *c,
assert(env_length <= 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! */
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