Init functions in winbind idmap modules

Volker Lendecke Volker.Lendecke at SerNet.DE
Tue Apr 8 02:42:23 MDT 2014


On Wed, Apr 02, 2014 at 10:02:32PM -0700, Christof Schmitt wrote:
> 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.

That's "only" for "preload modules"? I'd be willing to ditch
that or call it twice with pdb and vfs modules.

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de


More information about the samba-technical mailing list