What is lp_load_ex() in source3/param/loadparm.c?

Michael Adam obnox at samba.org
Fri Aug 20 03:22:42 MDT 2010

Hi Andrew,

Andrew Bartlett wrote:
> I've been looking over the source3/param code with a view to finishing a
> port of lp_set_cmdline() (by tridge).  In doing that I noticed that
> lp_load_ex() isn't called from outside loadparm.c, and could be made
> static. 
> However, it looks like it was meant to be, or it's a public API that I
> can't find the public definition for.  Before I make any foolish
> mistakes, I wonder if someone might happen to be able to fill me in on
> the history here?

lp_load_ex() is the most flexible lp_load function.
The need for greater flexibility was born with the creation
of clustered samba and registry configuration.
We have wrappers to call it with special parameters:

lp_load() - standard

   wrapper to only load the smb.conf file
   without including registry config (globals):
   This is called in daemon startup before messaging etc is set
   up: if "clustering = yes", we need to connect to the ctdb
   daemon before we can load the registry config...

   the registry shares are not usually loaded at lp_load() time,
   but on demand by the server smbd/services.c .
   But for testparm, e.g. we want to load everything, hence
   this wrapper.

Possibly lp_load_ex was called outside of loadparm.c once,
but now that we have these wrappers, it is not any more.

So I have just pushed a patch to master that makes it static.
Thanks for being that careful!

Cheers - Michael

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 206 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20100820/ec175708/attachment.pgp>

More information about the samba-technical mailing list