diff options
author | Dave Reisner | 2012-02-28 17:45:17 +0100 |
---|---|---|
committer | Karel Zak | 2012-03-12 11:17:39 +0100 |
commit | b1619c88d3221d3587eea0aaf0415f2244da9a4f (patch) | |
tree | 33a6696aa93ecd610d38452bc390737d08e5c1d7 /login-utils/sulogin.c | |
parent | sulogin: use size_t for iterator to avoid cast (diff) | |
download | kernel-qcow2-util-linux-b1619c88d3221d3587eea0aaf0415f2244da9a4f.tar.gz kernel-qcow2-util-linux-b1619c88d3221d3587eea0aaf0415f2244da9a4f.tar.xz kernel-qcow2-util-linux-b1619c88d3221d3587eea0aaf0415f2244da9a4f.zip |
sulogin: get rid of calls to /bin/sash
This probably doesn't exist on most systems, and if the root's shell and
/bin/sh fail to execute, it seems unlikely that /bin/sash will save us.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Diffstat (limited to 'login-utils/sulogin.c')
-rw-r--r-- | login-utils/sulogin.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/login-utils/sulogin.c b/login-utils/sulogin.c index c9e376c43..f672e7531 100644 --- a/login-utils/sulogin.c +++ b/login-utils/sulogin.c @@ -54,7 +54,6 @@ #define F_PASSWD "/etc/passwd" #define F_SHADOW "/etc/shadow" #define BINSH "/bin/sh" -#define STATICSH "/bin/sash" static int timeout; static int profile; @@ -400,12 +399,6 @@ static void sushell(struct passwd *pwd) setenv("SHELL", BINSH, 1); execl(BINSH, profile ? "-sh" : "sh", NULL); perror(BINSH); - - /* Fall back to staticly linked shell if both the users shell - and /bin/sh failed to execute. */ - setenv("SHELL", STATICSH, 1); - execl(STATICSH, STATICSH, NULL); - perror(STATICSH); } static void usage(void) |