ubase

suckless linux base utils
git clone git://git.2f30.org/ubase
Log | Files | Refs | README | LICENSE

commit ac57c4ab7f0e2d64b503ec9f1863414c4eebeff7
parent 3e0d247d943732d6bfff3ddcb5b63990d2552303
Author: sin <sin@2f30.org>
Date:   Tue, 11 Feb 2014 13:08:10 +0000

Remember to reset ownership and permissions on the tty device

Diffstat:
Mgetty.c | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/getty.c b/getty.c @@ -76,6 +76,11 @@ main(int argc, char *argv[]) sigemptyset(&sa.sa_mask); sigaction(SIGHUP, &sa, NULL); + if (fchown(fd, 0, 0) < 0) + eprintf("fchown %s:", tty); + if (fchmod(fd, 0600) < 0) + eprintf("chmod %s:", tty); + if (argc > 2) return execvp(argv[2], argv + 2);