[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Loadable module support for proftpd

I'm working on loadable module support for proftpd, and am wondering if
anyone else would be interested in this.. (and to possibly help in further

I have a version that is currently working .. it consisted of a few (simple)
modifications/additions to proftpd (pre7-3)

-addition of a function in src/modules.c to add a module after the static
modules were loaded (add_module)
-addition of a module which adds a configuration command, "LoadModule",
which takes as parameters the name of the module structure, and a path to
the shared object (just like apache's LoadModule command).  It also loads
the module, and passes the module structure to the function added to
-addition of the '-rdynamic' linker flag to Make.rules

Currently, the implementation is somewhat limited.. (ie, uses dlopen, and
doesn't support other methods of dynamic loading, and at the moment doesn't
check to see if a module is being loaded more than once .. if this happens,
right now, proftpd will hang using 99% cpu)... I would also like to make
further modifications to proftpd to allow for the 'site' module to be
dynamically loaded, and move most of the static modules to be loadable (I
believe most will do this directly).. that way the order in which they load
can be better controlled.

Compiling a module is simple .. simply compile with -shared, and includes
pointing to the proftpd/include directory (if this gets picked up, I could
see a proftp-dev package ;)

So ... am I alone in the need/want of loadable module support in proftpd?

If anyone would like to test what I've done so far, and perhaps help let me
know.. (I've so far minimally tested configuration and command handlers with
it, successfully... It does have support for auth handlers too)


Reply to: