diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2003-08-21 18:56:08 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2003-08-21 18:56:08 +0000 |
commit | 0d5b09054c67f03f088bb749fe3b1e53819a82d8 (patch) | |
tree | 5bcf3c6fc7e2695399f960b2ccabc5ae6cdc7bca /sys/kern/init_main.c | |
parent | 07999a2beca07715a2095b080aa2444ef6cf1b67 (diff) |
emulation is now controlled by sysctl. changes:
add e_flags to struct emul. this stores on/off and native flags.
check for emul enabled in check_exec(). gather all the emuls into a
emulsw so a sysctl can find them. create sysctl. move maxhdrsiz calcualation
into init_main so it cleans up sys_execve codepath. teach sysctl utility
to grok kern.emul hierarchy.
requested and ok deraadt@ some comments from mickey@
Diffstat (limited to 'sys/kern/init_main.c')
-rw-r--r-- | sys/kern/init_main.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index ada370a248e..e9393e2a2bd 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: init_main.c,v 1.105 2003/06/02 23:28:05 millert Exp $ */ +/* $OpenBSD: init_main.c,v 1.106 2003/08/21 18:56:07 tedu Exp $ */ /* $NetBSD: init_main.c,v 1.84.4.1 1996/06/02 09:08:06 mrg Exp $ */ /* @@ -135,6 +135,7 @@ void start_cleaner(void *); void start_update(void *); void start_reaper(void *); void start_crypto(void *); +void init_exec(void); extern char sigcode[], esigcode[]; #ifdef SYSCALL_DEBUG @@ -159,8 +160,10 @@ struct emul emul_native = { NULL, sigcode, esigcode, + EMUL_ENABLED | EMUL_NATIVE, }; + /* * System startup; initialize the world, create process 0, mount root * filesystem, and fork to create init and pagedaemon. Most of the @@ -373,6 +376,9 @@ main(framep) guard[i] = arc4random(); #endif + /* init exec and emul */ + init_exec(); + /* Start the scheduler */ scheduler_start(); |