From owner-freebsd-arch Fri Jun 15 12:38:40 2001 Delivered-To: freebsd-arch@freebsd.org Received: from ringworld.nanolink.com (ringworld.nanolink.com [195.24.48.13]) by hub.freebsd.org (Postfix) with SMTP id 633A637B408 for ; Fri, 15 Jun 2001 12:38:24 -0700 (PDT) (envelope-from roam@ringworld.nanolink.com) Received: (qmail 43876 invoked by uid 1000); 15 Jun 2001 19:37:00 -0000 Date: Fri, 15 Jun 2001 22:37:00 +0300 From: Peter Pentchev To: John Baldwin Cc: arch@FreeBSD.org, audit@FreeBSD.org Subject: Re: new kldpath(8): display/modify the module search path Message-ID: <20010615223700.R94445@ringworld.oblivion.bg> Mail-Followup-To: John Baldwin , arch@FreeBSD.org, audit@FreeBSD.org References: <20010615150639.D94445@ringworld.oblivion.bg> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from jhb@FreeBSD.org on Fri, Jun 15, 2001 at 12:25:01PM -0700 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, Jun 15, 2001 at 12:25:01PM -0700, John Baldwin wrote: > > On 15-Jun-01 Peter Pentchev wrote: > > Hi, > > > > Attached is a shar of a new kld-family utility, which parses and modifies > > the kern.module_path sysctl in a script-friendly way. It might be useful > > in startup/shutdown scripts for programs using more than one module, > > or just to allow startup scripts to specify additional module directories > > (e.g. /usr/local/libexec/modules, or /usr/local/lib/au88x0). > > [ snip ] > > To me, it seems more sensible to use the same interface that ldconfig uses. > I.e., kldpath /foo sets the entire path to /foo, and kldpath -m adds to the > path, kldpath -r displays the current path, etc. That is just my opinion, > however. I'll admit that ldconfig's interface is not always the most > intuitive, but I think consistency between the two would be good. Good point. This also meshes nicely with David O'Brien's suggestion of something like ldconfig's -i mode (or rather, his suggestion that kldpath's default mode should be secure, just like ldconfig). And BTW, before I rewrite the directory existence/mode checks, how should this deal with non-existent directories? Is there even a reason to assume that a non-existent directory will be created sometime later, or should this only allow adding existing dirs, and use -i to allow non-root-owned or world-writable dirs? Or should there be a way to add a non-existent dir after all, but only allowed by both -i and some other (-I? -f?) flag? > Also, I would leave -q on by default, and instead use a -v to turn on > verbose mode. I was thinking about this myself, but decided to leave verbose output in, at least for the debugging versions :) But it makes sense to turn it off, indeed. Thanks for the suggestins, I'll post a new version tomorrow or later tonight. (I *think* that 10:30pm is about time for me to leave work, if only to go home and dial in again :) G'luck, Peter -- No language can express every thought unambiguously, least of all this one. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message