[PATCH] getty: prevent getty from changing tty lines protections and ownership
bboubaker
boubaker.bassem.1991 at gmail.com
Mon Nov 21 13:50:42 UTC 2022
There are dedicated linux sub-systems such as udev/mdev to handle tty lines ownership and permissions
getty should be only capable of using it and not do an override.
Signed-off-by: bboubaker <bboubaker at sierrawireless.com>
---
loginutils/getty.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/loginutils/getty.c b/loginutils/getty.c
index cd6378d80..af580dd61 100644
--- a/loginutils/getty.c
+++ b/loginutils/getty.c
@@ -219,10 +219,6 @@ static void open_tty(void)
debug("open(2)\n");
close(0);
xopen(G.tty_name, O_RDWR | O_NONBLOCK); /* uses fd 0 */
-
- /* Set proper protections and ownership */
- fchown(0, 0, 0); /* 0:0 */
- fchmod(0, 0620); /* crw--w---- */
} else {
char *n;
/*
--
2.25.1
More information about the busybox
mailing list