Init functions in winbind idmap modules

Jeremy Allison jra at samba.org
Tue Apr 1 18:10:33 MDT 2014


On Tue, Apr 01, 2014 at 04:05:48PM -0700, Christof Schmitt wrote:
> On Tue, Apr 01, 2014 at 01:25:49PM -0700, Jeremy Allison wrote:
> > On Tue, Apr 01, 2014 at 11:39:39AM -0700, Christof Schmitt wrote:
> > > The init functions in the winbind idmap modules are not very consistent,
> > > some are called samba_init_module, others use different names:
> > > 
> > > source3/winbindd/idmap_ad.c:NTSTATUS samba_init_module(void)
> > > source3/winbindd/idmap_autorid.c:NTSTATUS samba_init_module(void)
> > > source3/winbindd/idmap_ldap.c:NTSTATUS idmap_ldap_init(void)
> > > source3/winbindd/idmap_nss.c:NTSTATUS idmap_nss_init(void)
> > > source3/winbindd/idmap_passdb.c:NTSTATUS idmap_passdb_init(void)
> > > source3/winbindd/idmap_rfc2307.c:NTSTATUS idmap_rfc2307_init(void)
> > > source3/winbindd/idmap_rid.c:NTSTATUS samba_init_module(void)
> > > 
> > > I also saw that there is some code in waf to create a define to
> > > samba_init_module, but i find that somewhat confusing.
> > > 
> > > Should all modules use a similar init function name for consistency?
> > 
> > That would probably help. Send in a patch and I'll
> > review !
> 
> Maybe this patch would be a start. It renames all init functions named
> samba_init_module to a name based on the module. The complexity with the
> define in waf is still there, but at least all modules are treated the
> same.

LGTM, 'Reviewed-by: Jeremy Allison <jra at samba.org>'

Feel free to push, or I'll do it tomorrow once my
existing autobuild goes through.

Cheers,

Jeremy.


More information about the samba-technical mailing list