summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsaac Dunham <ibid.ag@gmail.com>2015-08-05 17:48:14 -0700
committerRob Landley <rob@landley.net>2015-08-08 17:15:59 -0500
commit9bfd2cf0e8499c4dcca41ccd80f86929181868cb (patch)
treec6f9ca4b597a26029fdc6b7ba8e609da99519234
parentb73f89429f4a28bc1c694094b97abd011a9a2f9e (diff)
downloadtoybox-9bfd2cf0e8499c4dcca41ccd80f86929181868cb.tar.gz
toybox-9bfd2cf0e8499c4dcca41ccd80f86929181868cb.tar.bz2
toybox-9bfd2cf0e8499c4dcca41ccd80f86929181868cb.zip
login: execl() requires a path, not a file name
-rw-r--r--toys/other/login.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/toys/other/login.c b/toys/other/login.c
index c44a887..c727bf9 100644
--- a/toys/other/login.c
+++ b/toys/other/login.c
@@ -160,8 +160,8 @@ void login_main(void)
ttyname(tty), hh ? "from" : "", hh ? TT.hostname : "");
// can't xexec here because name doesn't match argv[0]
- snprintf(toybuf, sizeof(toybuf)-1, "-%s", ss = basename_r(pwd->pw_shell));
+ snprintf(toybuf, sizeof(toybuf)-1, "-%s", basename_r(pwd->pw_shell));
toy_exec((char *[]){toybuf, 0});
- execl(ss, toybuf, NULL);
+ execl(pwd->pw_shell, toybuf, NULL);
error_exit("Failed to spawn shell");
}