summaryrefslogtreecommitdiff
path: root/session.h
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2008-05-19 15:34:50 +1000
committerDamien Miller <djm@mindrot.org>2008-05-19 15:34:50 +1000
commit7207f64a23a49a719aad3083c068f50e5034ccb8 (patch)
tree7ce6e49ae0713fad145ea9feb0181ec4d250ed75 /session.h
parent9417831eced03242e283e30286ac06ca2ce6d83e (diff)
- djm@cvs.openbsd.org 2008/05/08 12:21:16
[monitor.c monitor_wrap.c session.h servconf.c servconf.h session.c] [sshd_config sshd_config.5] 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 'session.h')
-rw-r--r--session.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/session.h b/session.h
index ee9338e4f..cbb8e3a32 100644
--- a/session.h
+++ b/session.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: session.h,v 1.29 2006/08/03 03:34:42 deraadt Exp $ */ 1/* $OpenBSD: session.h,v 1.30 2008/05/08 12:21:16 djm Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. 4 * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
@@ -31,6 +31,7 @@ typedef struct Session Session;
31struct Session { 31struct Session {
32 int used; 32 int used;
33 int self; 33 int self;
34 int next_unused;
34 struct passwd *pw; 35 struct passwd *pw;
35 Authctxt *authctxt; 36 Authctxt *authctxt;
36 pid_t pid; 37 pid_t pid;
@@ -65,6 +66,7 @@ void do_authenticated(Authctxt *);
65void do_cleanup(Authctxt *); 66void do_cleanup(Authctxt *);
66 67
67int session_open(Authctxt *, int); 68int session_open(Authctxt *, int);
69void session_unused(int);
68int session_input_channel_req(Channel *, const char *); 70int session_input_channel_req(Channel *, const char *);
69void session_close_by_pid(pid_t, int); 71void session_close_by_pid(pid_t, int);
70void session_close_by_channel(int, void *); 72void session_close_by_channel(int, void *);