3.0.1p1 losing tty modes?
michael at moria.de
michael at moria.de
Wed Nov 28 13:32:50 EST 2001
> thanks. as i recall this has come up before. i would really like to see
> someone with deep linux pty knowledge investigate this, identify the
> problems, and propose a solution. i think the archives may contain other
> proposed fixes.
By now I think I know why vhangup() is needed: After opening the master,
someone else may have opened the slave before sshd does. vhangup()
gets rid of those handles and if tty ownership is set before, other
users can't reopen the slave again.
As I suspected, my patch was just a hack. The real problem is in
session.c, around line 1662: The modes are set before ownership is
changed, but instead ownership should be changed, then vhangup() should
be used and _then_ modes should be set.
This should not only concern Linux, but all systems that support
vhangup(), which is the majority of all Unices.
Michael
More information about the openssh-unix-dev
mailing list