Platform: prefers the passwd shell over $SHELL
This commit is contained in:
1 parent
66709ccc77
commit
9859b248ff
1 file changed
+1
-4
@@ -299,10 +299,7 @@ static void getHostName(FFPlatform* platform, const struct utsname* uts) {
|
||||
}
|
||||
|
||||
static void getUserShell(FFPlatform* platform, const struct passwd* pwd) {
|
||||
const char* shell = getenv("SHELL");
|
||||
if (!ffStrSet(shell) && pwd) {
|
||||
shell = pwd->pw_shell;
|
||||
}
|
||||
const char* shell = pwd ? pwd->pw_shell : getenv("SHELL");
|
||||
|
||||
ffStrbufAppendS(&platform->userShell, shell);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user