1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:28:11 +00:00

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.
This commit is contained in:
Idan Horowitz 2021-03-29 18:59:51 +03:00 committed by Andreas Kling
parent b88de8a91f
commit 754f87875f

View file

@ -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);