summaryrefslogtreecommitdiff
path: root/lib/libc/sys
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2011-10-24 19:31:57 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2011-10-24 19:31:57 +0000
commit7aba29cc786828acb608f6681acb4fddf8315386 (patch)
tree72c62bf3994de547d7fbaf2e79713a231ca9d7e8 /lib/libc/sys
parente7b559f9ba185d5c69e7282885e63b1f4eb7bb90 (diff)
Update POSIX references for chdir(2) and chmod(2) from 1988 to 2008.
Add POSIX references for fchdir(2), fchmod(2), fchmodat(2), fchown(2), lchown(2) and execve(2). State that fchmod(2) can return EPERM as required by POSIX 2008 (tested). Requested by sobrado@; ok guenther@ jmc@ sobrado@.
Diffstat (limited to 'lib/libc/sys')
-rw-r--r--lib/libc/sys/chdir.210
-rw-r--r--lib/libc/sys/chmod.216
-rw-r--r--lib/libc/sys/chown.210
-rw-r--r--lib/libc/sys/execve.28
4 files changed, 29 insertions, 15 deletions
diff --git a/lib/libc/sys/chdir.2 b/lib/libc/sys/chdir.2
index ca8706f5e71..ea24262a7fb 100644
--- a/lib/libc/sys/chdir.2
+++ b/lib/libc/sys/chdir.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: chdir.2,v 1.8 2007/05/31 19:19:32 jmc Exp $
+.\" $OpenBSD: chdir.2,v 1.9 2011/10/24 19:31:56 schwarze Exp $
.\" $NetBSD: chdir.2,v 1.7 1995/02/27 12:32:00 cgd Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993
@@ -30,7 +30,7 @@
.\"
.\" @(#)chdir.2 8.2 (Berkeley) 12/11/93
.\"
-.Dd $Mdocdate: May 31 2007 $
+.Dd $Mdocdate: October 24 2011 $
.Dt CHDIR 2
.Os
.Sh NAME
@@ -115,8 +115,10 @@ is not a valid file descriptor.
.Sh STANDARDS
The
.Fn chdir
-is expected to conform to
-.St -p1003.1-88 .
+and
+.Fn fchdir
+functions are expected to conform to
+.St -p1003.1-2008 .
.Sh HISTORY
The
.Fn fchdir
diff --git a/lib/libc/sys/chmod.2 b/lib/libc/sys/chmod.2
index 0e954343649..2f3985cc8a2 100644
--- a/lib/libc/sys/chmod.2
+++ b/lib/libc/sys/chmod.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: chmod.2,v 1.17 2011/07/19 20:58:05 matthew Exp $
+.\" $OpenBSD: chmod.2,v 1.18 2011/10/24 19:31:56 schwarze Exp $
.\" $NetBSD: chmod.2,v 1.7 1995/02/27 12:32:06 cgd Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993
@@ -30,7 +30,7 @@
.\"
.\" @(#)chmod.2 8.1 (Berkeley) 6/4/93
.\"
-.Dd $Mdocdate: July 19 2011 $
+.Dd $Mdocdate: October 24 2011 $
.Dt CHMOD 2
.Os
.Sh NAME
@@ -222,6 +222,9 @@ refers to a socket, not to a file.
.It Bq Er EINVAL
.Fa mode
contains bits other than the file type and those described above.
+.It Bq Er EPERM
+The effective user ID does not match the owner of the file and
+the effective user ID is not the superuser.
.It Bq Er EROFS
The file resides on a read-only file system.
.It Bq Er EIO
@@ -235,9 +238,12 @@ An I/O error occurred while reading from or writing to the file system.
.Xr sticky 8
.Sh STANDARDS
The
-.Fn chmod
-function is expected to conform to
-.St -p1003.1-88 .
+.Fn chmod ,
+.Fn fchmod ,
+and
+.Fn fchmodat
+functions are expected to conform to
+.St -p1003.1-2008 .
.Sh HISTORY
The
.Fn fchmod
diff --git a/lib/libc/sys/chown.2 b/lib/libc/sys/chown.2
index d083222cddc..20aa594b549 100644
--- a/lib/libc/sys/chown.2
+++ b/lib/libc/sys/chown.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: chown.2,v 1.17 2011/07/19 20:58:05 matthew Exp $
+.\" $OpenBSD: chown.2,v 1.18 2011/10/24 19:31:56 schwarze Exp $
.\" $NetBSD: chown.2,v 1.10 1995/10/12 15:40:47 jtc Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993, 1994
@@ -30,7 +30,7 @@
.\"
.\" @(#)chown.2 8.4 (Berkeley) 4/19/94
.\"
-.Dd $Mdocdate: July 19 2011 $
+.Dd $Mdocdate: October 24 2011 $
.Dt CHOWN 2
.Os
.Sh NAME
@@ -212,9 +212,11 @@ An I/O error occurred while reading from or writing to the file system.
.Xr chown 8
.Sh STANDARDS
The
-.Fn chown
+.Fn chown ,
+.Fn fchown ,
+.Fn fchownat ,
and
-.Fn fchownat
+.Fn lchown
functions are expected to conform to
.St -p1003.1-2008 .
.Sh HISTORY
diff --git a/lib/libc/sys/execve.2 b/lib/libc/sys/execve.2
index b4e8f573c7c..fb10ff55a0e 100644
--- a/lib/libc/sys/execve.2
+++ b/lib/libc/sys/execve.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: execve.2,v 1.36 2011/09/03 22:59:07 jmc Exp $
+.\" $OpenBSD: execve.2,v 1.37 2011/10/24 19:31:56 schwarze Exp $
.\" $NetBSD: execve.2,v 1.9 1995/02/27 12:32:25 cgd Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993
@@ -30,7 +30,7 @@
.\"
.\" @(#)execve.2 8.3 (Berkeley) 1/24/94
.\"
-.Dd $Mdocdate: September 3 2011 $
+.Dd $Mdocdate: October 24 2011 $
.Dt EXECVE 2
.Os
.Sh NAME
@@ -315,6 +315,10 @@ the system file table was found to be full.
.Xr environ 7
.Sh STANDARDS
The
+.Fn execve
+function is expected to conform to
+.St -p1003.1-2008 .
+The
.Fn exect
function should not be used in portable applications.
.Sh HISTORY