* configure.in, libmisc/shell.c, libmisc/setupenv.c, src/newgrp.c,
src/su.c: Let the system shell be configurable.
This commit is contained in:
@@ -242,7 +242,7 @@ void setup_env (struct passwd *info)
|
||||
*/
|
||||
|
||||
if ((NULL == info->pw_shell) || ('\0' == *info->pw_shell)) {
|
||||
static char temp_pw_shell[] = "/bin/sh";
|
||||
static char temp_pw_shell[] = SHELL;
|
||||
|
||||
info->pw_shell = temp_pw_shell;
|
||||
}
|
||||
|
@@ -85,7 +85,7 @@ int shell (const char *file, /*@null@*/const char *arg, char *const envp[])
|
||||
* Assume this is a shell script (with no shebang).
|
||||
* Interpret it with /bin/sh
|
||||
*/
|
||||
execle ("/bin/sh", "sh", file, (char *)0, envp);
|
||||
execle (SHELL, "sh", file, (char *)0, envp);
|
||||
err = errno;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user