Subject: Re: kern/22038: Fix to linux emulation to handle trailing slashes
To: Martin Husemann <martin@duskware.de>
From: None <netbsd99@sudog.com>
List: current-users
Date: 09/11/2003 09:05:10
On Thursday 11 September 2003 00:41, Martin Husemann wrote:
> On Thu, Sep 11, 2003 at 07:01:02AM -0000, netbsd99@sudog.com wrote:
> > Okay! I have another, less hack-ish patch here to deal with the
> > trailing slashes in linux mkdir emulation.
>
> It is still not acceptable, IMHO, to fix this in the emulation layer
> while supposedly the native syscall should behave the same.
>
> If we reach consent that native mkdir(2) should not accept trailing
> slashes we'd have to (a) remove regress/sys/fs/mkdir, (b) document it
> (at least in PRs 8155 and 15397) and then (c) could think about
> applying this patch.
>
> I'd suggest starting with the patch in PR 15397, updating it to
> -current, giving it good testing and commiting it.
Hello All,
There seems to be some significant disagreement as to what the trailing
slashes actually mean, and where a fix should actually go. The patch in
this pr fixes something serious without breaking or changing anything
in base.
Behaviour in the base system is entrenched and people have been arguing
about it since at least Janary 2002: Why not commit something to get
Linux software working when the compat code already transforms
pathnames and interprets an initial "/../" as an escape sequence?
Linux emulation is broken for much of the existing binary-only software
out there. Without asserting one way or the other that the base system
must change its policy (and thus stepping on everyone's toes,) this
measure seems to work and can be easily backed out if an actual
decision is made to alter base system.
Compat is for compatibility with foreign binaries. Where else would a
fix to get Linux-style mkdir working be more appropriate than in the
compat layer?
Let's not be paralyzed for years debating while things are and have been
broken for so long.
If this fix is wrong in some fashion, tell me how to make it perfect and
I'll do whatever it takes, but Neverwinter, Overnet.. heck every
interesting command-line software I try to use all fiddle with
directories using trailing slashes. Let's save our general userbase the
hassle, I say.
</podium>