Print this page
OS-2204 SunSSH has a maximum of 10 multiplexed sessions
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/ssh/include/session.h
+++ new/usr/src/cmd/ssh/include/session.h
1 1 /*
2 2 * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
3 3 *
4 4 * Redistribution and use in source and binary forms, with or without
5 5 * modification, are permitted provided that the following conditions
6 6 * are met:
7 7 * 1. Redistributions of source code must retain the above copyright
8 8 * notice, this list of conditions and the following disclaimer.
9 9 * 2. Redistributions in binary form must reproduce the above copyright
10 10 * notice, this list of conditions and the following disclaimer in the
11 11 * documentation and/or other materials provided with the distribution.
12 12 *
13 13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
14 14 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
15 15 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
16 16 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
↓ open down ↓ |
17 lines elided |
↑ open up ↑ |
18 18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19 19 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20 20 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 23 */
24 24 /*
25 25 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
26 26 * Use is subject to license terms.
27 27 */
28 +/*
29 + * Copyright (c) 2013, Joyent, Inc. All rights reserved.
30 + */
31 +
32 +#include "sys-queue.h"
28 33
29 34 #ifndef _SESSION_H
30 35 #define _SESSION_H
31 36
32 37 #ifdef __cplusplus
33 38 extern "C" {
34 39 #endif
35 40
36 41 /* $OpenBSD: session.h,v 1.19 2002/06/30 21:59:45 deraadt Exp $ */
37 42 #define TTYSZ 64
38 43 typedef struct Session Session;
39 44 struct Session {
40 - int used;
45 + LIST_ENTRY(Session) list_entry;
41 46 int self;
42 47 struct passwd *pw;
43 48 Authctxt *authctxt;
44 49 pid_t pid;
45 50 /* tty */
46 51 char *term;
47 52 int ptyfd, ttyfd, ptymaster;
48 53 u_int row, col, xpixel, ypixel;
49 54 char tty[TTYSZ];
50 55 /* last login */
51 56 char hostname[MAXHOSTNAMELEN];
52 57 time_t last_login_time;
53 58 /* X11 */
54 59 u_int display_number;
55 60 char *display;
56 61 u_int screen;
57 62 char *auth_display;
58 63 char *auth_proto;
59 64 char *auth_data;
60 65 char *auth_file; /* xauth(1) authority file */
61 66 int single_connection;
62 67 /* proto 2 */
63 68 int chanid;
64 69 int is_subsystem;
65 70 char *command;
66 71 char **env;
67 72 };
68 73
69 74 void do_authenticated(Authctxt *);
70 75
71 76 int session_open(Authctxt *, int);
72 77 int session_input_channel_req(Channel *, const char *);
73 78 void session_close_by_pid(pid_t, int);
74 79 void session_close_by_channel(int, void *);
75 80 void session_destroy_all(void (*)(Session *));
76 81 void session_pty_cleanup2(void *);
77 82
78 83 Session *session_new(void);
79 84 Session *session_by_tty(char *);
80 85 void session_close(Session *);
81 86 void do_setusercontext(struct passwd *);
82 87 void child_set_env(char ***envp, u_int *envsizep, const char *name,
83 88 const char *value);
84 89 void child_set_env_silent(char ***envp, u_int *envsizep, const char *name,
85 90 const char *value);
86 91
87 92
88 93 #ifdef __cplusplus
89 94 }
90 95 #endif
91 96
92 97 #endif /* _SESSION_H */
↓ open down ↓ |
42 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX