diff options
author | Håkon Nessjøen <haakon.nessjoen@gmail.com> | 2013-08-07 21:29:02 +0200 |
---|---|---|
committer | Håkon Nessjøen <haakon.nessjoen@gmail.com> | 2013-08-07 21:29:02 +0200 |
commit | 888b912c0c917e27bfa6fabbb1c00e7e34d2d94d (patch) | |
tree | 3ec22362ae0f18c44e6bc1cddc1068eb920ad1df | |
parent | 8a9c24996670057d58701b60405db061840d9ac2 (diff) | |
download | MAC-Telnet-888b912c0c917e27bfa6fabbb1c00e7e34d2d94d.tar.gz MAC-Telnet-888b912c0c917e27bfa6fabbb1c00e7e34d2d94d.zip |
Fixed bug where the shell was executed without the first argument being it's own path. (Makes problems with programs such as busybox)
-rw-r--r-- | mactelnetd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mactelnetd.c b/mactelnetd.c index c338678..633fb64 100644 --- a/mactelnetd.c +++ b/mactelnetd.c @@ -531,7 +531,7 @@ static void user_login(struct mt_connection *curconn, struct mt_mactelnet_hdr *p /* Spawn shell */ /* TODO: Maybe use "login -f USER" instead? renders motd and executes shell correctly for system */ - execl(user->pw_shell, "-", (char *) 0); + execl(user->pw_shell, user->pw_shell, "-", (char *) 0); exit(0); // just to be sure. } close(curconn->slavefd); |