diff options
-rw-r--r-- | source3/include/proto.h | 1 | ||||
-rw-r--r-- | source3/param/loadparm.c | 14 |
2 files changed, 15 insertions, 0 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h index ec0571c409..5fe3be2fdb 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -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, diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 32aaed4fdb..2f2d69b185 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -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, |