Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Jul 2006 12:08:54 +0100 (BST)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp>
Cc:        freebsd-bugs@FreeBSD.org, freebsd-gnats-submit@FreeBSD.org
Subject:   Re: kern/99758: chown/chmod pty slave side in kernel
Message-ID:  <20060705120748.F18236@fledge.watson.org>
In-Reply-To: <200607040242.k642g6BG099462@www.freebsd.org>
References:  <200607040242.k642g6BG099462@www.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On Tue, 4 Jul 2006, Atsuo Ohki wrote:

> I know that the ownership and permission of the pty slave side can be 
> controlled by `grantpt()' (with a set-uided helper program 
> /usr/libexec/pt_chown), but all programs which manipulate control/slave pair 
> of pty do not use `grantpt()'. More over, `grantpt()' leave the onwership of 
> pty slave as those of user who used the slave last time.
>
> I though it is better to control the ownership and permission of the pty slave
> as follow:
> 1) when the control side is opened, set the ownership of the corresponding
>    slave to those who opend the control side, and the permission as 0620.
> 2) when the control side is closed, restore the ownership/permission of the
>    corresponding slave to root/wheel, 0666.
>
> Included patch modifies kern/tty_pty.c, fs/devfs/devfs_devs.c, 
> fs/devfs/devfs_vfsops.c

The tty_pts implementation in 7-CURRENT does the same, except more so, by 
forcing revocation of the pty on last close.  Unfortunately, this triggers 
bugs in devfs.  Your help in getting the 7.x pts implementation up and running 
would be much appreciated.  Take a look at src/sys/kern/tty_pts.c.

Robert N M Watson
Computer Laboratory
University of Cambridge



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060705120748.F18236>