summaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2017-09-12 06:32:07 +0000
committerDamien Miller <djm@mindrot.org>2017-09-12 17:37:02 +1000
commitdbee4119b502e3f8b6cd3282c69c537fd01d8e16 (patch)
treeb8a3263a79e0920e8d08f188654f1ccb7c254406 /monitor.c
parentabd59663df37a42152e37980113ccaa405b9a282 (diff)
upstream commit
refactor channels.c Move static state to a "struct ssh_channels" that is allocated at runtime and tracked as a member of struct ssh. Explicitly pass "struct ssh" to all channels functions. Replace use of the legacy packet APIs in channels.c. Rework sshd_config PermitOpen handling: previously the configuration parser would call directly into the channels layer. After the refactor this is not possible, as the channels structures are allocated at connection time and aren't available when the configuration is parsed. The server config parser now tracks PermitOpen itself and explicitly configures the channels code later. ok markus@ Upstream-ID: 11828f161656b965cc306576422613614bea2d8f
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/monitor.c b/monitor.c
index 8a7897bde..bdb4e8552 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: monitor.c,v 1.172 2017/06/24 06:34:38 djm Exp $ */ 1/* $OpenBSD: monitor.c,v 1.173 2017/09/12 06:32:07 djm Exp $ */
2/* 2/*
3 * Copyright 2002 Niels Provos <provos@citi.umich.edu> 3 * Copyright 2002 Niels Provos <provos@citi.umich.edu>
4 * Copyright 2002 Markus Friedl <markus@openbsd.org> 4 * Copyright 2002 Markus Friedl <markus@openbsd.org>
@@ -1519,13 +1519,14 @@ mm_answer_pty_cleanup(int sock, Buffer *m)
1519int 1519int
1520mm_answer_term(int sock, Buffer *req) 1520mm_answer_term(int sock, Buffer *req)
1521{ 1521{
1522 struct ssh *ssh = active_state; /* XXX */
1522 extern struct monitor *pmonitor; 1523 extern struct monitor *pmonitor;
1523 int res, status; 1524 int res, status;
1524 1525
1525 debug3("%s: tearing down sessions", __func__); 1526 debug3("%s: tearing down sessions", __func__);
1526 1527
1527 /* The child is terminating */ 1528 /* The child is terminating */
1528 session_destroy_all(&mm_session_close); 1529 session_destroy_all(ssh, &mm_session_close);
1529 1530
1530#ifdef USE_PAM 1531#ifdef USE_PAM
1531 if (options.use_pam) 1532 if (options.use_pam)