diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2002-03-14 00:42:26 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2002-03-14 00:42:26 +0000 |
commit | 4e75a2f3d47fcb4101ad6c63743e4262538a944a (patch) | |
tree | 8b4782ea02392ac0303642f999b3a00a9de95490 /sys/arch/i386 | |
parent | 31d9f37c33069ba39395849737d1ef3662a4c687 (diff) |
Turn the ptrace(2) syscall into a kernel compile option, option PTRACE in
your kernel configuration file.
By default, GENERIC will enable this.
When PTRACE is not enabled, several ptrace-like features of the procfs
filesystem will be disabled as well (namely, the ability to read and write
any process' registers, as well as attching, single stepping and detaching
to/from processes).
This should help paranoid people build better sandboxens, and us to build
smaller ramdisks.
Diffstat (limited to 'sys/arch/i386')
-rw-r--r-- | sys/arch/i386/i386/process_machdep.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/arch/i386/i386/process_machdep.c b/sys/arch/i386/i386/process_machdep.c index 26c441dc8d3..7897ee4bf8c 100644 --- a/sys/arch/i386/i386/process_machdep.c +++ b/sys/arch/i386/i386/process_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: process_machdep.c,v 1.8 2002/02/18 23:26:18 mickey Exp $ */ +/* $OpenBSD: process_machdep.c,v 1.9 2002/03/14 00:42:24 miod Exp $ */ /* $NetBSD: process_machdep.c,v 1.22 1996/05/03 19:42:25 christos Exp $ */ /* @@ -160,6 +160,8 @@ process_read_fpregs(p, regs) return (0); } +#ifdef PTRACE + int process_write_regs(p, regs) struct proc *p; @@ -271,3 +273,5 @@ process_set_pc(p, addr) return (0); } + +#endif /* PTRACE */ |