Subject: Re: kern/1781: 'magic' symbolic link expansion
To: None <netbsd-bugs@NetBSD.ORG>
From: Christos Zoulas <christos@deshaw.com>
List: netbsd-bugs
Date: 11/25/1995 00:31:09
In article <21363.817250790@BALVENIE.PDL.CS.CMU.EDU> Chris_G_Demetriou@BALVENIE.PDL.CS.CMU.EDU (Chris G Demetriou) writes:
>> This is what I dislike about magic symlinks - they *look* like a normal
>> link, but aren't.  Code that, for any reason, tries to follow symlinks
>> will fail miserably for no good reason.
>
>they only aren't if the file system is told that they shouldn't be.
>
>by "follow symlinks" do you mean "take them apart, parse them, and use
>the components"?  it's not clear to me that portable code can safely
>do that, anyway...

Yes, depends on the definition of portable. /bin/csh will definitely
break. [The bourne shell broke too]. I bet that bash, zsh and any other
shell that tries to present a logical view of the filesystem by peeking
inside the symbolic links will break.

Basically, unless readlink is changed to expand the @ escapes, lots of
code will break. If your changes already do this, ignore this message.

I suspect the AFS code readlink(), expands the @ escapes and I am sure
that Domain/OS expanded the $(VARIABLES) inside the symbolic links.

christos