diff options
author | Michael Adam <obnox@samba.org> | 2011-07-26 12:42:29 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2011-07-28 11:17:28 +0200 |
commit | 5676fbb3991cf20dc9686ea416ca83590f975683 (patch) | |
tree | 084d13cd8eca451f82e9bee2d30871809d0bd226 /source3 | |
parent | fbf254c19aa01984f02f1b7c95e294ff10178aab (diff) | |
download | samba-5676fbb3991cf20dc9686ea416ca83590f975683.tar.gz samba-5676fbb3991cf20dc9686ea416ca83590f975683.tar.bz2 samba-5676fbb3991cf20dc9686ea416ca83590f975683.zip |
s3:loadparm: add wrapper lp_load_globals_no_reinit()
Diffstat (limited to 'source3')
-rw-r--r-- | source3/include/proto.h | 1 | ||||
-rw-r--r-- | source3/param/loadparm.c | 16 |
2 files changed, 17 insertions, 0 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h index f64c4d15e8..a3e5fb6b4a 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -1619,6 +1619,7 @@ bool lp_load(const char *pszFname, bool lp_load_initial_only(const char *pszFname); bool lp_load_global(const char *file_name); bool lp_load_client(const char *file_name); +bool lp_load_global_no_reinit(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 038032cf48..135f6f5451 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -9142,6 +9142,22 @@ bool lp_load_client(const char *file_name) return lp_load_global(file_name); } +/** + * lp_load wrapper, loading only globals, but intended + * for subsequent calls, not reinitializing the globals + * to default values + */ +bool lp_load_global_no_reinit(const char *file_name) +{ + return lp_load_ex(file_name, + true, /* global_only */ + false, /* save_defaults */ + false, /* add_ipc */ + false, /* 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, |