Re: silent semantic changes with reiser4

Gunnar Ritter
2004-09-08T06:31:42Z

Christer Weinigel <christer@weinigel.se> wrote:

> Gunnar Ritter <Gunnar.Ritter@pluto.uni-freiburg.de> writes:
>
> > Besides, copying xattrs is usually permitted (POSIX.1-2004, XCU cp):
> >
> > # If the implementation provides additional or alternate access control
> > # mechanisms (see the Base Definitions volume of IEEE Std 1003.1-2001,
> > # Section 4.4, File Access Permissions), their effect on copies of files
> > # is implementation-defined.
>
> In <413DD5B4.nailC801GI4E2@pluto.uni-freiburg.de> you wrote:
>
> >A POSIX.1-conforming cp implementation would not be allowed to copy
> >additional streams, unless either additional options are given or the
> >type of the file being copied is other than S_IFREG.
>
> I read this as that POSIX mandates that cp can absolutely not copy
> anything else but the file contents. That is what I called broken.

It would be really helpful if you read the specification before you
comment on it or try to interpret my wording further.

> If we implement named streams as xattrs and that can be accessed with
> openat(..., O_XATTR) this means that cp is allowed to copy the xattrs

No. Not if the file type of such beasts remains S_IFREG.

> (well, named streans don't neccesarily have to be "alternate access
> control mechanisms", but they can use the same xattr namespace).

POSIX does not know anything about the 'xattr namespace'. It just
allows 'additional or alternate access control mechanisms'. Which
are, in turn, well-defined terms in the standard again. You can
read about them too <http://www.unix.org/version3/>.

Gunnar