lkml.org 
[lkml]   [2011]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: UNIX Compatibility
From
Date
On Don, 2011-05-26 at 08:07 -0400, Valdis.Kletnieks@vt.edu wrote: 
> 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...

Oh well, I'm probably too young for that ....

> 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?

What did I miss?

Bernd
--
Bernd Petrovitsch Email : bernd@petrovitsch.priv.at
LUGA : http://www.luga.at



\
 
 \ /
  Last update: 2011-05-26 14:27    [W:0.058 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site