summaryrefslogtreecommitdiff
path: root/sys/miscfs/procfs/procfs_mem.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/miscfs/procfs/procfs_mem.c')
-rw-r--r--sys/miscfs/procfs/procfs_mem.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/miscfs/procfs/procfs_mem.c b/sys/miscfs/procfs/procfs_mem.c
index 57c121a0f9d..afa929c1f7a 100644
--- a/sys/miscfs/procfs/procfs_mem.c
+++ b/sys/miscfs/procfs/procfs_mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: procfs_mem.c,v 1.15 2001/11/06 01:44:23 art Exp $ */
+/* $OpenBSD: procfs_mem.c,v 1.16 2002/01/20 11:27:52 art Exp $ */
/* $NetBSD: procfs_mem.c,v 1.8 1996/02/09 22:40:50 christos Exp $ */
/*
@@ -104,6 +104,8 @@ procfs_domem(curp, p, pfs, uio)
* of the entire system, and the system was not
* compiled with permanently insecure mode turned
* on.
+ *
+ * (3) It's currently execing.
*/
int
procfs_checkioperm(p, t)
@@ -119,6 +121,9 @@ procfs_checkioperm(p, t)
if ((t->p_pid == 1) && (securelevel > -1))
return (EPERM);
+ if (t->p_flag & P_INEXEC)
+ return (EAGAIN);
+
return (0);
}