*: s/"/bin/sh"/DEFAULT_SHELL, run_shell() API fix, remove unneeded strdup
function old new delta run_shell 157 166 +9 su_main 477 470 -7 sulogin_main 515 503 -12 Signed-off-by: Ladislav Michl <Ladislav.Michl@seznam.cz> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
committed by
Denys Vlasenko
parent
1b14cdb27c
commit
a73b87e934
@@ -43,7 +43,7 @@ void FAST_FUNC setup_environment(const char *shell, int flags, const struct pass
|
||||
const char *term;
|
||||
|
||||
/* Leave TERM unchanged. Set HOME, SHELL, USER, LOGNAME, PATH.
|
||||
Unset all other environment variables. */
|
||||
* Unset all other environment variables. */
|
||||
term = getenv("TERM");
|
||||
clearenv();
|
||||
if (term)
|
||||
@@ -57,7 +57,7 @@ void FAST_FUNC setup_environment(const char *shell, int flags, const struct pass
|
||||
//xsetenv("SHELL", shell);
|
||||
} else if (flags & SETUP_ENV_CHANGEENV) {
|
||||
/* Set HOME, SHELL, and if not becoming a super-user,
|
||||
USER and LOGNAME. */
|
||||
* USER and LOGNAME. */
|
||||
if (pw->pw_uid) {
|
||||
shortcut:
|
||||
xsetenv("USER", pw->pw_name);
|
||||
|
Reference in New Issue
Block a user