projects
/
platform
/
upstream
/
toybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b73f894
)
login: execl() requires a path, not a file name
author
Isaac Dunham
<ibid.ag@gmail.com>
Thu, 6 Aug 2015 00:48:14 +0000
(17:48 -0700)
committer
Rob Landley
<rob@landley.net>
Sat, 8 Aug 2015 22:15:59 +0000
(17:15 -0500)
toys/other/login.c
patch
|
blob
|
history
diff --git
a/toys/other/login.c
b/toys/other/login.c
index
c44a887
..
c727bf9
100644
(file)
--- 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");
}