base-files: set ptmxmode to 666
PATCH 1/1 base-files: set ptmxmode to 666
From: Stefan Agner <[email protected]>
Make sure that the (newer) /dev/pts/ptmx is accessible by users. This is useful e.g. when running containers which symlink /dev/ptmx to /dev/pts/ptmx on start. The default mode (000) does not allow to create ptys inside the container.
Using 666 when symlinking /dev/ptmx is also recommended by the kernel documentation when /dev/ptmx is symlinked:
https://www.kernel.org/doc/Documentation/filesystems/devpts.txt
Also buildroot uses ptmxmode=0666. The patch introducing the change explains related use cases why this is necessary a bit more in depth:
https://github.com/buildroot/buildroot/commit/8196b299ba12bd6741bf7f4462cad180dab77fb0#diff-2d4604b9e565eb19fa52ce31f282f06c
--- meta/recipes-core/base-files/base-files/fstab | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/base-files/base-files/fstab +1 -1
@@ -2,7 +2,7 @@ /dev/root / auto defaults 1 1 proc /proc proc defaults 0 0 -devpts /dev/pts devpts mode=0620,gid=5 0 0 +devpts /dev/pts devpts mode=0620,ptmxmode=0666,gid=5 0 0 tmpfs /run tmpfs mode=0755,nodev,nosuid,strictatime 0 0 tmpfs /var/volatile tmpfs defaults 0 0
Signature · 1 line
2.17.1
Hi,
Quoted 7 lines · Stefan Agner
From: Stefan Agner <[email protected]>
Make sure that the (newer)
/dev/pts/ptmxis accessible by users. This is useful e.g. when running containers which symlink/dev/ptmxto/dev/pts/ptmxon start. The default mode (000) does not allow to create ptys inside the container.
Quoted 8 lines
Using 666 when symlinking
/dev/ptmxis also recommended by the kernel documentation when/dev/ptmxis symlinked:
https://www.kernel.org/doc/Documentation/filesystems/devpts.txtAlso buildroot uses ptmxmode=0666. The patch introducing the change explains related use cases why this is necessary a bit more in depth:
https://github.com/buildroot/buildroot/commit/8196b299ba12bd6741bf7f4462cad180dab77fb0#diff-2d4604b9e565eb19fa52ce31f282f06c
Any thought about this? From what I can tell it did not make it into oe-core yet?
--
Stefan
Quoted 20 lines
Signed-off-by Stefan Agner <[email protected]>--- meta/recipes-core/base-files/base-files/fstab | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/recipes-core/base-files/base-files/fstab +1
-1@@ -2,7 +2,7 @@ /dev/root / auto defaults 1 1 proc /proc proc defaults 0 0 -devpts /dev/pts devpts mode=0620,gid=5 0 0 +devpts /dev/pts devptsmode=0620,ptmxmode=0666,gid=5 0 0
tmpfs /run tmpfs
mode=0755,nodev,nosuid,strictatime 0 0
tmpfs/var/volatiletmpfs defaults 0 0