summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2011-02-18 13:22:53 +0000
committermillert <millert@openbsd.org>2011-02-18 13:22:53 +0000
commit8b9cb4395ccf01732e59427a04ed45e3d7974913 (patch)
treeac11ebd1371cefe4cc5c141655a2b1d5c7d9cf7c
parentput bsd.mp into the iso image too. (diff)
downloadwireguard-openbsd-8b9cb4395ccf01732e59427a04ed45e3d7974913.tar.xz
wireguard-openbsd-8b9cb4395ccf01732e59427a04ed45e3d7974913.zip
An attempt to open an append-only file without O_APPEND results in EPERM.
OK jmc@ guenther@
-rw-r--r--lib/libc/sys/open.212
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/libc/sys/open.2 b/lib/libc/sys/open.2
index 79cb4c89770..2190c88295d 100644
--- a/lib/libc/sys/open.2
+++ b/lib/libc/sys/open.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: open.2,v 1.35 2010/09/07 21:26:51 millert Exp $
+.\" $OpenBSD: open.2,v 1.36 2011/02/18 13:22:53 millert Exp $
.\" $NetBSD: open.2,v 1.8 1995/02/27 12:35:14 cgd Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993
@@ -30,7 +30,7 @@
.\"
.\" @(#)open.2 8.2 (Berkeley) 11/16/93
.\"
-.Dd $Mdocdate: September 7 2010 $
+.Dd $Mdocdate: February 18 2011 $
.Dt OPEN 2
.Os
.Sh NAME
@@ -294,6 +294,13 @@ points outside the process's allocated address space.
and
.Dv O_EXCL
were specified and the file exists.
+.It Bq Er EPERM
+The file named by
+.Fa path
+is flagged append-only but
+.Dv O_APPEND
+was not specified in
+.Fa flags .
.It Bq Er EOPNOTSUPP
An attempt was made to open a socket (not currently implemented).
.It Bq Er EBUSY
@@ -301,6 +308,7 @@ An attempt was made to open a terminal device that requires exclusive
access and the specified device has already be opened.
.El
.Sh SEE ALSO
+.Xr chflags 2 ,
.Xr chmod 2 ,
.Xr close 2 ,
.Xr dup 2 ,