[SCM] Samba Shared Repository - branch master updated

Andreas Schneider asn at samba.org
Thu Jul 2 13:26:02 UTC 2020


The branch, master has been updated
       via  71488b812fe lib/debug: set the correct default backend loglevel to MAX_DEBUG_LEVEL
       via  5aeaa6959da lib/debug: assert file backend
      from  7082902d56a ldap_client: Make ldap_parse_basic_url() IPv6-address aware

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 71488b812fe737df2d3439a6ff3f95bb69b4a5bd
Author: Ralph Boehme <slow at samba.org>
Date:   Tue Jun 30 17:03:05 2020 +0200

    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 at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    
    Autobuild-User(master): Andreas Schneider <asn at cryptomilk.org>
    Autobuild-Date(master): Thu Jul  2 13:25:29 UTC 2020 on sn-devel-184

commit 5aeaa6959da326095e98f0369b6d91dc5667415e
Author: Ralph Boehme <slow at samba.org>
Date:   Tue Jun 30 17:02:07 2020 +0200

    lib/debug: assert file backend
    
    The debug file backend is a built-in default, if it's missing we're totally
    screwed.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14426
    
    Signed-off-by: Ralph Boehme <slow at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 lib/util/debug.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/util/debug.c b/lib/util/debug.c
index 4b9a79e0b6f..08ffee35a1f 100644
--- a/lib/util/debug.c
+++ b/lib/util/debug.c
@@ -30,6 +30,7 @@
 #include "util_strlist.h" /* LIST_SEP */
 #include "blocking.h"
 #include "debug.h"
+#include <assert.h>
 
 /* define what facility to use for syslog */
 #ifndef SYSLOG_FACILITY
@@ -1113,6 +1114,7 @@ static bool reopen_one_log(int *fd, const char *logfile)
 */
 bool reopen_logs_internal(void)
 {
+	struct debug_backend *b = NULL;
 	mode_t oldumask;
 	int new_fd = 0;
 	size_t i;
@@ -1140,15 +1142,13 @@ bool reopen_logs_internal(void)
 		dbgc_config[DBGC_ALL].fd = 2;
 		return true;
 
-	case DEBUG_FILE: {
-		struct debug_backend *b = debug_find_backend("file");
+	case DEBUG_FILE:
+		b = debug_find_backend("file");
+		assert(b != NULL);
 
-		if (b != NULL) {
-			b->log_level = dbgc_config[DBGC_ALL].loglevel;
-		}
+		b->log_level = MAX_DEBUG_LEVEL;
 		break;
 	}
-	}
 
 	oldumask = umask( 022 );
 


-- 
Samba Shared Repository



More information about the samba-cvs mailing list