Re: devpts multiple instances feedback

From: Christoph Hellwig
Date: Mon Jan 26 2009 - 16:56:01 EST


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.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/