Just changed the man page to say
unlink(2)
...
EPERM The system does not allow unlinking of directories,
or unlinking of directories requires privileges
that the current process doesn't have. (This is
the POSIX prescribed error return.)
EISDIR pathname refers to a directory. (This is the non-
POSIX value returned by Linux since 2.1.132.)
...
Probably this should be fixed again, both in 2.2 and 2.4.
2.0 is still correct (I checked only ext2).
Andries
[The EISDIR is correct for rename(), and the cleanup that
made a nice uniform may_delete() in namei.c introduced this bug.
The very simple but slightly ugly fix is to write (in vfs_unlink)
error = may_delete(dir, dentry, 0);
if (error == -EISDIR)
error = -EPERM;
]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/