mirror of
https://github.com/samba-team/samba.git
synced 2025-08-04 08:22:08 +03:00
source code fix for bug 1095 -- honor the '-l' option
This commit is contained in:
@ -2853,6 +2853,7 @@ static int do_message_op(void)
|
|||||||
int main(int argc,char *argv[])
|
int main(int argc,char *argv[])
|
||||||
{
|
{
|
||||||
extern BOOL AllowDebugChange;
|
extern BOOL AllowDebugChange;
|
||||||
|
extern BOOL override_logfile;
|
||||||
pstring base_directory;
|
pstring base_directory;
|
||||||
int opt;
|
int opt;
|
||||||
pstring query_host;
|
pstring query_host;
|
||||||
@ -2989,12 +2990,15 @@ static int do_message_op(void)
|
|||||||
|
|
||||||
/* save the workgroup...
|
/* save the workgroup...
|
||||||
|
|
||||||
FIXME!! do we need to do tyhis for other options as well
|
FIXME!! do we need to do this for other options as well
|
||||||
(or maybe a generic way to keep lp_load() from overwriting
|
(or maybe a generic way to keep lp_load() from overwriting
|
||||||
everything)? */
|
everything)? */
|
||||||
|
|
||||||
fstrcpy( new_workgroup, lp_workgroup() );
|
fstrcpy( new_workgroup, lp_workgroup() );
|
||||||
|
|
||||||
|
if ( override_logfile )
|
||||||
|
setup_logging( lp_logfile(), False );
|
||||||
|
|
||||||
if (!lp_load(dyn_CONFIGFILE,True,False,False)) {
|
if (!lp_load(dyn_CONFIGFILE,True,False,False)) {
|
||||||
fprintf(stderr, "%s: Can't load %s - run testparm to debug it\n",
|
fprintf(stderr, "%s: Can't load %s - run testparm to debug it\n",
|
||||||
argv[0], dyn_CONFIGFILE);
|
argv[0], dyn_CONFIGFILE);
|
||||||
|
@ -84,6 +84,13 @@ BOOL debug_warn_unknown_class = True;
|
|||||||
BOOL debug_auto_add_unknown_class = True;
|
BOOL debug_auto_add_unknown_class = True;
|
||||||
BOOL AllowDebugChange = True;
|
BOOL AllowDebugChange = True;
|
||||||
|
|
||||||
|
/*
|
||||||
|
used to check if the user specified a
|
||||||
|
logfile on the command line
|
||||||
|
*/
|
||||||
|
BOOL override_logfile;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This is to allow assignment to DEBUGLEVEL before the debug
|
* This is to allow assignment to DEBUGLEVEL before the debug
|
||||||
* system has been initialised.
|
* system has been initialised.
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
|
|
||||||
extern pstring user_socket_options;
|
extern pstring user_socket_options;
|
||||||
extern BOOL AllowDebugChange;
|
extern BOOL AllowDebugChange;
|
||||||
|
extern BOOL override_logfile;
|
||||||
|
|
||||||
struct user_auth_info cmdline_auth_info;
|
struct user_auth_info cmdline_auth_info;
|
||||||
|
|
||||||
@ -95,6 +96,7 @@ static void popt_common_callback(poptContext con,
|
|||||||
if (arg) {
|
if (arg) {
|
||||||
pstr_sprintf(logfile, "%s/log.%s", arg, pname);
|
pstr_sprintf(logfile, "%s/log.%s", arg, pname);
|
||||||
lp_set_logfile(logfile);
|
lp_set_logfile(logfile);
|
||||||
|
override_logfile = True;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user