]> git.ipfire.org Git - people/ms/pakfire.git/commitdiff
mount: Mount a new instance of /dev/pts
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 2 Aug 2022 16:09:25 +0000 (16:09 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 2 Aug 2022 16:09:25 +0000 (16:09 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/mount.c

index 70a323a0d17f7cc02d3adff1636e159d58a1ee49..48e49a048691c3f1f5124d8a95a8cef9878d4a94 100644 (file)
@@ -76,7 +76,8 @@ static const struct pakfire_mountpoint {
        // Create a new /dev
        { "pakfire_dev",         "dev",                "tmpfs",  MS_NOSUID|MS_NOEXEC,
                "mode=0755,size=4m,nr_inodes=64k", },
-       { "/dev/pts",            "dev/pts",            "bind",   MS_BIND, NULL, },
+       { "pakfire_dev_pts",     "dev/pts",            "devpts", MS_NOSUID|MS_NOEXEC,
+               "newinstance,ptmxmode=0666,mode=620", },
 
        // Mount /dev/mqueue
        { "mqueue",               "dev/mqueue",        "mqueue",
@@ -104,7 +105,6 @@ static const struct pakfire_devnode {
        { "/dev/kmsg",      1, 11, S_IFCHR|S_IRUSR|S_IRGRP|S_IROTH, },
        { "/dev/tty",       5,  0, S_IFCHR|S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH, },
        { "/dev/console",   5,  1, S_IFCHR|S_IRUSR|S_IWUSR, },
-       { "/dev/ptmx",      5,  2, S_IFCHR|S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH, },
        { "/dev/rtc0",    252,  0, S_IFCHR|S_IRUSR|S_IWUSR, },
        { NULL },
 };
@@ -113,6 +113,7 @@ static const struct pakfire_symlink {
        const char* target;
        const char* path;
 } symlinks[] = {
+       { "/dev/pts/ptmx",   "/dev/ptmx", },
        { "/proc/self/fd",   "/dev/fd", },
        { "/proc/self/fd/0", "/dev/stdin" },
        { "/proc/self/fd/1", "/dev/stdout" },