diff options
author | Herb Lewis <herb@samba.org> | 2002-01-07 21:32:22 +0000 |
---|---|---|
committer | Herb Lewis <herb@samba.org> | 2002-01-07 21:32:22 +0000 |
commit | f1256e847e6820c29f8bc74db4609d8aa282a1a1 (patch) | |
tree | ef8ffff0a67d9d129e950259df11f803c8a05d48 /source3/utils | |
parent | bff833e76af390557428ba6aabdbc635b2c120e9 (diff) | |
download | samba-f1256e847e6820c29f8bc74db4609d8aa282a1a1.tar.gz samba-f1256e847e6820c29f8bc74db4609d8aa282a1a1.tar.bz2 samba-f1256e847e6820c29f8bc74db4609d8aa282a1a1.zip |
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 39d6b31e14144a3ff4b992d4286b706147e58566)
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/nmblookup.c | 5 | ||||
-rw-r--r-- | source3/utils/pdbedit.c | 4 | ||||
-rw-r--r-- | source3/utils/smbcontrol.c | 5 | ||||
-rw-r--r-- | source3/utils/smbpasswd.c | 3 | ||||
-rw-r--r-- | source3/utils/status.c | 3 | ||||
-rw-r--r-- | source3/utils/testparm.c | 3 |
6 files changed, 23 insertions, 0 deletions
diff --git a/source3/utils/nmblookup.c b/source3/utils/nmblookup.c index 5b22872cb3..db70cb302a 100644 --- a/source3/utils/nmblookup.c +++ b/source3/utils/nmblookup.c @@ -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); diff --git a/source3/utils/pdbedit.c b/source3/utils/pdbedit.c index ab7c9d6f7c..046d4a4ad8 100644 --- a/source3/utils/pdbedit.c +++ b/source3/utils/pdbedit.c @@ -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); diff --git a/source3/utils/smbcontrol.c b/source3/utils/smbcontrol.c index 3562caf532..f03387c6e0 100644 --- a/source3/utils/smbcontrol.c +++ b/source3/utils/smbcontrol.c @@ -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); diff --git a/source3/utils/smbpasswd.c b/source3/utils/smbpasswd.c index ca1fe377d0..6a20e71d96 100644 --- a/source3/utils/smbpasswd.c +++ b/source3/utils/smbpasswd.c @@ -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 */ diff --git a/source3/utils/status.c b/source3/utils/status.c index e17a6589ef..98e601382b 100644 --- a/source3/utils/status.c +++ b/source3/utils/status.c @@ -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; diff --git a/source3/utils/testparm.c b/source3/utils/testparm.c index 97dc0c014a..164eb1b29b 100644 --- a/source3/utils/testparm.c +++ b/source3/utils/testparm.c @@ -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); |