From owner-freebsd-hackers Sun Jul 5 18:50:05 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id SAA07986 for freebsd-hackers-outgoing; Sun, 5 Jul 1998 18:50:05 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from mushi.colo.neosoft.com (qmailr@mushi.colo.neosoft.com [206.109.6.82]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id SAA07921 for ; Sun, 5 Jul 1998 18:49:39 -0700 (PDT) (envelope-from peter@taronga.com) Received: (qmail 3015 invoked from network); 6 Jul 1998 01:48:53 -0000 Received: from bonkers.neosoft.com (HELO bonkers.taronga.com) (206.109.2.48) by mushi.colo.neosoft.com with SMTP; 6 Jul 1998 01:48:53 -0000 Received: (from peter@localhost) by bonkers.taronga.com (8.6.11/8.6.9) id UAA21768; Sun, 5 Jul 1998 20:18:14 -0500 Date: Sun, 5 Jul 1998 20:18:14 -0500 From: peter@taronga.com (Peter da Silva) Message-Id: <199807060118.UAA21768@bonkers.taronga.com> To: hackers@FreeBSD.ORG Newsgroups: taronga.freebsd.hackers Subject: Re: A really hoopy idea for variant symlinks. References: <199807051826.NAA10291@bonkers.taronga.com> Organization: none Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In article , Richard Wackerbarth wrote: >As for the mechanism to interogate and set them, this proposal seems OK to me. >However, to have appropriate value, we need to have A SINGLE VALUE (eg: >osversion) >that can be referenced from multiple places. Thus changing a single value would >change a number of links at the same time. I see what you're getting at now. If you want to be able to change one variable and effect a bunch of links at once you need to be able to make subdirectories so you can get *out* of the /proc directory with variance intact. mkdir /proc/curproc/syms/2.2.6 ln -s /usr/arch/2.2.6/bin /proc/curproc/syms/2.2.6/bin ln -s /etc/arch/2.2.6/make.conf /proc/curproc/syms/2.2.6/make.conf ln -s 2.2.6 /proc/curproc/syms/osversion Then you'd use /proc/curproc/syms/osversion/bin ... I was thinking that you'd use multiple symlinks, but then it's more work to change, less work to set up. ln -s /usr/arch/2.2.6/bin /proc/curproc/syms/bin ln -s /usr/arch/2.2.6/make.conf /proc/curproc/syms/make.conf The other thing you could do is put the os-specific-bits tree outside of /proc, so you don't have to carry all that baggage around: ln -s /usr/arch/FreeBSD-2.2.6 /proc/curproc/syms/osversion Anyway, I do admit it's a little more cumbersome to set up an environment that's keyed off a single variable. But you can do it, and even get some benefit from a central configuration directory (/usr/arch/FreeBSD-2.2.6) where all that stuff is collected. In all of this, of course, you need to make damn sure that security-related software is aware of this mechanism (and any other variant symlink mechanism) and avoids letting people hijack privs by playing sillybuggers with it. -- This is The Reverend Peter da Silva's Boring Sig File - there are no references to Wolves, Kibo, Discordianism, or The Church of the Subgenius in this document To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message