Return to BSD News archive
Newsgroups: comp.os.386bsd.development Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!spool.mu.edu!wupost!bigboy.sbc.com!news.mtholyoke.edu!news.byu.edu!ns.novell.com!gateway.univel.com!fcom.cc.utah.edu!cs.weber.edu!terry From: terry@cs.weber.edu (A Wizard of Earth C) Subject: Re: A challenge to all true kernel hackers - conditional symlinks. Message-ID: <1993Mar17.000717.12690@fcom.cc.utah.edu> Sender: news@fcom.cc.utah.edu Organization: Weber State University (Ogden, UT) References: <C3ow4H.FID@BitBlocks.com> <JKH.93Mar10215639@whisker.lotus.ie> <C3qzvC.2ps@bcstec.ca.boeing.com> Date: Wed, 17 Mar 93 00:07:17 GMT Lines: 63 In article <C3qzvC.2ps@bcstec.ca.boeing.com> dmp3592@bcstec.ca.boeing.com (Dean M. Phillips) writes: >In article <JKH.93Mar10215639@whisker.lotus.ie> jkh@whisker.lotus.ie (Jordan K. Hubbard) writes: >>The only problem with replacing open() is that you still need to deal >>with things like stat() and any other system call that deals with >>filenames (and follows links) directly. Note that I wasn't talking about >>usurping the $, (, and ) characters in filenames altogether, only in >>symbolic links. I don't think that this would be any great hardship. >> >I could create an ambiguity: How do you create a soft link to a real file >named $(LANG) for example? Of course I have to admit that I have never >seen a real file with a name of that form. The $(LANG) is part of the symbolic link *target*, not part of the name of the symbolic link itself. This resolves the "name space pollution" problem everybody is going on about without any hassles with any other type of file within the file system. If necessary, a "variant link creation" syntax (like "ln -v") can be defined. I vote against this, and for pollution of the symbolic link target name space, to ensure cross-fs compatability. Otherwise, it would require additional flagging of the inode type, and really require a modification below the VFS layer to implement. The other fact, that the name space is only polluted for names beginning with "$(" means that collisoin is unlikely anyway, so the pollution is not disenfranchising "$", "(", and ")" as filename characters, but is instead diasallowing "$(" file names only. It's a simple, simple hack that introduces many security issues unless things like access are forces to always follow symbolic links to determin permissions rather than looking at the link inode itself. As for the "orphan issue" of symlinking to a non-existant file, that problem already exists. It is perfectly acceptable to symlink to a non existant file with "invariant" sym links. Try: mkdir tmp cd tmp ln -s foo fee cat foo cat fee cat > fee This is a test. ^D cat foo rm foo fee cd .. rmdir tmp to demonstrate this. Terry Lambert terry@icarus.weber.edu terry_lambert@novell.com --- Any opinions in this posting are my own and not those of my present or previous employers. -- ------------------------------------------------------------------------------- "I have an 8 user poetic license" - me Get the 386bsd FAQ from agate.berkeley.edu:/pub/386BSD/386bsd-0.1/unofficial -------------------------------------------------------------------------------