From 9bfd2cf0e8499c4dcca41ccd80f86929181868cb Mon Sep 17 00:00:00 2001 From: Isaac Dunham Date: Wed, 5 Aug 2015 17:48:14 -0700 Subject: login: execl() requires a path, not a file name --- toys/other/login.c | 4 ++-- 1 file 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"); } -- cgit v1.2.3