Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Jun 2001 22:37:00 +0300
From:      Peter Pentchev <roam@orbitel.bg>
To:        John Baldwin <jhb@FreeBSD.org>
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>
In-Reply-To: <XFMail.010615122501.jhb@FreeBSD.org>; from jhb@FreeBSD.org on Fri, Jun 15, 2001 at 12:25:01PM -0700
References:  <20010615150639.D94445@ringworld.oblivion.bg> <XFMail.010615122501.jhb@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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-audit" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010615223700.R94445>