[hackers] [ubase] Set TERM to linux if needed for su and login || sin
commit 916b7fed1e5575792a5db6a9340a56ce014b1ecb
Author: sin <sin_AT_2f30.org>
Date: Tue Jun 3 18:19:31 2014 +0100
Set TERM to linux if needed for su and login
diff --git a/login.c b/login.c
index 4d74dd1..fa01371 100644
--- a/login.c
+++ b/login.c
_AT_@ -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
index 8b2d154..47d3fe7 100644
--- a/su.c
+++ b/su.c
_AT_@ -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
Received on Tue Jun 03 2014 - 19:21:09 CEST
This archive was generated by hypermail 2.3.0
: Tue Jun 03 2014 - 19:24:07 CEST