From owner-freebsd-current Sun Jun 17 6:43:15 2001 Delivered-To: freebsd-current@freebsd.org Received: from nagual.pp.ru (pobrecita.freebsd.ru [194.87.13.42]) by hub.freebsd.org (Postfix) with ESMTP id 339B937B416 for ; Sun, 17 Jun 2001 06:43:07 -0700 (PDT) (envelope-from ache@nagual.pp.ru) Received: (from ache@localhost) by nagual.pp.ru (8.11.4/8.11.4) id f5HDgdw49475; Sun, 17 Jun 2001 17:42:39 +0400 (MSD) (envelope-from ache) Date: Sun, 17 Jun 2001 17:42:37 +0400 From: "Andrey A. Chernov" To: Bruce Evans Cc: Warner Losh , "Steve O'Hara-Smith" , David Wolfskill , current@FreeBSD.ORG Subject: Re: symlink(2) [Was: Re: tcsh.cat] Message-ID: <20010617174235.A49454@nagual.pp.ru> References: <200106170518.f5H5I6V44586@harmony.village.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from bde@zeta.org.au on Sun, Jun 17, 2001 at 11:02:50PM +1000 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, Jun 17, 2001 at 23:02:50 +1000, Bruce Evans wrote: > > So disallowing null symlinks would actually unbreak /etc/malloc.conf. > > Further debugging shows that the main bug is in the kernel. > stat(2) on a null symlink bogusly succeeds and classifies the symlink > as a directory. ln(1) just believes this so it rewrites > "ln -fs aj /etc/malloc.conf" to "ln -fs aj /etc/malloc.conf/aj". > The kernel then resolves /etc/malloc.conf/aj to /aj. And this should be fixed, as I say from the very beginning. (strangely, most people here mistreat null symlinks we discuss as non-null symlinks with non-existen targets) -- Andrey A. Chernov http://ache.pp.ru/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message