1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-22 22:04:08 +03:00

s3:param: remove arg save_defaults from lp_load_with_registry_shares()

This is only used in command line contexts, especially for testparm
which relies on safe defaults. The only changed use is in sharesec,
but it does not harm to also safe the defaults there.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
This commit is contained in:
Michael Adam 2015-04-21 15:24:42 +02:00 committed by Ira Cooper
parent 0e0d77519c
commit 40c9cc150a
5 changed files with 6 additions and 10 deletions

View File

@ -1063,8 +1063,7 @@ bool lp_load_client(const char *file_name);
bool lp_load_global_no_reinit(const char *file_name);
bool lp_load_no_reinit(const char *file_name);
bool lp_load_client_no_reinit(const char *file_name);
bool lp_load_with_registry_shares(const char *pszFname,
bool save_defaults);
bool lp_load_with_registry_shares(const char *pszFname);
int lp_numservices(void);
void lp_dump(FILE *f, bool show_defaults, int maxtoprint);
void lp_dump_one(FILE * f, bool show_defaults, int snum);

View File

@ -3904,12 +3904,11 @@ bool lp_load_client_no_reinit(const char *file_name)
return lp_load_global_no_reinit(file_name);
}
bool lp_load_with_registry_shares(const char *pszFname,
bool save_defaults)
bool lp_load_with_registry_shares(const char *pszFname)
{
return lp_load_ex(pszFname,
false, /* global_only */
save_defaults,
true, /* save_defaults */
false, /* add_ipc */
false, /* reinit_globals */
true, /* allow_include_registry */

View File

@ -61,9 +61,7 @@ int main(int argc, const char **argv)
for (i=0; i < count; i++) {
printf("call lp_load() #%d: ", i+1);
if (!lp_load_with_registry_shares(config_file,
True)) /* save defaults */
{
if (!lp_load_with_registry_shares(config_file)) {
printf("ERROR.\n");
ret = 1;
goto done;

View File

@ -599,7 +599,7 @@ int main(int argc, const char *argv[])
setlinebuf(stdout);
lp_load_with_registry_shares(get_dyn_CONFIGFILE(), False);
lp_load_with_registry_shares(get_dyn_CONFIGFILE());
/* check for initializing secrets.tdb first */

View File

@ -491,7 +491,7 @@ static void do_per_share_checks(int s)
fprintf(stderr,"Load smb config files from %s\n",config_file);
if (!lp_load_with_registry_shares(config_file, True)) {
if (!lp_load_with_registry_shares(config_file)) {
fprintf(stderr,"Error loading services.\n");
ret = 1;
goto done;