Kconfig: rename machine to architecture, ident to board.
Make timezone and maxusers parameters optional. Enable kernel options UCB_METER, EXEC_AOUT, EXEC_ELF and EXEC_SCRIPT by default.
This commit is contained in:
@@ -31,26 +31,14 @@
|
||||
#include <sys/inode.h>
|
||||
#include <sys/exec.h>
|
||||
|
||||
#ifdef EXEC_SCRIPT
|
||||
int exec_script_check(struct exec_params *epp);
|
||||
#endif
|
||||
#ifdef EXEC_AOUT
|
||||
int exec_aout_check(struct exec_params *epp);
|
||||
#endif
|
||||
#ifdef EXEC_ELF
|
||||
int exec_elf_check(struct exec_params *epp);
|
||||
#endif
|
||||
|
||||
const struct execsw execsw[] = {
|
||||
#ifdef EXEC_AOUT
|
||||
{ exec_aout_check, "a.out" }, /* a.out binaries */
|
||||
#endif
|
||||
#ifdef EXEC_ELF
|
||||
{ exec_elf_check, "elf" }, /* 32bit ELF bins */
|
||||
#endif
|
||||
#ifdef EXEC_SCRIPT
|
||||
{ exec_script_check, "script" }, /* shell scripts */
|
||||
#endif
|
||||
};
|
||||
int nexecs = (sizeof(execsw) / sizeof(*execsw));
|
||||
int exec_maxhdrsz;
|
||||
|
||||
@@ -260,13 +260,11 @@ void exec_save_args(struct exec_params *epp)
|
||||
if ((argp = epp->userargp) != NULL)
|
||||
while (argp[argc])
|
||||
argc++;
|
||||
#ifdef EXEC_SCRIPT
|
||||
if (epp->sh.interpreted) {
|
||||
argc++;
|
||||
if (epp->sh.interparg[0])
|
||||
argc++;
|
||||
}
|
||||
#endif
|
||||
if (argc != 0) {
|
||||
if ((epp->argp = (char **)exec_alloc(argc * sizeof(char *), NBPW, epp)) == NULL)
|
||||
return;
|
||||
@@ -283,7 +281,7 @@ void exec_save_args(struct exec_params *epp)
|
||||
ap = *argp++;
|
||||
else
|
||||
ap = NULL;
|
||||
#ifdef EXEC_SCRIPT
|
||||
|
||||
if (epp->sh.interpreted) {
|
||||
if (epp->argc == 0)
|
||||
ap = epp->sh.interpname;
|
||||
@@ -295,7 +293,6 @@ void exec_save_args(struct exec_params *epp)
|
||||
--argp;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (ap == 0)
|
||||
break;
|
||||
l = strlen(ap)+1;
|
||||
|
||||
@@ -66,9 +66,7 @@ int exec_check(struct exec_params *epp)
|
||||
* Read the first 'SHSIZE' bytes from the file to execute
|
||||
*/
|
||||
DEBUG("Read header %d bytes from %d\n", sizeof(epp->hdr), 0);
|
||||
#ifdef EXEC_SCRIPT
|
||||
epp->hdr.sh[0] = '\0'; /* for zero length files */
|
||||
#endif
|
||||
error = rdwri (UIO_READ, epp->ip,
|
||||
(caddr_t) &epp->hdr, sizeof(epp->hdr),
|
||||
(off_t)0, IO_UNIT, &r);
|
||||
|
||||
Reference in New Issue
Block a user