Preserve getty environment in login

This commit is contained in:
sin 2014-02-17 11:30:56 +00:00
parent 6fd1d4c809
commit d7ef6ea895

View File

@ -108,5 +108,5 @@ main(int argc, char *argv[])
eprintf("login name cannot start with '-'\n");
if (logname[0] == '\0')
return EXIT_FAILURE;
return execvp("/bin/login", (char *[]){ "login", logname, NULL });
return execvp("/bin/login", (char *[]){ "login", "-p", logname, NULL });
}