diff options
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/setup_environment.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libbb/setup_environment.c b/libbb/setup_environment.c index a95fbc5bf..73229ca6c 100644 --- a/libbb/setup_environment.c +++ b/libbb/setup_environment.c @@ -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)) { |