Mercurial > dropbear
diff session.h @ 925:bae0b34bc059 pam
Better PAM through recursion
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Wed, 12 Mar 2014 23:40:02 +0800 |
parents | cbc73a5aefb0 |
children | 73ea0dce9a57 |
line wrap: on
line diff
--- a/session.h Sat Mar 08 21:00:57 2014 +0800 +++ b/session.h Wed Mar 12 23:40:02 2014 +0800 @@ -43,7 +43,7 @@ extern int exitflag; void common_session_init(int sock_in, int sock_out); -void session_loop(void(*loophandler)()); +void session_loop(); void session_cleanup(); void send_session_identification(); void send_msg_ignore(); @@ -102,7 +102,7 @@ struct sshsession { /* Is it a client or server? */ - unsigned char isserver; + unsigned int isserver; time_t connect_time; /* time the connection was established (cleared after auth once we're not @@ -132,16 +132,20 @@ const packettype * packettypes; /* Packet handler mappings for this session, see process-packet.c */ - unsigned dataallowed : 1; /* whether we can send data packets or we are in + unsigned int recursion_count; /* Set when the Dropbear main loop is called + recursively for PAM auth */ + unsigned int exit_recursion; + + unsigned int dataallowed; /* whether we can send data packets or we are in the middle of a KEX or something */ - unsigned char requirenext; /* byte indicating what packets we require next, + unsigned int requirenext; /* byte indicating what packets we require next, or 0x00 for any. */ - unsigned char ignorenext; /* whether to ignore the next packet, + unsigned int ignorenext; /* whether to ignore the next packet, used for kex_follows stuff */ - unsigned char lastpacket; /* What the last received packet type was */ + unsigned int lastpacket; /* What the last received packet type was */ int signal_pipe[2]; /* stores endpoints of a self-pipe used for race-free signal handling */ @@ -175,6 +179,7 @@ void(*remoteclosed)(); /* A callback to handle closure of the remote connection */ + void(*loop_handler)(); void(*extra_session_cleanup)(); /* client or server specific cleanup */ void(*send_kex_first_guess)();