Re: UNIX Compatibility

From: Ted Ts'o
Date: Thu May 26 2011 - 09:35:42 EST


On Thu, May 26, 2011 at 02:24:59PM +0200, Bernd Petrovitsch wrote:
> > RATIONALE
> >
> > Unlinking a directory is restricted to the superuser in many historical
> > implementations for reasons given in link() (see also rename()).
> >
> > http://pubs.opengroup.org/onlinepubs/009695399/functions/unlink.html
>
> So someone changes the semantics of the unlink() sys-call (obviously in
> some compatible, standards-compliant way) as it no longer unlinks
> directories but it is not possible to define the returned errno for
> the new error case to something sane?

Yes, it was those horrible hackers at BSD that implemented mkdir() and
rmdir() as atomic operations that could be executed by any process,
instead of only allowing root to create subdirectories.

It was the righteous AT&T marketing managers that created the first
standard, the AT&T SVID, which enshrined the Unix V7 error return, and
forbade it from ever being changed lest you "not be compatible with
Unix". And thus was a design decision made over 40 years became cast
in concrete, never to change, until the Linux hackers said, "to hell
with the standard".

- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/