Init functions in winbind idmap modules

Christof Schmitt cs at samba.org
Wed Apr 2 23:02:32 MDT 2014


On Wed, Apr 02, 2014 at 12:39:36PM +1300, Andrew Bartlett wrote:
> The waf complexity is there so allow modules to be builtin or as .so
> files.  They should always have a unique name, and be renamed by waf if
> they are being built as .so files.

With the patch i proposed, all modules now have a unique name.

Statically linking the modules requires unique names for the init
functions, but dynamically loading does not necessarily require all
modules to use the same init function name. It would be enough that the
name of the init function can be determined from the module name.

smb_probe_module and smb_load_module already get the subsystem name as
parameter, so the code there could construct the init function name as
subsystem "_" module "_init" and look for that instead of
"samba_init_module".

The main issue is probably smb_load_modules that does not know the name
of the subsystem, and i don't see an easy way to get around that.

Christof


More information about the samba-technical mailing list