mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-08 08:58:00 +00:00
Pass SshServerConfig through to sesschan.c.
This will let me change the behaviour of the main session channel based on command-line tweaks.
This commit is contained in:
parent
ea32967044
commit
75fccc5d58
@ -43,6 +43,7 @@ typedef struct sesschan {
|
||||
bufchain subsys_input;
|
||||
SftpServer *sftpsrv;
|
||||
ScpServer *scpsrv;
|
||||
const SshServerConfig *ssc;
|
||||
|
||||
Channel chan;
|
||||
} sesschan;
|
||||
@ -198,7 +199,8 @@ static const SeatVtable sesschan_seat_vt = {
|
||||
};
|
||||
|
||||
Channel *sesschan_new(SshChannel *c, LogContext *logctx,
|
||||
const SftpServerVtable *sftpserver_vt)
|
||||
const SftpServerVtable *sftpserver_vt,
|
||||
const SshServerConfig *ssc)
|
||||
{
|
||||
sesschan *sess = snew(sesschan);
|
||||
memset(sess, 0, sizeof(sesschan));
|
||||
@ -207,6 +209,7 @@ Channel *sesschan_new(SshChannel *c, LogContext *logctx,
|
||||
sess->chan.vt = &sesschan_channelvt;
|
||||
sess->chan.initial_fixed_window_size = 0;
|
||||
sess->parent_logctx = logctx;
|
||||
sess->ssc = ssc;
|
||||
|
||||
/* Start with a completely default Conf */
|
||||
sess->conf = conf_new();
|
||||
|
@ -59,7 +59,8 @@ void ssh1_connection_direction_specific_setup(
|
||||
if (!s->mainchan_chan) {
|
||||
s->mainchan_sc.vt = &ssh1sesschan_vtable;
|
||||
s->mainchan_sc.cl = &s->cl;
|
||||
s->mainchan_chan = sesschan_new(&s->mainchan_sc, s->ppl.logctx, NULL);
|
||||
s->mainchan_chan = sesschan_new(
|
||||
&s->mainchan_sc, s->ppl.logctx, NULL, s->ssc);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@ static ChanopenResult chan_open_session(
|
||||
|
||||
ppl_logevent("Opened session channel");
|
||||
CHANOPEN_RETURN_SUCCESS(sesschan_new(sc, s->ppl.logctx,
|
||||
s->sftpserver_vt));
|
||||
s->sftpserver_vt, s->ssc));
|
||||
}
|
||||
|
||||
static ChanopenResult chan_open_direct_tcpip(
|
||||
|
@ -88,7 +88,8 @@ PacketProtocolLayer *ssh1_login_server_new(
|
||||
AuthPolicy *authpolicy, const SshServerConfig *ssc);
|
||||
|
||||
Channel *sesschan_new(SshChannel *c, LogContext *logctx,
|
||||
const SftpServerVtable *sftpserver_vt);
|
||||
const SftpServerVtable *sftpserver_vt,
|
||||
const SshServerConfig *ssc);
|
||||
|
||||
Backend *pty_backend_create(
|
||||
Seat *seat, LogContext *logctx, Conf *conf, char **argv, const char *cmd,
|
||||
|
Loading…
Reference in New Issue
Block a user