[Bug 1419] Fix PTY handling on Mac OS X

bugzilla-daemon at bugzilla.mindrot.org bugzilla-daemon at bugzilla.mindrot.org
Tue Jan 8 15:08:02 EST 2008


https://bugzilla.mindrot.org/show_bug.cgi?id=1419





--- Comment #4 from Darren Tucker <dtucker at zip.com.au>  2008-01-08 15:07:59 ---
(In reply to comment #3)
> I've spoken with the author of these patches and done some testing.
> 
> The first patch (for ttyname) is no longer needed.

OK then I'll ignore that one.

> The second (permission fix) patch bypasses setowner.  We don't need to
> call setowner because the ownership and permissions are already setup
> when we allocate a cloning pty.

That means pty_setowner is a no-op?  So is the ifdef even required?

There's another call to pty_setowner in monitor.c which will be called
when privsep is enabled (the default) so the ifdef around pty_setowner
will only have an effect if privsep is off or it's root logging in.

> This patch was added (and is needed)
> because when thing close down, and the last file descriptor to the pty
> is closed, the kernel removes it from /dev.  So when sshd (thinking the
> pty is still there) tries to reset the ownership and permissions, it
> gets an error because it isn't there anymore.

OK that sounds reasonable but it probably belongs in sshpty.c with the
rest of the pty handling code.

-- 
Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.


More information about the openssh-bugs mailing list