1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

merge changes from 2.2 branch to prevent smb.conf from changing debug level

of commands when specified on command line.
(This used to be commit 39d6b31e14)
This commit is contained in:
Herb Lewis 2002-01-07 21:32:22 +00:00
parent bff833e76a
commit f1256e847e
8 changed files with 28 additions and 0 deletions

View File

@ -32,6 +32,7 @@ const char prog_name[] = "smbclient";
struct cli_state *cli;
extern BOOL in_client;
extern BOOL AllowDebugChange;
static int port = 0;
pstring cur_dir = "\\";
pstring cd_path = "";
@ -2411,6 +2412,7 @@ static int do_message_op(void)
*new_name_resolve_order = 0;
DEBUGLEVEL = 2;
AllowDebugChange = False;
setup_logging(pname,True);

View File

@ -86,6 +86,7 @@ BOOL append_log = False;
int DEBUGLEVEL_CLASS[DBGC_LAST];
BOOL DEBUGLEVEL_CLASS_ISSET[DBGC_LAST];
int DEBUGLEVEL = DEBUGLEVEL_CLASS;
BOOL AllowDebugChange = True;
/* -------------------------------------------------------------------------- **
@ -222,6 +223,8 @@ BOOL debug_parse_levels(char *params_str)
int debuglevel_class[DBGC_LAST];
BOOL debuglevel_class_isset[DBGC_LAST];
if (AllowDebugChange == False)
return True;
ZERO_ARRAY(params);
ZERO_ARRAY(debuglevel_class);
ZERO_ARRAY(debuglevel_class_isset);

View File

@ -24,6 +24,8 @@
#include "includes.h"
extern BOOL AllowDebugChange;
static BOOL use_bcast = True;
static BOOL got_bcast = False;
static struct in_addr bcast_addr;
@ -195,6 +197,9 @@ int main(int argc,char *argv[])
int commandline_debuglevel = -2;
DEBUGLEVEL = 1;
/* Prevent smb.conf setting from overridding */
AllowDebugChange = False;
*lookup = 0;
setup_logging(argv[0],True);

View File

@ -32,6 +32,7 @@
#include "includes.h"
extern pstring global_myname;
extern BOOL AllowDebugChange;
/*
* Next two lines needed for SunOS and don't
@ -568,6 +569,9 @@ int main (int argc, char **argv)
exit(1);
}
DEBUGLEVEL = 1;
AllowDebugChange = False;
if (!lp_load(dyn_CONFIGFILE,True,False,False)) {
fprintf(stderr, "Can't load %s - run testparm to debug it\n",
dyn_CONFIGFILE);

View File

@ -22,6 +22,8 @@
#include "includes.h"
extern BOOL AllowDebugChange;
static struct {
char *name;
int value;
@ -423,6 +425,9 @@ static BOOL do_command(char *dest, char *msg_name, int iparams, char **params)
extern int optind;
BOOL interactive = False;
AllowDebugChange = False;
DEBUGLEVEL = 0;
setup_logging(argv[0],True);
if (argc < 2) usage(True);

View File

@ -20,6 +20,7 @@
#include "includes.h"
extern pstring global_myname;
extern BOOL AllowDebugChange;
/*
* Next two lines needed for SunOS and don't
@ -566,6 +567,8 @@ static int process_nonroot(int argc, char *argv[])
**********************************************************/
int main(int argc, char **argv)
{
AllowDebugChange = False;
#if defined(HAVE_SET_AUTH_PARAMETERS)
set_auth_parameters(argc, argv);
#endif /* HAVE_SET_AUTH_PARAMETERS */

View File

@ -36,6 +36,8 @@
#include "includes.h"
extern BOOL AllowDebugChange;
struct session_record{
pid_t pid;
uid_t uid;
@ -550,6 +552,7 @@ static int traverse_sessionid(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf, vo
setup_logging(argv[0],True);
AllowDebugChange = False;
DEBUGLEVEL = 0;
dbf = x_stderr;

View File

@ -35,6 +35,8 @@
#include "includes.h"
#include "smb.h"
extern BOOL AllowDebugChange;
/***********************************************
Here we do a set of 'hard coded' checks for bad
configuration settings.
@ -216,6 +218,7 @@ int main(int argc, char *argv[])
dbf = x_stdout;
DEBUGLEVEL = 2;
AllowDebugChange = False;
printf("Load smb config files from %s\n",configfile);