]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
sulogin: get rid of calls to /bin/sash
authorDave Reisner <d@falconindy.com>
Tue, 28 Feb 2012 16:45:17 +0000 (11:45 -0500)
committerKarel Zak <kzak@redhat.com>
Mon, 12 Mar 2012 10:17:39 +0000 (11:17 +0100)
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>
login-utils/sulogin.c

index c9e376c43e78a2c32739c06f8f8d7d21adcaa354..f672e7531c10f015904900b63c885dd47a081e67 100644 (file)
@@ -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)