Re: varlinks! (and 2.1.98 works for me)

Rogier Wolff (R.E.Wolff@BitWizard.nl)
Sun, 26 Apr 1998 22:55:24 +0200 (MET DST)


L. Adrian Griffis wrote:
>
> All symbolic links had multiple values that they could resolve
> to. The specific value in any given case was index by a per-
> process "Universe" value (perhaps it should have been
> "Unixverse"). Universe might be 0 for the vendor's slant on
> things, 1 for SYS5, and 2 for BSD. If seperate settings were
> not desired, the symlink would only have a value for 0, and it
> would be in effect in all cases.

That is correct. The exact same thing was implemented in Apollo's
Domain OS.

HP took over Apollo, and they have a similar thing for their diskless
clients. There they have a directory with a special bit such that
every hostname has to be a file in that directory and every machine
can have their own file.

The good things about varlinks is that they are more general and can
easily implement both.

ln -s /usr/.${universe}bin /usr/bin
mkdir /usr/.ucbbin
mkdir /usr/.sysvbin

echo universe=sysv > /proc/1/varlinks

echo hostname=`hostname` > /proc/1/varlinks
ln -s /var/.tmp.${hostname} /var/tmp

If you want to do this for e.g. /etc/passwd as HP does for their
diskless clients, then you'd have to restrict write access to the
varlinks file in /proc: you wouldn't want your users to be able to set
hostname to ../tmp/my_new_passwd_file when /etc/passwd is a varlink to
/etc/${hostname} .
(Is it safe if you make the symlink point to "/etc/passwd.${hostname}"?)

Roger.

-- 
If it's there and you can see it, it's REAL      |___R.E.Wolff@BitWizard.nl  |
If it's there and you can't see it, it's TRANSPARENT |  Tel: +31-15-2137555  |
If it's not there and you can see it, it's VIRTUAL   |__FAX:_+31-15-2138217  |
If it's not there and you can't see it, it's GONE! -- Roy Wilks, 1983  |_____|

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu