summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2020-06-30 17:03:05 +0200
committerKarolin Seeger <kseeger@samba.org>2020-07-09 11:40:15 +0000
commit482246b997b8a720b92df32f7261e0fa2d40282d (patch)
tree9612ee0cfb733f21d3268953222c7899bbbdd54b
parentd77eb1c1670ec40a4c4f757ba8cc8e13c3a976bb (diff)
downloadsamba-482246b997b8a720b92df32f7261e0fa2d40282d.tar.gz
lib/debug: set the correct default backend loglevel to MAX_DEBUG_LEVEL
This fixed a regression introduced by commit c83ce5f4f99aef94530411ec82cc03e9935b352d for bug #14345. The backend loglevel globally restricts logging of a particular backend. If this value is smaller then any explicitly configured logging class, logging for this class is skipped. Eg, given the following logging config in smb.conf: log level = 1 auth_json_audit:3@/var/log/samba/samba_auth_audit.log the default class loglevel of 1 (dbgc_config[DBGC_ALL].loglevel) will be assigned to the backend loglevel. So even though the logging class auth_json_audit is configured at level 3, this doesn't become effective as the file backend drops all log messages with a level below 1. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14426 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Thu Jul 2 13:25:29 UTC 2020 on sn-devel-184 (cherry picked from commit 71488b812fe737df2d3439a6ff3f95bb69b4a5bd) Autobuild-User(v4-11-test): Karolin Seeger <kseeger@samba.org> Autobuild-Date(v4-11-test): Thu Jul 9 11:40:15 UTC 2020 on sn-devel-184
-rw-r--r--lib/util/debug.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/util/debug.c b/lib/util/debug.c
index 4bc38e22cee..d8427c291da 100644
--- a/lib/util/debug.c
+++ b/lib/util/debug.c
@@ -1146,7 +1146,7 @@ bool reopen_logs_internal(void)
b = debug_find_backend("file");
assert(b != NULL);
- b->log_level = dbgc_config[DBGC_ALL].loglevel;
+ b->log_level = MAX_DEBUG_LEVEL;
break;
}