meson: allow to customize the access mode for tty/pts devices
Then, switch the default value to "0600", due to general security concerns about terminals being written to by other users. Closing #35599.
This commit is contained in:
committed by
Luca Boccassi
parent
0543b02cf8
commit
a4d1891475
+2
-2
@@ -2399,13 +2399,13 @@ static int setup_pts(const char *dest) {
|
||||
#if HAVE_SELINUX
|
||||
if (arg_selinux_apifs_context)
|
||||
(void) asprintf(&options,
|
||||
"newinstance,ptmxmode=0666,mode=620,gid=" GID_FMT ",context=\"%s\"",
|
||||
"newinstance,ptmxmode=0666,mode=" STRINGIFY(TTY_MODE) ",gid=" GID_FMT ",context=\"%s\"",
|
||||
arg_uid_shift + TTY_GID,
|
||||
arg_selinux_apifs_context);
|
||||
else
|
||||
#endif
|
||||
(void) asprintf(&options,
|
||||
"newinstance,ptmxmode=0666,mode=620,gid=" GID_FMT,
|
||||
"newinstance,ptmxmode=0666,mode=" STRINGIFY(TTY_MODE) ",gid=" GID_FMT,
|
||||
arg_uid_shift + TTY_GID);
|
||||
|
||||
if (!options)
|
||||
|
||||
Reference in New Issue
Block a user