diff options
author | 2008-05-08 12:21:16 +0000 | |
---|---|---|
committer | 2008-05-08 12:21:16 +0000 | |
commit | 6d13e39a83239a3d221c04849265187bc1d3ee74 (patch) | |
tree | 3678b7f2dc35f8a9df3ee0b00a5f30a8feb0d4b2 /usr.bin/ssh/session.h | |
parent | Implement a channel success/failure status confirmation callback (diff) | |
download | wireguard-openbsd-6d13e39a83239a3d221c04849265187bc1d3ee74.tar.xz wireguard-openbsd-6d13e39a83239a3d221c04849265187bc1d3ee74.zip |
Make the maximum number of sessions run-time controllable via
a sshd_config MaxSessions knob. This is useful for disabling
login/shell/subsystem access while leaving port-forwarding working
(MaxSessions 0), disabling connection multiplexing (MaxSessions 1) or
simply increasing the number of allows multiplexed sessions.
Because some bozos are sure to configure MaxSessions in excess of the
number of available file descriptors in sshd (which, at peak, might be
as many as 9*MaxSessions), audit sshd to ensure that it doesn't leak fds
on error paths, and make it fail gracefully on out-of-fd conditions -
sending channel errors instead of than exiting with fatal().
bz#1090; MaxSessions config bits and manpage from junyer AT gmail.com
ok markus@
Diffstat (limited to 'usr.bin/ssh/session.h')
-rw-r--r-- | usr.bin/ssh/session.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/ssh/session.h b/usr.bin/ssh/session.h index ee9338e4f5e..cbb8e3a32d1 100644 --- a/usr.bin/ssh/session.h +++ b/usr.bin/ssh/session.h @@ -1,4 +1,4 @@ -/* $OpenBSD: session.h,v 1.29 2006/08/03 03:34:42 deraadt Exp $ */ +/* $OpenBSD: session.h,v 1.30 2008/05/08 12:21:16 djm Exp $ */ /* * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. @@ -31,6 +31,7 @@ typedef struct Session Session; struct Session { int used; int self; + int next_unused; struct passwd *pw; Authctxt *authctxt; pid_t pid; @@ -65,6 +66,7 @@ void do_authenticated(Authctxt *); void do_cleanup(Authctxt *); int session_open(Authctxt *, int); +void session_unused(int); int session_input_channel_req(Channel *, const char *); void session_close_by_pid(pid_t, int); void session_close_by_channel(int, void *); |