[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <38084.1306411679@localhost>
Date: Thu, 26 May 2011 08:07:59 -0400
From: Valdis.Kletnieks@...edu
To: Bernd Petrovitsch <bernd@...rovitsch.priv.at>
Cc: Michael Witten <mfwitten@...il.com>, "Ted Ts'o" <tytso@....edu>,
Mike Galbraith <efault@....de>,
Richard Yao <ryao@...sunysb.edu>, linux-kernel@...r.kernel.org
Subject: Re: UNIX Compatibility
On Thu, 26 May 2011 13:30:39 +0200, Bernd Petrovitsch said:
> Or take the "unlink a directory gives EPERM" example: why is it
> specified with an errno that indicates that the user is not allowed to
> remove it (and not that the sys-call is the wrong one).
Because on some old Unix's, it wasn't the wrong syscall...
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
I've encountered at least one system (admittedly 20+ years ago), where
unlink("./") actually did work. Took me a while to correlate the weird fsck's
at reboots to the program that tried to remove './$A' when $A was unset...
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists