diff options
-rw-r--r-- | lib/libc/sys/execve.2 | 3 | ||||
-rw-r--r-- | sys/kern/imgact_shell.c | 2 | ||||
-rw-r--r-- | sys/sys/imgact.h | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/lib/libc/sys/execve.2 b/lib/libc/sys/execve.2 index 56aefcf..84e9537 100644 --- a/lib/libc/sys/execve.2 +++ b/lib/libc/sys/execve.2 @@ -210,6 +210,9 @@ A component of the path prefix is not a directory. .It Bq Er ENAMETOOLONG A component of a pathname exceeded 255 characters, or an entire path name exceeded 1023 characters. +.It Bq Er ENAMETOOLONG +When invoking an interpreted script, the interpreter name +exceeds MAXSHELLCMDLEN characters. .It Bq Er ENOENT The new process file does not exist. .It Bq Er ELOOP diff --git a/sys/kern/imgact_shell.c b/sys/kern/imgact_shell.c index a15b56c..8480fcc 100644 --- a/sys/kern/imgact_shell.c +++ b/sys/kern/imgact_shell.c @@ -74,7 +74,7 @@ exec_shell_imgact(imgp) */ for (ihp = &image_header[2]; *ihp != '\n' && *ihp != '#'; ++ihp) { if (ihp >= &image_header[MAXSHELLCMDLEN]) - return(ENOEXEC); + return(ENAMETOOLONG); } line_endp = ihp; diff --git a/sys/sys/imgact.h b/sys/sys/imgact.h index c4647c5..b6f67a4 100644 --- a/sys/sys/imgact.h +++ b/sys/sys/imgact.h @@ -36,7 +36,7 @@ #ifndef _SYS_IMGACT_H_ #define _SYS_IMGACT_H_ -#define MAXSHELLCMDLEN 64 +#define MAXSHELLCMDLEN 128 struct image_params { struct proc *proc; /* our process struct */ |