summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-09-15 13:57:33 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:52:40 -0500
commitfe69a5e28dc24e97a1b601c49449beb3db6e4e6b (patch)
tree9687582e399876975651bf16f5cdede3f4cc1e57
parent7f53bb13da939016ced8555922bb79a3f4cb267e (diff)
downloadsamba-fe69a5e28dc24e97a1b601c49449beb3db6e4e6b.tar.gz
samba-fe69a5e28dc24e97a1b601c49449beb3db6e4e6b.tar.bz2
samba-fe69a5e28dc24e97a1b601c49449beb3db6e4e6b.zip
r2348: fix segmention faults
in smbcquotas and smbcacls caused by setup_logging() (-r 1425) metze (This used to be commit 39f3f76ea2097c10799f0bef8717d3ac71cacaa8)
-rw-r--r--source3/utils/smbcacls.c8
-rw-r--r--source3/utils/smbcquotas.c11
2 files changed, 11 insertions, 8 deletions
diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c
index cb82ad831e..4dc89aecb9 100644
--- a/source3/utils/smbcacls.c
+++ b/source3/utils/smbcacls.c
@@ -761,11 +761,13 @@ static struct cli_state *connect_one(const char *share)
ctx=talloc_init("main");
- setlinebuf(stdout);
-
+ /* set default debug level to 0 regardless of what smb.conf sets */
+ setup_logging( "smbcacls", True );
+ DEBUGLEVEL_CLASS[DBGC_ALL] = 1;
dbf = x_stderr;
+ x_setbuf( x_stderr, NULL );
- setup_logging(argv[0],True);
+ setlinebuf(stdout);
lp_load(dyn_CONFIGFILE,True,False,False);
load_interfaces();
diff --git a/source3/utils/smbcquotas.c b/source3/utils/smbcquotas.c
index 0bd8755420..98d214706a 100644
--- a/source3/utils/smbcquotas.c
+++ b/source3/utils/smbcquotas.c
@@ -419,14 +419,15 @@ FSQFLAGS:QUOTA_ENABLED/DENY_DISK/LOG_SOFTLIMIT/LOG_HARD_LIMIT", "SETSTRING" },
ZERO_STRUCT(qt);
- setlinebuf(stdout);
-
+ /* set default debug level to 1 regardless of what smb.conf sets */
+ setup_logging( "smbcquotas", True );
+ DEBUGLEVEL_CLASS[DBGC_ALL] = 1;
dbf = x_stderr;
+ x_setbuf( x_stderr, NULL );
- fault_setup(NULL);
-
- setup_logging(argv[0],True);
+ setlinebuf(stdout);
+ fault_setup(NULL);
lp_load(dyn_CONFIGFILE,True,False,False);
load_interfaces();