You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modules-dev@httpd.apache.org by "Bartov, Asaf" <As...@bmc.com> on 2006/11/29 15:27:23 UTC

Dynamic registration of a module in Apache 2.X?

Hello.

Is it possible to dynamically register a new module (given some
mod_moose.so) in a *running* httpd process, to get it to work *without*
writing to the config file or restarting the httpd process?
Essentially, to inject a module into a running httpd process, given
appropriate, even root, permissions.

As far as I can tell, this is not possible.  I'm asking after
implementing this on Microsoft's IIS, where one can change the so-called
"metabase" and have the changes take effect immediately.

I'd appreciate it if someone more knowledgeable can confirm that this is
impossible, so I can get the Marketoids off my back... ;)

Thanks in advance,

	Asaf.

Re: Dynamic registration of a module in Apache 2.X?

Posted by Nick Kew <ni...@webthing.com>.
On Wed, 29 Nov 2006 14:52:30 +0000
"Ivan Ristic" <iv...@gmail.com> wrote:

> > Not off-the-shelf, but there are third-party modules that'll
> > load and unload .so s in a running server.
> 
> Can you name some of them? Thanks.

My (long since obsolete) mod_xml did.

I've seen others mentioned: I think about two on this list.
One was a module to support .so s compiled from [some other
language], whose author chose to load them at runtime.
But I couldn't name them OTTOMH.  

-- 
Nick Kew

Application Development with Apache - the Apache Modules Book
http://www.apachetutor.org/

Re: Dynamic registration of a module in Apache 2.X?

Posted by Ivan Ristic <iv...@gmail.com>.
On 11/29/06, Nick Kew <ni...@webthing.com> wrote:
> On Wed, 29 Nov 2006 16:27:23 +0200
> "Bartov, Asaf" <As...@bmc.com> wrote:
>
> > Hello.
> >
> > Is it possible to dynamically register a new module (given some
> > mod_moose.so) in a *running* httpd process, to get it to work
> > *without* writing to the config file or restarting the httpd process?
> > Essentially, to inject a module into a running httpd process, given
> > appropriate, even root, permissions.
>
> Not off-the-shelf, but there are third-party modules that'll
> load and unload .so s in a running server.

Can you name some of them? Thanks.

-- 
Ivan Ristic

Re: Dynamic registration of a module in Apache 2.X?

Posted by Nick Kew <ni...@webthing.com>.
On Wed, 29 Nov 2006 16:27:23 +0200
"Bartov, Asaf" <As...@bmc.com> wrote:

> Hello.
> 
> Is it possible to dynamically register a new module (given some
> mod_moose.so) in a *running* httpd process, to get it to work
> *without* writing to the config file or restarting the httpd process?
> Essentially, to inject a module into a running httpd process, given
> appropriate, even root, permissions.

Not off-the-shelf, but there are third-party modules that'll
load and unload .so s in a running server.  Of course it's a
big security issue.  And, also for security reasons, you can't
do everything a module can do: the running server has dropped
the system privileges it had at startup.

> As far as I can tell, this is not possible.  I'm asking after
> implementing this on Microsoft's IIS, where one can change the
>so-called
> "metabase" and have the changes take effect immediately.

IIS had Nimda, codered, et al.  Apache, with three times IIS's
market share, didn't.  Apache will let you shoot yourself in the
foot, but unlike IIS (or PHP) it won't hand a loaded gun with no
safety cache to an admin who has no clue about using it.

-- 
Nick Kew

Application Development with Apache - the Apache Modules Book
http://www.apachetutor.org/