From owner-freebsd-bugs Sun Oct 6 15:30: 6 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1E86E37B401 for ; Sun, 6 Oct 2002 15:30:05 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id AF48D43E3B for ; Sun, 6 Oct 2002 15:30:04 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id g96MU4Co088660 for ; Sun, 6 Oct 2002 15:30:04 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id g96MU4XW088659; Sun, 6 Oct 2002 15:30:04 -0700 (PDT) Date: Sun, 6 Oct 2002 15:30:04 -0700 (PDT) Message-Id: <200210062230.g96MU4XW088659@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Serge van den Boom Subject: Re: kern/39329 '..' at mountpoint is subject to the permissions of the shadowed dir Reply-To: Serge van den Boom Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR kern/39329; it has been noted by GNATS. From: Serge van den Boom To: Lyndon Nerenberg Cc: freebsd-gnats-submit@freebsd.org Subject: Re: kern/39329 '..' at mountpoint is subject to the permissions of the shadowed dir Date: Mon, 7 Oct 2002 00:24:00 +0200 (CEST) On Sun, 6 Oct 2002, Lyndon Nerenberg wrote: > While this behaviour is non-intuitive, it has existed in UNIX going back > to at least 1984. I've seen it in BSD and SVR[0123] systems, and I > suspect the kernel has behaved this way since the beginning. Because of > this legacy I don't think this can be called a bug, and therefore this > PR should be closed. > > It might be worth adding a note to mount(2), though. If things would never be changed because "they always behaved this way", nothing would ever change. A historical bug is still a bug. That being said, whether this is or is not a bug is still a matter of what is defined as the "correct behavior". Unless there has somewhere in the past been made some concious decision in either direction, I would think there is still room for discussion. My arguments in favour of considering this as incorrect behaviour: - It is inconsistent. You access everything else in the dir by the permissions of the mounted dir, while '..' is accessed by the permissions of the mountpoint. - It is counter-intuitive. Together with the previous point, this is probably the reason I thought it was a bug in the first place. - It's very unlikely changing this behaviour will break anything. After all, only '..' is effected, and generally accessing '..' would only be possible in more cases now. This isn't a security risk either, as you can in the currect situation always address the dir as an absolute path in the cases you could read '..' after the change. - If you want to change the permissions of '..' as it is now, you would need to unmount and remount the device. I don't think the issue is very important as the "feature" is easilly worked around once you know it's there. But I consider it wrong nonetheless. I'll gladly hear what you decide. Greetings, Serge To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message