1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-30 20:23:49 +03:00

r13212: r12414@cabra: derrell | 2006-01-28 17:52:17 -0500

lp_load() could not be called multiple times to modify parameter settings based
 on reading from multiple configuration settings.  Each time, it initialized all
 of the settings back to their defaults before reading the specified
 configuration file.

 This patch adds a parameter to lp_load() specifying whether the settings should
 be initialized.  It does, however, still force the settings to be initialized
 the first time, even if the request was to not initialize them.  (Not doing so
 could wreak havoc due to uninitialized values.)
This commit is contained in:
Derrell Lipman
2006-01-28 22:53:04 +00:00
committed by Gerald (Jerry) Carter
parent 0e24c701ce
commit f2a24de769
41 changed files with 56 additions and 47 deletions

View File

@@ -3449,7 +3449,7 @@ static int do_message_op(void)
if ( override_logfile )
setup_logging( lp_logfile(), False );
if (!lp_load(dyn_CONFIGFILE,True,False,False)) {
if (!lp_load(dyn_CONFIGFILE,True,False,False,True)) {
fprintf(stderr, "%s: Can't load %s - run testparm to debug it\n",
argv[0], dyn_CONFIGFILE);
}

View File

@@ -3654,7 +3654,7 @@ static int do_message_op(void)
if ( override_logfile )
setup_logging( lp_logfile(), False );
if (!lp_load(dyn_CONFIGFILE,True,False,False)) {
if (!lp_load(dyn_CONFIGFILE,True,False,False,True)) {
fprintf(stderr, "%s: Can't load %s - run testparm to debug it\n",
argv[0], dyn_CONFIGFILE);
}

View File

@@ -910,7 +910,7 @@ static void parse_mount_smb(int argc, char **argv)
pstrcpy(username,getenv("LOGNAME"));
}
if (!lp_load(dyn_CONFIGFILE,True,False,False)) {
if (!lp_load(dyn_CONFIGFILE,True,False,False,True)) {
fprintf(stderr, "Can't load %s - run testparm to debug it\n",
dyn_CONFIGFILE);
}

View File

@@ -214,7 +214,7 @@ static int smb_print(struct cli_state *, char *, FILE *);
in_client = True; /* Make sure that we tell lp_load we are */
if (!lp_load(dyn_CONFIGFILE, True, False, False))
if (!lp_load(dyn_CONFIGFILE, True, False, False, True))
{
fprintf(stderr, "ERROR: Can't load %s - run testparm to debug it\n", dyn_CONFIGFILE);
return (1);