Re: varlinks! (and 2.1.98 works for me)

Neal Becker (neal@ctd.comsat.com)
28 Apr 1998 14:31:17 -0400


>>>>> "H" == H Peter Anvin <hpa@transmeta.com> writes:

H> Followup to: <199804261426.QAA01875@cave.BitWizard.nl>
H> By author: R.E.Wolff@BitWizard.nl (Rogier Wolff)
H> In newsgroup: linux.dev.kernel
>>
>> 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}'.
>>

First, let me point out that this same subject has been discussed here
before. Second, let me say that I have used Apollo, which had this
feature, and I think it's a great idea. It was previously objected
that this feature was insecure, but I've never understood this
objection. Perhaps someone would be kind enough to provide an example.

H> That, unfortunately, is really unacceptable.

Unacceptable to whom? Why? Will we break all of the symlinks to
files that are named ${xxx}??? Not unless such an env variable
exists. Anyway, how many files do you have named like that?

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