OpenSSH_4.3p1 configure patch

Darren Tucker dtucker at zip.com.au
Mon Feb 6 22:38:18 EST 2006


On Mon, Feb 06, 2006 at 12:02:43PM +0100, Corinna Vinschen wrote:
[...]
> I debugged an sshd child and found this:
> 
>   - On logging out from an interactive session, EOF is encountered and
>     down from do_authenticated, session_close_by_pid is called.
> 
>   - session_by_pid returns the correct Session pointer.
> 
>   - s->chanid is != -1, ==> session_exit_message is called.
> 
>   - session_exit_message sets s->pid = 0 and returns to session_close_by_pid.
> 
>   - s->ttyfd != -1, ==> session_pty_cleanup is called.
> 
>   - session_pty_cleanup calls session_pty_cleanup2.
> 
>   - In session_pty_cleanup2, record_logout is only called if s->pid != 0.
> 
> Do I miss something or is it somehow impossible to get a logout record
> this way?!?

When privsep is on, session_exit_message is called in the slave, but
session_pty_cleanup2 is called by the monitor, so it works.

It looks like a problem when privsep=no, though, and it's not immediately
obvious to me what to do with it.

-- 
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
    Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.




More information about the openssh-unix-dev mailing list