Re: varlinks! (and 2.1.98 works for me)

H. Peter Anvin (
26 Apr 1998 15:00:56 GMT

Followup to: <>
By author: (Rogier Wolff)
In newsgroup:
> Varlinks.
> What are varlinks?
> varlinks are symlinks that have a variable part in them. An example
> will make things clear:
> id[wolff@cave ~] id
> uid=500(wolff) gid=500(wolff) groups=100(users),500(wolff)
> [wolff@cave ~] ls -lF link
> lrwxrwxrwx 1 wolff wolff 22 Mar 10 14:12 link -> /home/wolff/tmp/${uid}/
> [wolff@cave ~] cd link
> [wolff@cave ~/link] pwd
> /home/wolff/tmp/500
> [wolff@cave ~/link]
> As you see, the "${uid}" part of the link isn't taken litterally. It
> puts in my numeric uid.
> You can set variables by doing
> echo "HOME=/home/wolff" > /proc/$$/varlinks
> This sets the "HOME" variable, allowing ${HOME} function in a varlink.
> If the variable isn't found, the string is left untouched. This allows
> you to create a default. Just put it under the litteral name
> '${HOME}'.

That, unfortunately, is really unacceptable. You're taking a
well-defined construct in all versions of Unix (symlinks) and altering
the semantics. If you want to do this, create a new filetype for it,
but don't call this a symlink. The symlink you're describing above
should point to a directory named /home/wolff/tmp/${uid} (the last
portion being the byte sequence 24-7B-75-69-64-7D). Anything else
would mean redefining an existing, well-established concept, which
probably would be detrimental to security, as programs would think
they were doing something else than they really were.

N.B.: For /home this is probably done better with autofs anyway.


    PGP: 2047/2A960705 BA 03 D3 2C 14 A8 A8 BD  1E DF FE 69 EE 35 BD 74
    See for web page and full PGP public key
        I am Bahá'í -- ask me about it or see
   "To love another person is to see the face of God." -- Les Misérables

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to