Subject: Re: Linux emulation and mkdir with trailing /
To: NetBSD Kernel Technical Discussion List <tech-kern@netbsd.org>
From: Matthew Orgass <darkstar@pgh.net>
List: tech-kern
Date: 09/25/2000 13:55:12
On Mon, 25 Sep 2000, Greg A. Woods wrote:

> You guys are apparently forgetting:  directories *ARE* files in Unix!

  True, but directories are still special, and at least SUSv2 and probably
POSIX allows trailing slashes only when refering to a directory.

  I think this should be fixed in lookup, setting the default to allow
trailing slashes on existing directories and adding two new flags
TRAILINGSLAHESOK to DTRT in mkdir and rename on NetBSD and for emulation
of OSes that allow them unconditionally, and NOTRAILINGSLASHES to allow
correct emulation of OSes that never allow them. 

  I also think that rename, chown, fchown, and lchown should be changed to
the POSIX/XPG behavior at all times (as OpenBSD has done for a while). 
While POSIX rename behavior is braindead, it is the standard and portable
programs should expect it. 

Matthew Orgass
darkstar@pgh.net