[RFC][PATCH 7/8]: Auto-create ptmx node when mounting devpts
Eric W. Biederman
ebiederm at xmission.com
Thu Aug 21 11:23:07 PDT 2008
"H. Peter Anvin" <hpa at zytor.com> writes:
> Eric W. Biederman wrote:
>>> I had the new ptmx node only in 'multi-mount' mode initially. But if users
>>> want the multi-mount semantics, /dev/ptmx must be a symlink. If its a
>>> we break in the single-mount case (which does not have the ptmx node and
>>> we don't support mknod in pts).
>> Then have user space make it a file bind mount instead of symlink.
>> That should address all of the backwards compatibility concerns, and
>> allow us to only create it when open.
> The right thing is that, if you want to support back-and-forth flipping, to
> introduce a udev rule which looks for pts/ptmx, links to it if present, and
> otherwise creates the ptmx device node.
The point of making it a bind is to address the concerns about
backwards compatibility in user space. In particular security
conscious applications and applications that perform sanity checks
are known to ignore things if they are the wrong type in the filesystem.
> This is *only* required to support back-and-forth, and can be introduced at any
> time after this patch is in the kernel -- or even before.
You can use a file bind mount just as easily as a symlink.
As for udev I haven't seen a version that is accessible to mere mortals yet
and it doesn't seem like they plan on it being so. Eventually I will get
around to making sense of it as we need to make it work in a container
but so far it seems to be much more complex then it should be.
More information about the Containers