]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
conf: use saner mode for console
authorChristian Brauner <christian.brauner@ubuntu.com>
Thu, 18 Feb 2021 15:40:52 +0000 (16:40 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Thu, 18 Feb 2021 16:01:59 +0000 (17:01 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/conf.c

index f2a3b62af0e3e13e5d494f6df82e80d4f0ef1d18..8d63c516421d3f98645e29bdada99346fad1e9ed 100644 (file)
@@ -1713,7 +1713,7 @@ static int lxc_setup_dev_console(struct lxc_rootfs *rootfs,
        if (ret < 0 && errno != EEXIST)
                return log_error_errno(-errno, errno, "Failed to create console");
 
-       ret = fchmod(console->pty, S_IXUSR | S_IXGRP);
+       ret = fchmod(console->pty, 0620);
        if (ret < 0)
                return log_error_errno(-errno, errno, "Failed to set mode \"0%o\" to \"%s\"", S_IXUSR | S_IXGRP, console->name);
 
@@ -1775,7 +1775,7 @@ static int lxc_setup_ttydir_console(struct lxc_rootfs *rootfs,
        if (ret < 0 && errno != EEXIST)
                return log_error_errno(-errno, errno, "Failed to create console");
 
-       ret = fchmod(console->pty, S_IXUSR | S_IXGRP);
+       ret = fchmod(console->pty, 0620);
        if (ret < 0)
                return log_error_errno(-errno, errno, "Failed to set mode \"0%o\" to \"%s\"", S_IXUSR | S_IXGRP, console->name);