Merge pull request #7924 from sourcejedi/devpts-regression-fix
core: un-break PrivateDevices= by allowing it to mknod /dev/ptmx
This commit is contained in:
+2
-1
@@ -978,7 +978,7 @@ static void cgroup_context_apply(
|
||||
"/dev/random\0" "rwm\0"
|
||||
"/dev/urandom\0" "rwm\0"
|
||||
"/dev/tty\0" "rwm\0"
|
||||
"/dev/pts/ptmx\0" "rw\0" /* /dev/pts/ptmx may not be duplicated, but accessed */
|
||||
"/dev/ptmx\0" "rwm\0"
|
||||
/* Allow /run/systemd/inaccessible/{chr,blk} devices for mapping InaccessiblePaths */
|
||||
"-/run/systemd/inaccessible/chr\0" "rwm\0"
|
||||
"-/run/systemd/inaccessible/blk\0" "rwm\0";
|
||||
@@ -988,6 +988,7 @@ static void cgroup_context_apply(
|
||||
NULSTR_FOREACH_PAIR(x, y, auto_devices)
|
||||
whitelist_device(path, x, y);
|
||||
|
||||
/* PTS (/dev/pts) devices may not be duplicated, but accessed */
|
||||
whitelist_major(path, "pts", 'c', "rw");
|
||||
}
|
||||
|
||||
|
||||
@@ -523,7 +523,7 @@ static int clone_device_node(const char *d, const char *temporary_mount) {
|
||||
mac_selinux_create_file_clear();
|
||||
|
||||
if (r < 0)
|
||||
return -errno;
|
||||
return log_debug_errno(errno, "mknod failed for %s: %m", d);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user