summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_resource.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2014-11-16 12:30:52 +0000
committerderaadt <deraadt@openbsd.org>2014-11-16 12:30:52 +0000
commit1e8cdc2e593c4e9ec7f4bdac2fbf48a4ad29f5b8 (patch)
tree739083100a383196b1776cb84f65da8812dc079b /sys/kern/kern_resource.c
parentRead your compiler output even when it succeeds. Add missing variable to (diff)
downloadwireguard-openbsd-1e8cdc2e593c4e9ec7f4bdac2fbf48a4ad29f5b8.tar.xz
wireguard-openbsd-1e8cdc2e593c4e9ec7f4bdac2fbf48a4ad29f5b8.zip
Replace a plethora of historical protection options with just
PROT_NONE, PROT_READ, PROT_WRITE, and PROT_EXEC from mman.h. PROT_MASK is introduced as the one true way of extracting those bits. Remove UVM_ADV_* wrapper, using the standard names. ok doug guenther kettenis
Diffstat (limited to 'sys/kern/kern_resource.c')
-rw-r--r--sys/kern/kern_resource.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c
index 133029ac393..813c421e1f4 100644
--- a/sys/kern/kern_resource.c
+++ b/sys/kern/kern_resource.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_resource.c,v 1.50 2014/03/30 21:54:48 guenther Exp $ */
+/* $OpenBSD: kern_resource.c,v 1.51 2014/11/16 12:31:00 deraadt Exp $ */
/* $NetBSD: kern_resource.c,v 1.38 1996/10/23 07:19:38 matthias Exp $ */
/*-
@@ -281,7 +281,7 @@ dosetrlimit(struct proc *p, u_int which, struct rlimit *limp)
vm_prot_t prot;
if (limp->rlim_cur > alimp->rlim_cur) {
- prot = VM_PROT_READ|VM_PROT_WRITE;
+ prot = PROT_READ | PROT_WRITE;
size = limp->rlim_cur - alimp->rlim_cur;
#ifdef MACHINE_STACK_GROWS_UP
addr = USRSTACK + alimp->rlim_cur;
@@ -289,7 +289,7 @@ dosetrlimit(struct proc *p, u_int which, struct rlimit *limp)
addr = USRSTACK - limp->rlim_cur;
#endif
} else {
- prot = VM_PROT_NONE;
+ prot = PROT_NONE;
size = alimp->rlim_cur - limp->rlim_cur;
#ifdef MACHINE_STACK_GROWS_UP
addr = USRSTACK + limp->rlim_cur;