libbb/login/su: do not sanitize shell name twice
function old new delta setup_environment 191 205 +14 login_main 1002 987 -15 su_main 474 458 -16 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/2 up/down: 14/-31) Total: -17 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@@ -32,6 +32,9 @@
|
||||
|
||||
void FAST_FUNC setup_environment(const char *shell, int flags, const struct passwd *pw)
|
||||
{
|
||||
if (!shell || !shell[0])
|
||||
shell = DEFAULT_SHELL;
|
||||
|
||||
/* Change the current working directory to be the home directory
|
||||
* of the user */
|
||||
if (chdir(pw->pw_dir)) {
|
||||
|
Reference in New Issue
Block a user