[PATCHES] Set internal log level for smbstatus, smbcontrol and rpcclient

Christof Schmitt cs at samba.org
Wed Jul 8 22:59:33 UTC 2015


Other utils set the internal log level the same. This is useful when the
global log level in the config is set higher.

Christof
-------------- next part --------------
From 36d779feb2865fc5661cbb761b8137101901df84 Mon Sep 17 00:00:00 2001
From: Christof Schmitt <cs at samba.org>
Date: Wed, 8 Jul 2015 15:14:54 -0700
Subject: [PATCH 1/3] rpcclient: Set internal log level to 0

Signed-off-by: Christof Schmitt <cs at samba.org>
---
 source3/rpcclient/rpcclient.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c
index 4908518..b4108d9 100644
--- a/source3/rpcclient/rpcclient.c
+++ b/source3/rpcclient/rpcclient.c
@@ -928,6 +928,7 @@ out_free:
 	/* the following functions are part of the Samba debugging
 	   facilities.  See lib/debug.c */
 	setup_logging("rpcclient", DEBUG_STDOUT);
+	lp_set_cmdline("log level", "0");
 
 	rpcclient_auth_info = user_auth_info_init(frame);
 	if (rpcclient_auth_info == NULL) {
-- 
1.7.1


From 780a8a43631c6a52384fa4c9ad7df124a234bd31 Mon Sep 17 00:00:00 2001
From: Christof Schmitt <cs at samba.org>
Date: Wed, 8 Jul 2015 15:15:38 -0700
Subject: [PATCH 2/3] smbstatus: Set internal log level to 0

Signed-off-by: Christof Schmitt <cs at samba.org>
---
 source3/utils/status.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/source3/utils/status.c b/source3/utils/status.c
index c11b4ee..a22d05b 100644
--- a/source3/utils/status.c
+++ b/source3/utils/status.c
@@ -374,6 +374,7 @@ int main(int argc, const char *argv[])
 	smb_init_locale();
 
 	setup_logging(argv[0], DEBUG_STDERR);
+	lp_set_cmdline("log level", "0");
 
 	if (getuid() != geteuid()) {
 		d_printf("smbstatus should not be run setuid\n");
-- 
1.7.1


From e2d882ed2183930cac006b400e0d0ef62b533d5c Mon Sep 17 00:00:00 2001
From: Christof Schmitt <cs at samba.org>
Date: Wed, 8 Jul 2015 15:16:33 -0700
Subject: [PATCH 3/3] smbcontrol: Set internal log level to 0

Signed-off-by: Christof Schmitt <cs at samba.org>
---
 source3/utils/smbcontrol.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/source3/utils/smbcontrol.c b/source3/utils/smbcontrol.c
index 8ea4309..d1eb7dd 100644
--- a/source3/utils/smbcontrol.c
+++ b/source3/utils/smbcontrol.c
@@ -1553,6 +1553,7 @@ int main(int argc, const char **argv)
 	smb_init_locale();
 
 	setup_logging(argv[0], DEBUG_STDOUT);
+	lp_set_cmdline("log level", "0");
 
 	/* Parse command line arguments using popt */
 
-- 
1.7.1



More information about the samba-technical mailing list