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 <[email protected]>
---
 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

_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to