aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorbug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277>2003-09-15 12:00:19 +0000
committerbug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277>2003-09-15 12:00:19 +0000
commit99340a6d66aea165e8ee42ac72fc21c8185d1ad0 (patch)
tree51a23e67ceb884f57d8c696e4b6131384b5aa2c2 /shell
parent4fce7d968d0626c8fb9d3d5f79b599ba26198775 (diff)
downloadbusybox-w32-99340a6d66aea165e8ee42ac72fc21c8185d1ad0.tar.gz
busybox-w32-99340a6d66aea165e8ee42ac72fc21c8185d1ad0.tar.bz2
busybox-w32-99340a6d66aea165e8ee42ac72fc21c8185d1ad0.zip
Patch by Jean Wolter to fix a bug where a script wouldnt be executed
unless it had #!/bin/sh in the first line "It correctly locates the script, tries to execute it via execve which fails. After that it tries to hand it over to /bin/sh which fails too, since ash - neither provides the absolute pathname to /bin/sh - nor tries to lookup the script via PATH if called as "sh script" " git-svn-id: svn://busybox.net/trunk/busybox@7528 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 59aa336cd..2146349ab 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -3729,7 +3729,10 @@ repeat:
3729 for (ap = argv; *ap; ap++) 3729 for (ap = argv; *ap; ap++)
3730 ; 3730 ;
3731 ap = new = ckmalloc((ap - argv + 2) * sizeof(char *)); 3731 ap = new = ckmalloc((ap - argv + 2) * sizeof(char *));
3732 *ap++ = cmd = (char *)DEFAULT_SHELL; 3732 ap[1] = cmd;
3733 *ap = cmd = (char *)DEFAULT_SHELL;
3734 ap += 2;
3735 argv++;
3733 while ((*ap++ = *argv++)) 3736 while ((*ap++ = *argv++))
3734 ; 3737 ;
3735 argv = new; 3738 argv = new;