From 754f87875ffe4a312c7be33d1a211c35a89f9ed9 Mon Sep 17 00:00:00 2001 From: Idan Horowitz Date: Mon, 29 Mar 2021 18:59:51 +0300 Subject: [PATCH] SystemServer: chown all available TTY devices to the tty group Since we have 6 TTYs available 2 of the 6 were not being chowned and as such they were not available to the tty group. --- Userland/Services/SystemServer/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Userland/Services/SystemServer/main.cpp b/Userland/Services/SystemServer/main.cpp index b7da5d2965..52e46b1114 100644 --- a/Userland/Services/SystemServer/main.cpp +++ b/Userland/Services/SystemServer/main.cpp @@ -125,11 +125,13 @@ static void prepare_devfs() // FIXME: Find a better way to chown without hardcoding the gid! chown_wrapper("/dev/mouse", 0, 3); - for (size_t index = 0; index < 4; index++) { + // FIXME: Count TTYs instead of using a hardcoded amount + for (size_t index = 0; index < 6; index++) { // FIXME: Find a better way to chown without hardcoding the gid! chown_wrapper(String::formatted("/dev/tty{}", index).characters(), 0, 2); } + // FIXME: Count serial TTYs instead of using a hardcoded amount for (size_t index = 0; index < 4; index++) { // FIXME: Find a better way to chown without hardcoding the gid! chown_wrapper(String::formatted("/dev/ttyS{}", index).characters(), 0, 2);