Subject: re: mkdir with trailing / (patch proposed)
To: matthew green <mrg@eterna.com.au>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 04/30/2002 15:10:56
On Wed, 1 May 2002, matthew green wrote:

>    > On Mon 29 Apr 2002 at 15:06:07 -0400, Greg A. Woods wrote:
>    > > Besides this "bug" exists very deep in the core of the NetBSD kernel --
>    > > it just manifests itself most obviously and most frequently with
>    > > mkdir(2).  See for example the need to avoid it as implemented in
>    > > /usr/src/bin/rmdir/rmdir.c too.  Obviously with rmdir(2) there can be no
>    > > mistake that the caller expects the pathname to refer to an existing
>    > > directory.
>
>    I have no idea why the code in rmdir.c is there; it is not needed with our
>    current implementation. Unfortunatly the CVS server is down, so I can't
>    tell how long that code's been there.
>
> sure you can; there are dozens of CVS mirrors.  just call cvs
> with an explicit server:

Thanks!

Turns out the code in rmdir.c predates the kernel code we're looking at by
a couple of years. The rmdir.c changes were added in 94, in time for 1.1.
The forcedir functionality was added to vfs_lookup.c around 97.

Take care,

Bill