From a397e601251c00aa121aa11313f11b08bda19984 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Fri, 18 Feb 2011 13:22:54 +0000 Subject: An attempt to open an append-only file without O_APPEND results in EPERM. OK jmc@ guenther@ --- lib/libc/sys/open.2 | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'lib/libc/sys') 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 , -- cgit v1.2.3