Re: Conditional SymLinks

Pavel Machek (pavel@Elf.mj.gts.cz)
Fri, 12 Dec 1997 14:20:59 +0100


> On Dec 11, Jim Bray wrote:
>
> > > There is I beleive some unix out there where one could imbed environment
> > > variables in symlinks, like:
> > >
> > > /tmp -> ${HOME}/tmp
> >
> > Yeah, I had this idea maybe ten years ago. A friend told me someone
> > (IRIX ?) has already done it. The idea of active objects in the filesystem
> > is interesting, and could make porting code from other systems easier. Of
> > course it could make debugging nearly impossible.
>
> I've seen this _many_ years ago in a BSD 4.2 (4.3?) implementation
> from Sony (NewsOS 3.x and 4.x) on their MIPS R3000 workstations.
> it was a nice feature and I really would like to see this in Linux too
> (but don't ask me how this should be done;)

Is it possible to see processes environment from kernel? If yes, it
should be easy...

Look at CONFIG_TRANS_NAMES. (It is something rather similar.)

Also: Be careful. This could introduce *NASTY* security
holes. Imagine:

HOME=/etc telnet localhost

Then in.telnetd has good chance of using /etc/tmp as its temporary
directory. BAD.

Pavel

-- 
I'm really pavel@atrey.karlin.mff.cuni.cz. 	   Pavel
Look at http://atrey.karlin.mff.cuni.cz/~pavel/ ;-).