diff options
author | Isaac Dunham <ibid.ag@gmail.com> | 2015-08-05 17:48:14 -0700 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2015-08-08 17:15:59 -0500 |
commit | 9bfd2cf0e8499c4dcca41ccd80f86929181868cb (patch) | |
tree | c6f9ca4b597a26029fdc6b7ba8e609da99519234 | |
parent | b73f89429f4a28bc1c694094b97abd011a9a2f9e (diff) | |
download | toybox-9bfd2cf0e8499c4dcca41ccd80f86929181868cb.tar.gz |
login: execl() requires a path, not a file name
-rw-r--r-- | toys/other/login.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/toys/other/login.c b/toys/other/login.c index c44a8879..c727bf96 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"); } |