1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

s3:loadparm: add a convenience wrapper lp_load_global()

This is the use case for most callers, especially the client tools.
This commit is contained in:
Michael Adam 2011-07-22 17:16:02 +02:00
parent 13329112e9
commit 1379ef8b7b
2 changed files with 15 additions and 0 deletions

View File

@ -1618,6 +1618,7 @@ bool lp_load(const char *pszFname,
bool add_ipc,
bool initialize_globals);
bool lp_load_initial_only(const char *pszFname);
bool lp_load_global(const char *file_name);
bool lp_load_with_registry_shares(const char *pszFname,
bool global_only,
bool save_defaults,

View File

@ -9118,6 +9118,20 @@ bool lp_load_initial_only(const char *pszFname)
false); /* load_all_shares*/
}
/**
* most common lp_load wrapper, loading only the globals
*/
bool lp_load_global(const char *file_name)
{
return lp_load_ex(file_name,
true, /* global_only */
false, /* save_defaults */
false, /* add_ipc */
true, /* initialize_globals */
true, /* allow_include_registry */
false); /* load_all_shares*/
}
bool lp_load_with_registry_shares(const char *pszFname,
bool global_only,
bool save_defaults,