summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJean-Jacques Bernard-Gundol <jjbg@cvs.openbsd.org>2001-10-24 14:09:54 +0000
committerJean-Jacques Bernard-Gundol <jjbg@cvs.openbsd.org>2001-10-24 14:09:54 +0000
commit867af79237a7d5ab19519ec143042bd6e00570a0 (patch)
treef16ec8d03062b592bd4e0ab8c8a41a15587eaa9f /lib
parentb9d3ec7b4e5e1fae3d251a215bca3b67748e8e4f (diff)
detail the different protections in mprotect(2) man page and add PROT_NONE
in mmap(2) man page. deraadt@ ok.
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/sys/mmap.24
-rw-r--r--lib/libc/sys/mprotect.219
2 files changed, 21 insertions, 2 deletions
diff --git a/lib/libc/sys/mmap.2 b/lib/libc/sys/mmap.2
index 3c99f76bafa..9e50a65dc8f 100644
--- a/lib/libc/sys/mmap.2
+++ b/lib/libc/sys/mmap.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: mmap.2,v 1.25 2001/09/05 06:23:01 deraadt Exp $
+.\" $OpenBSD: mmap.2,v 1.26 2001/10/24 14:09:52 jjbg Exp $
.\" $NetBSD: mmap.2,v 1.5 1995/06/24 10:48:59 cgd Exp $
.\"
.\" Copyright (c) 1991, 1993
@@ -89,6 +89,8 @@ Pages may be executed.
Pages may be read.
.It Dv PROT_WRITE
Pages may be written.
+.It Dv PROT_NONE
+No permissions.
.El
.Pp
The
diff --git a/lib/libc/sys/mprotect.2 b/lib/libc/sys/mprotect.2
index 876e196c969..96b91e4a768 100644
--- a/lib/libc/sys/mprotect.2
+++ b/lib/libc/sys/mprotect.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: mprotect.2,v 1.7 1999/06/29 14:10:08 aaron Exp $
+.\" $OpenBSD: mprotect.2,v 1.8 2001/10/24 14:09:53 jjbg Exp $
.\" $NetBSD: mprotect.2,v 1.6 1995/10/12 15:41:08 jtc Exp $
.\"
.\" Copyright (c) 1991, 1993
@@ -53,6 +53,23 @@ changes the specified pages to have protection
.Fa prot .
Not all implementations will guarantee protection on a page basis;
the granularity of protection changes may be as large as an entire region.
+.Pp
+The protections (region accessibility) are specified in the
+.Fa prot
+argument by
+.Tn OR Ns 'ing
+the following values:
+.Pp
+.Bl -tag -width MAP_FIXEDX
+.It Dv PROT_EXEC
+Pages may be executed.
+.It Dv PROT_READ
+Pages may be read.
+.It Dv PROT_WRITE
+Pages may be written.
+.It Dv PROT_NONE
+No permissions.
+.El
.Sh RETURN VALUES
Upon successful completion,
a value of 0 is returned.