I am stupid.

This commit is contained in:
sin 2014-06-03 11:03:25 +01:00
parent bc709278b6
commit 0de4f5fd9f

10
login.c
View File

@ -117,11 +117,11 @@ dologin(struct passwd *pw, int preserve)
{
if (preserve == 0)
clearenv();
setenv("HOME", pw->pw_dir, preserve);
setenv("SHELL", pw->pw_shell, preserve);
setenv("USER", pw->pw_name, preserve);
setenv("LOGNAME", pw->pw_name, preserve);
setenv("PATH", ENV_PATH, preserve);
setenv("HOME", pw->pw_dir, !preserve);
setenv("SHELL", pw->pw_shell, !preserve);
setenv("USER", pw->pw_name, !preserve);
setenv("LOGNAME", pw->pw_name, !preserve);
setenv("PATH", ENV_PATH, !preserve);
if (chdir(pw->pw_dir) < 0)
eprintf("chdir %s:", pw->pw_dir);
execlp(pw->pw_shell, pw->pw_shell, "-l", NULL);