ubase

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

commit 916b7fed1e5575792a5db6a9340a56ce014b1ecb
parent 8216a97519e8d9adfc56ede64e44e8574701e531
Author: sin <sin@2f30.org>
Date:   Tue,  3 Jun 2014 18:19:31 +0100

Set TERM to linux if needed for su and login

Diffstat:
Mlogin.c | 1+
Msu.c | 2+-
2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/login.c b/login.c @@ -117,6 +117,7 @@ dologin(struct passwd *pw, int preserve) setenv("SHELL", pw->pw_shell, !preserve); setenv("USER", pw->pw_name, !preserve); setenv("LOGNAME", pw->pw_name, !preserve); + setenv("TERM", "linux", !preserve); setenv("PATH", ENV_PATH, !preserve); if (chdir(pw->pw_dir) < 0) eprintf("chdir %s:", pw->pw_dir); diff --git a/su.c b/su.c @@ -171,7 +171,7 @@ dologin(struct passwd *pw) setenv("SHELL", pw->pw_shell, 1); setenv("USER", pw->pw_name, 1); setenv("LOGNAME", pw->pw_name, 1); - setenv("TERM", term ? term : "vt100", 1); + setenv("TERM", term ? term : "linux", 1); if (strcmp(pw->pw_name, "root") == 0) setenv("PATH", ENV_SUPATH, 1); else