cvs commit: src/lib/libc/sys mkfifo.2

Pawel Jakub Dawidek pjd at FreeBSD.org
Wed Dec 13 03:20:41 PST 2006


On Wed, Dec 13, 2006 at 10:04:42PM +1100, Bruce Evans wrote:
> On Wed, 13 Dec 2006, Pawel Jakub Dawidek wrote:
> 
> >pjd         2006-12-13 09:58:49 UTC
> >
> > FreeBSD src repository
> >
> > Modified files:
> >   lib/libc/sys         mkfifo.2
> > Log:
> > mkfifo(2) returns EACCES when write permission is denied for a component of
> > the path prefix.
> 
> It isn't that broken.  Write permission is only required for the _final_
> component of the path prefix (after pathname resolution).  open.2
> expresses this as follows:

Right, of course write permission is only needed for the parent
directory of the object beeing created.

> %%%
> .It Bq Er EACCES
> .Dv O_CREAT
> is specified,
> the file does not exist,
> and the directory in which it is to be created
> does not permit writing.
> %%%
> 
> For mkfifo, O_CREAT is implicit, and if the file already exists then
> mkfifo() cannot create it, unlike for open(), but as for open() the
> writability of the parent directory is irrelevant -- mkfio() returns
> EEXISTS in this case.
> 
> Old draft POSIX says for mkfifo():
> 
> %%%
> 24874            [EACCES]            A component of the path prefix denies search permission, or write permission
> 24875                                is denied on the parent directory of the FIFO to be created.
> %%%

I like this one, I'll use it where appropriate.

-- 
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd at FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/cvs-src/attachments/20061213/3cd001d8/attachment.pgp


More information about the cvs-src mailing list