comparison session.h @ 989:73ea0dce9a57 pam

Merge up to date
author Matt Johnston <matt@ucc.asn.au>
date Fri, 23 Jan 2015 21:38:47 +0800
parents bae0b34bc059 0bb16232e7c4
children 2fa71c3b2827
comparison
equal deleted inserted replaced
925:bae0b34bc059 989:73ea0dce9a57
45 void common_session_init(int sock_in, int sock_out); 45 void common_session_init(int sock_in, int sock_out);
46 void session_loop(); 46 void session_loop();
47 void session_cleanup(); 47 void session_cleanup();
48 void send_session_identification(); 48 void send_session_identification();
49 void send_msg_ignore(); 49 void send_msg_ignore();
50 void ignore_recv_response();
51
52 void update_channel_prio();
50 53
51 const char* get_user_shell(); 54 const char* get_user_shell();
52 void fill_passwd(const char* username); 55 void fill_passwd(const char* username);
53 56
54 /* Server */ 57 /* Server */
102 struct sshsession { 105 struct sshsession {
103 106
104 /* Is it a client or server? */ 107 /* Is it a client or server? */
105 unsigned int isserver; 108 unsigned int isserver;
106 109
107 time_t connect_time; /* time the connection was established
108 (cleared after auth once we're not
109 respecting AUTH_TIMEOUT any more) */
110
111 int sock_in; 110 int sock_in;
112 int sock_out; 111 int sock_out;
113 112
114 /* remotehost will be initially NULL as we delay 113 /* remotehost will be initially NULL as we delay
115 * reading the remote version string. it will be set 114 * reading the remote version string. it will be set
148 unsigned int lastpacket; /* What the last received packet type was */ 147 unsigned int lastpacket; /* What the last received packet type was */
149 148
150 int signal_pipe[2]; /* stores endpoints of a self-pipe used for 149 int signal_pipe[2]; /* stores endpoints of a self-pipe used for
151 race-free signal handling */ 150 race-free signal handling */
152 151
153 time_t last_trx_packet_time; /* time of the last packet transmission, for 152 /* time of the last packet send/receive, for keepalive. Not real-world clock */
154 keepalive purposes */ 153 time_t last_packet_time_keepalive_sent;
155 154 time_t last_packet_time_keepalive_recv;
156 time_t last_packet_time; /* time of the last packet transmission or receive, for 155 time_t last_packet_time_any_sent;
157 idle timeout purposes */ 156
157 time_t last_packet_time_idle; /* time of the last packet transmission or receive, for
158 idle timeout purposes so ignores SSH_MSG_IGNORE
159 or responses to keepalives. Not real-world clock */
158 160
159 161
160 /* KEX/encryption related */ 162 /* KEX/encryption related */
161 struct KEXState kexstate; 163 struct KEXState kexstate;
162 struct key_context *keys; 164 struct key_context *keys;
189 /* Channel related */ 191 /* Channel related */
190 struct Channel ** channels; /* these pointers may be null */ 192 struct Channel ** channels; /* these pointers may be null */
191 unsigned int chansize; /* the number of Channel*s allocated for channels */ 193 unsigned int chansize; /* the number of Channel*s allocated for channels */
192 unsigned int chancount; /* the number of Channel*s in use */ 194 unsigned int chancount; /* the number of Channel*s in use */
193 const struct ChanType **chantypes; /* The valid channel types */ 195 const struct ChanType **chantypes; /* The valid channel types */
194 196 int channel_signal_pending; /* Flag set by sigchld handler */
195 197
198 /* TCP priority level for the main "port 22" tcp socket */
199 enum dropbear_prio socket_prio;
200
196 /* TCP forwarding - where manage listeners */ 201 /* TCP forwarding - where manage listeners */
197 struct Listener ** listeners; 202 struct Listener ** listeners;
198 unsigned int listensize; 203 unsigned int listensize;
199 204
200 /* Whether to allow binding to privileged ports (<1024). This doesn't 205 /* Whether to allow binding to privileged ports (<1024). This doesn't
219 /* The numeric address they connected from, used for logging */ 224 /* The numeric address they connected from, used for logging */
220 char * addrstring; 225 char * addrstring;
221 226
222 /* The resolved remote address, used for lastlog etc */ 227 /* The resolved remote address, used for lastlog etc */
223 char *remotehost; 228 char *remotehost;
229
230 time_t connect_time; /* time the connection was established
231 (cleared after auth once we're not
232 respecting AUTH_TIMEOUT any more).
233 A monotonic time, not realworld */
224 234
225 #ifdef USE_VFORK 235 #ifdef USE_VFORK
226 pid_t server_pid; 236 pid_t server_pid;
227 #endif 237 #endif
228 238