diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2008-09-19 05:41:30 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2008-09-19 05:41:30 +0000 |
commit | 799525cc146c8f9afe081cbbee2e46801d247119 (patch) | |
tree | 388be59cd1473195b0fbcc2551f98e2e613faca7 /sys | |
parent | e2bd4f3b1f7de4f3b46a619b3fd532290ae6eba1 (diff) |
increase MAXINTERP from 64 to 128 and allow a little extra room on top
of that for shell scripts to cover the #!, an optional space following
it and a newline at the end. feedback and ok miod@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/exec_conf.c | 4 | ||||
-rw-r--r-- | sys/sys/exec_script.h | 3 | ||||
-rw-r--r-- | sys/sys/param.h | 4 |
3 files changed, 6 insertions, 5 deletions
diff --git a/sys/kern/exec_conf.c b/sys/kern/exec_conf.c index 0fdb744101d..8c86a3303a3 100644 --- a/sys/kern/exec_conf.c +++ b/sys/kern/exec_conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_conf.c,v 1.18 2007/05/28 23:10:10 beck Exp $ */ +/* $OpenBSD: exec_conf.c,v 1.19 2008/09/19 05:41:29 djm Exp $ */ /* $NetBSD: exec_conf.c,v 1.16 1995/12/09 05:34:47 cgd Exp $ */ /* @@ -81,7 +81,7 @@ extern struct emul emul_native, emul_elf32, emul_elf64, emul_aout, emul_osf1, emul_sunos, emul_svr4, emul_ultrix; struct execsw execsw[] = { - { MAXINTERP, exec_script_makecmds, &emul_native, }, /* shell scripts */ + { EXEC_SCRIPT_HDRSZ, exec_script_makecmds, &emul_native, }, /* shell scripts */ #ifdef _KERN_DO_AOUT #ifdef COMPAT_AOUT { sizeof(struct exec), exec_aout_makecmds, &emul_aout }, diff --git a/sys/sys/exec_script.h b/sys/sys/exec_script.h index ca85acf5b0f..ad3cf43b242 100644 --- a/sys/sys/exec_script.h +++ b/sys/sys/exec_script.h @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_script.h,v 1.4 2002/03/14 01:27:14 millert Exp $ */ +/* $OpenBSD: exec_script.h,v 1.5 2008/09/19 05:41:29 djm Exp $ */ /* $NetBSD: exec_script.h,v 1.6 1995/03/26 20:24:11 jtc Exp $ */ /* @@ -33,6 +33,7 @@ #define EXEC_SCRIPT_MAGIC "#!" #define EXEC_SCRIPT_MAGICLEN 2 +#define EXEC_SCRIPT_HDRSZ (EXEC_SCRIPT_MAGICLEN + 1 + MAXINTERP + 1) #define SETUIDSCRIPTS /* they are secure, so enable them */ diff --git a/sys/sys/param.h b/sys/sys/param.h index aa41220abf7..63baf82def3 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.75 2008/07/02 00:13:32 deraadt Exp $ */ +/* $OpenBSD: param.h,v 1.76 2008/09/19 05:41:29 djm Exp $ */ /* $NetBSD: param.h,v 1.23 1996/03/17 01:02:29 thorpej Exp $ */ /*- @@ -67,7 +67,7 @@ #include <sys/syslimits.h> #define MAXCOMLEN 16 /* max command name remembered */ -#define MAXINTERP 64 /* max interpreter file name length */ +#define MAXINTERP 128 /* max interpreter file name length */ #define MAXLOGNAME LOGIN_NAME_MAX /* max login name length w/ NUL */ #define MAXUPRC CHILD_MAX /* max simultaneous processes */ #define NCARGS ARG_MAX /* max bytes for an exec function */ |