logo

skeud

Simple and portable utilities to deal with user accounts (su, login)
commit: 758bc621bdf930e9a62401f9600dafdabbbdd870
parent 3cd0077c12f93c527d13fd2016918c71e48e0e06
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Wed,  2 Nov 2022 01:52:17 +0100

login,su: Keep TERM environment variable

Diffstat:

Mlogin.c2++
Msu.c2++
2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/login.c b/login.c @@ -161,7 +161,9 @@ main(int argc, char *argv[]) if(!opt_p) { + char *term = getenv("TERM"); environ = envclear; + setenv("TERM", term, 1); } if(pwent != NULL) diff --git a/su.c b/su.c @@ -159,7 +159,9 @@ main(int argc, char *argv[]) if(!opt_p) { + char *term = getenv("TERM"); environ = envclear; + setenv("TERM", term, 1); } if(pwent != NULL)