Messages in this thread | | | Date | Mon, 26 Jan 2009 22:55:42 +0100 | From | Christoph Hellwig <> | Subject | Re: devpts multiple instances feedback |
| |
On Mon, Jan 05, 2009 at 01:09:40PM -0800, Sukadev Bhattiprolu wrote: > Making the pts/ptmx node would certianly simplify the code. But we > ended up with some of the complexity to preserve the legacy behavior. > I believe there was some concern that the presence of a "shadow" > ptmx node on older distros might affect rights management (eg: if > the older distro which does not know about /dev/pts/ptmx, applied > a security label to /dev/ptmx that label could be subverted by using > /dev/pts/ptmx ? > > That was also one of the reasons for the default 000 mode on the pts/ptmx > device node
So just make it 000 but always created it.
> > | - the 000 mode is very weird, given how the /dev/ptmx operates > | it doesn't really make much sense to have it different than 0666 > | unless you want to disable ptys. > | - why does pts_sb_from_inode have to check s_magic, I can't see > | it ever used on an inode not from the devpts filesystem > > If /dev/ptmx is not a symlink to pts/ptmx, we would need the s_magic > check ? (eg: when called from devpts_new_index()). The check would > not be needed if /dev/ptmx is always a symlink.
Ok, so it's for the /dev/ptmx node. Just make that explicit by passing down a paramter then.
| |