aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2011-12-16 00:25:17 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2011-12-16 00:25:17 +0100
commit2bef526331a194da199993ec747598f625a5a9a8 (patch)
tree4915779211de083dccfce00e9da5942f2e626120
parentd6f5000c1303ca7c31759d380fe154a46bd7126b (diff)
downloadbusybox-2bef526331a194da199993ec747598f625a5a9a8.tar.gz
ash: add comment about bash's ENOEXEC handling. No code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--shell/ash.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 14472cb61..d02b74a4c 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -7435,6 +7435,12 @@ tryexec(IF_FEATURE_SH_STANDALONE(int applet_no,) char *cmd, char **argv, char **
*
* That is, do not use $SHELL, user's shell, or /bin/sh;
* just call ourselves.
+ *
+ * Note that bash reads ~80 chars of the file, and if it sees
+ * a zero byte before it sees newline, it doesn't try to
+ * interpret it, but fails with "cannot execute binary file"
+ * message. For one, it prevents atempts to interpret
+ * foreign ELF binaries as shell scripts.
*/
char **ap;
char **new;