move all "-/bin/sh" "/bin/sh" and "sh" to libbb/messages.c file as one

constant.
Vodz last_patch_107
This commit is contained in:
Glenn L McGrath
2003-09-02 02:36:18 +00:00
parent 005f83adf5
commit dc4e75ef7c
14 changed files with 50 additions and 37 deletions

View File

@@ -320,7 +320,7 @@ EditFile(const char *user, const char *file)
ptr = PATH_VI;
snprintf(visual, sizeof(visual), "%s %s", ptr, file);
execl("/bin/sh", "/bin/sh", "-c", visual, NULL);
execl(DEFAULT_SHELL, DEFAULT_SHELL, "-c", visual, NULL);
perror("exec");
exit(0);
}
@@ -360,7 +360,7 @@ ChangeUser(const char *user, short dochdir)
}
setenv("USER", pas->pw_name, 1);
setenv("HOME", pas->pw_dir, 1);
setenv("SHELL", "/bin/sh", 1);
setenv("SHELL", DEFAULT_SHELL, 1);
/*
* Change running state to the user in question