OpenSSH_4.3p1 configure patch
Corinna Vinschen
vinschen at redhat.com
Mon Feb 6 22:11:27 EST 2006
On Feb 6 12:02, Corinna Vinschen wrote:
> On Feb 4 18:20, Tim Rice wrote:
> > Please do test the next snapshot. I've just commited a couple of changes
> > to congigure.ac.
>
> Your patches to configure.ac seem to work fine on Cygwin.
>
> However, I seem to have found a generic bug in sshd.
>
> Since I was closer inspecting what happens with utmp and wtmp entries, I
> found to my surprise, that login records were added to utmp/wtmp, but
> logout records were not.
>
> 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.
Oh and, just for the sake of completeness, since session_pty_cleanup2
will set s->ttyfd to -1 in the first call, any later call to
session_pty_cleanup2, for instance from do_cleanup, will not do anything
at all.
Corinna
--
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat
More information about the openssh-unix-dev
mailing list