From 7b28dfb0e569599ccd686236ca62c09e050d622d Mon Sep 17 00:00:00 2001 From: djm Date: Tue, 12 Sep 2017 06:32:07 +0000 Subject: 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@ --- usr.bin/ssh/serverloop.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'usr.bin/ssh/serverloop.h') diff --git a/usr.bin/ssh/serverloop.h b/usr.bin/ssh/serverloop.h index d5fbda16fa6..fd2cf63f74e 100644 --- a/usr.bin/ssh/serverloop.h +++ b/usr.bin/ssh/serverloop.h @@ -1,4 +1,4 @@ -/* $OpenBSD: serverloop.h,v 1.7 2016/08/13 17:47:41 markus Exp $ */ +/* $OpenBSD: serverloop.h,v 1.8 2017/09/12 06:32:07 djm Exp $ */ /* * Author: Tatu Ylonen @@ -21,6 +21,8 @@ #ifndef SERVERLOOP_H #define SERVERLOOP_H -void server_loop2(Authctxt *); +struct ssh; + +void server_loop2(struct ssh *, Authctxt *); #endif -- cgit v1.2.3-59-g8ed1b