From 37f548d788c69fa45311dd294edcc06a38599712 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Fri, 22 Jul 2011 17:23:31 +0200 Subject: s3:loadparm: add lp_load_client() that also sets the client state internally --- source3/include/proto.h | 1 + source3/param/loadparm.c | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/source3/include/proto.h b/source3/include/proto.h index 5fe3be2fdb..6e9364c710 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -1619,6 +1619,7 @@ bool lp_load(const char *pszFname, bool initialize_globals); 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_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 2f2d69b185..2b640fea06 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -9132,6 +9132,16 @@ bool lp_load_global(const char *file_name) false); /* load_all_shares*/ } +/** + * lp_load wrapper, especially for clients + */ +bool lp_load_client(const char *file_name) +{ + lp_set_in_client(true); + + return lp_load_global_only(file_name); +} + bool lp_load_with_registry_shares(const char *pszFname, bool global_only, bool save_defaults, -- cgit