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/miscfs/procfs/procfs_subr.c | |
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/miscfs/procfs/procfs_subr.c')
-rw-r--r-- | sys/miscfs/procfs/procfs_subr.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/miscfs/procfs/procfs_subr.c b/sys/miscfs/procfs/procfs_subr.c index 9d0f1c9fb5a..0ec024a1698 100644 --- a/sys/miscfs/procfs/procfs_subr.c +++ b/sys/miscfs/procfs/procfs_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: procfs_subr.c,v 1.16 2002/01/30 20:29:44 nordin Exp $ */ +/* $OpenBSD: procfs_subr.c,v 1.17 2002/03/14 00:42:25 miod Exp $ */ /* $NetBSD: procfs_subr.c,v 1.15 1996/02/12 15:01:42 christos Exp $ */ /* @@ -223,11 +223,13 @@ procfs_rw(v) case Pnotepg: return (procfs_donote(curp, p, pfs, uio)); +#ifdef PTRACE case Pregs: return (procfs_doregs(curp, p, pfs, uio)); case Pfpregs: return (procfs_dofpregs(curp, p, pfs, uio)); +#endif case Pctl: return (procfs_doctl(curp, p, pfs, uio)); |