[Lutz.Jaenicke at aet.TU-Cottbus.DE: 2.9p1: HP-UX 10.20 utmp/wtmp handling broken?]

Lutz Jaenicke Lutz.Jaenicke at aet.TU-Cottbus.DE
Thu Jun 21 02:08:45 EST 2001


On Wed, Jun 20, 2001 at 03:49:26PM +0200, Markus Friedl wrote:
> you can try this patch (against -current).
> 
> the patch does a little bit more, but all you
> need is this:
> +       channel_free_all();
> +
>         signal(SIGCHLD, SIG_DFL);
>         while ((pid = waitpid(-1, &status, WNOHANG)) > 0)
>                 session_close_by_pid(pid, status);
> -       channel_stop_listening();
> 
> in serverloop.c and an implementation for channel_free_all().

It does not work.

The effect is still the same.
A sshd -d yields:
Connection closed by remote host.
debug1: closing all channels
debug1: channel_free: channel 0: server-session, nchannels 1
debug1: channel_free: channel 0: dettaching channel user
debug1: session_by_channel: session 0 channel 0
debug1: session_close_by_channel: channel 0 kill 18299
Closing connection to 141.43.132.151

Following the code in session.c, session_close_by_channel with
s->pid != 0 will "notify child, delay session cleanup".
However, session_close() is never called (it would be seen due to
 debug("session_close: session %d pid %d", s->self, s->pid))
and therefore it seems that session_pty_cleanup(s) (finally calling
the record_logout() function) is never called.

Best regards,
	Lutz
-- 
Lutz Jaenicke                             Lutz.Jaenicke at aet.TU-Cottbus.DE
BTU Cottbus               http://www.aet.TU-Cottbus.DE/personen/jaenicke/
Lehrstuhl Allgemeine Elektrotechnik                  Tel. +49 355 69-4129
Universitaetsplatz 3-4, D-03044 Cottbus              Fax. +49 355 69-4153



More information about the openssh-unix-dev mailing list