Re: unlink system call on directories - Bug + fix

Kenneth Albanowski (
Tue, 19 Nov 1996 14:29:25 -0500 (EST)

On Mon, 18 Nov 1996, Andrew M. Bishop wrote:

> The same filesystem, exported from SunOS 4.1.1, mounted on SunOS 4.1.4
> does not allow directories to be unlinked. So I conclude that the
> server is not wrong. The Linux kernel should know that the file is a
> directory and not even try to unlink it since it knows it is not
> allowed.

The server is still wrong. There is no reason user-level code couldn't be
written that performs the same "unlink-directory" operation. Yes, it may
be in our best interests to stop the client from doing this, but that
doesn't mean the server isn't broken.

Kenneth Albanowski (, CIS: 70705,126)