summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHåkon Nessjøen <haakon.nessjoen@gmail.com>2013-08-07 21:29:02 +0200
committerHåkon Nessjøen <haakon.nessjoen@gmail.com>2013-08-07 21:29:02 +0200
commit888b912c0c917e27bfa6fabbb1c00e7e34d2d94d (patch)
tree3ec22362ae0f18c44e6bc1cddc1068eb920ad1df
parent8a9c24996670057d58701b60405db061840d9ac2 (diff)
downloadMAC-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.c2
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);