From c0f86abe7a0718da743899a37103b96660b86b15 Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Mon, 14 May 2001 14:37:17 +0000 Subject: we don't use this sucking sash no more we now use `busybox' compiled with the marvellous dietlibc, which provides no less than 73 usefull binaries --- mdk-stage1/stage1.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'mdk-stage1') diff --git a/mdk-stage1/stage1.c b/mdk-stage1/stage1.c index 2faa35256..879a9765b 100644 --- a/mdk-stage1/stage1.c +++ b/mdk-stage1/stage1.c @@ -81,7 +81,7 @@ static void spawn_shell(void) { #ifdef SPAWN_SHELL int fd; - char * shell_name = "/sbin/sash"; + char * shell_name[] = { "/tmp/sh", NULL }; log_message("spawning a shell"); @@ -91,8 +91,8 @@ static void spawn_shell(void) log_message("cannot open /dev/tty2 -- no shell will be provided"); return; } - else if (access(shell_name, X_OK)) { - log_message("cannot open shell - %s doesn't exist", shell_name); + else if (access(shell_name[0], X_OK)) { + log_message("cannot open shell - %s doesn't exist", shell_name[0]); return; } @@ -106,8 +106,8 @@ static void spawn_shell(void) if (ioctl(0, TIOCSCTTY, NULL)) log_perror("could not set new controlling tty"); - execl(shell_name, shell_name, NULL); - log_message("execl of %s failed: %s", shell_name, strerror(errno)); + execve(shell_name[0], shell_name, grab_env()); + log_message("execl of %s failed: %s", shell_name[0], strerror(errno)); } close(fd); -- cgit v1.2.1