Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Dec 2006 12:20:41 +0100
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/lib/libc/sys mkfifo.2
Message-ID:  <20061213112040.GA793@garage.freebsd.pl>
In-Reply-To: <20061213213522.I792@besplex.bde.org>
References:  <200612130958.kBD9wnu1024985@repoman.freebsd.org> <20061213213522.I792@besplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--jRHKVT23PllUwdXP
Content-Type: text/plain; charset=iso-8859-2
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Dec 13, 2006 at 10:04:42PM +1100, Bruce Evans wrote:
> On Wed, 13 Dec 2006, Pawel Jakub Dawidek wrote:
>=20
> >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 componen=
t of
> > the path prefix.
>=20
> 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.
> %%%
>=20
> 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.
>=20
> Old draft POSIX says for mkfifo():
>=20
> %%%
> 24874            [EACCES]            A component of the path prefix denie=
s 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.

--=20
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd@FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!

--jRHKVT23PllUwdXP
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (FreeBSD)

iD8DBQFFf+IIForvXbEpPzQRAtjeAKDQfDxanVjAYGyEqCB6mo1dcnKs8QCeLv2D
GQ7upWxx8SqBtkryeHCWRcg=
=og0f
-----END PGP SIGNATURE-----

--jRHKVT23PllUwdXP--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061213112040.GA793>