Well I once did try to get this working, and eventually got it working without ouzing 
malloc's in the kernel... That was somewhere around may 1997 and FBSD 2.2.8??
In essence the change in the FILE system is realtively minor, not counting the means 
of getting the replacement info there. All that needed changes  was vfs_lookup.c. The 
netbsd article has a lot more files changed, but they have to do with honouring a 
MAGIC mout option telling the kernel to replace or not.

But then the next step was to get usefull info in the replacement.

The way I was used to this on Domain Apollo stations was that changes in the 
environment would work per process for the magic symlinks. They called then 
variant-links

So then I was stuppid enough to ask what other thought that would be required. So I 
got this whole flamefest that it was a security risk, blah, blah, blah.....
Much like the discussion in link you have from netbsd.

In the end my conclusion was to get in sysctl as far as to create a "namespace" 
varlink osli. This would restrict heavy tricks to root. 
And that is where I got stuck:
    The company I was working in was growing real fast.
    Sysctl wasn't in a too great a state

Now you are complicating things even more by having things react to changes in the 
user process. I knew I did not know enough about FBSD to even start trying that. So I 
cannot help you there.

--WjW

PS: I still have src lying around under a VL directory.

----- Original Message ----- 
From: "Guido van Rooij" <[EMAIL PROTECTED]>
To: "John" <[EMAIL PROTECTED]>
Cc: "Hackers List" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, March 13, 2003 11:55 AM
Subject: Re: magic symbolic links (ideas/patches?)


> IIRC Willem-Jan Withagen has done this years ago.
> 
> I Cc ed him.
> 
> -Guido
> 
> On Wed, Mar 12, 2003 at 07:39:52PM -0500, John wrote:
> > Hi Folks,
> > 
> >    I have a need to implement a highly specific variant usage of
> > what are commonly referred to as magic symlinks, ie:
> > 
> >    /src -> /.src/$ARCH/src
> > 
> >    where $ARCH needs to come from the user environment.
> > 
> >    A related patchset from NetBSD (1995) can be seen here:
> > 
> > http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=1781
> > 
> >    In my specific implementation, the value of $ARCH will ALWAYS
> > be 3 characters (Not having implemented anything yet, and to
> > avoid possibly playing the userland game, I was thinking of
> > adding a field to the proc structure and having the setenv/putenv
> > functions place the value there via a sysctl, thus allowing a
> > very simple interface... short sighted?).
> > 
> >    If anyone has any comments, or patches hanging around for
> > this type of implementation, I would appreciate a pointer to them.
> > 
> > Many, Many Thanks,
> > John
> > 
> > To Unsubscribe: send mail to [EMAIL PROTECTED]
> > with "unsubscribe freebsd-hackers" in the body of the message
> 
> -- 
> Guido van Rooij       |  Phone: ++31 653 994 773
> Madison Gurkha, Technology Think-Tank |
> [EMAIL PROTECTED]       |  FreeBSD committer
> 
> R{.n+zwfj)mfhkyR+a{.n+盱ZrG)w*z

Reply via email to