Re: UNIX Compatibility

Ted Ts'o
2011-05-26T13:35:38Z

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