[SCM] Samba Shared Repository - branch v4-19-test updated

Jule Anger janger at samba.org
Mon Aug 28 09:37:01 UTC 2023


The branch, v4-19-test has been updated
       via  fb774d5d425 util: Avoid logging to multiple backends for stdout/stderr
       via  645fc88b65c samba-tool: Allow LDB URL to be None
      from  a3ce262afd4 WHATSNEW: Add Resource Based Constrained Delegation (RBCD) feature for Heimdal

https://git.samba.org/?p=samba.git;a=shortlog;h=v4-19-test


- Log -----------------------------------------------------------------
commit fb774d5d4257fde3a3ff8052434c79e219ecdce4
Author: Martin Schwenke <mschwenke at ddn.com>
Date:   Wed Jul 26 20:43:37 2023 +1000

    util: Avoid logging to multiple backends for stdout/stderr
    
    Commit 83fe7a0316d3e5867a56cfdc51ec17f36ea03889 converted the
    stdout/stderr logging  types to DEBUG_FILE to get a header when using
    DEBUG_SYSLOG_FORMAT_ALWAYS.  However, this causes all configured
    backends to be invoked.  When syslog is one of those backends then
    this is almost certainly not what is intended.
    
    Instead, call debug_file_log() directly in that special case and
    revert the parts of the above commit that convert to file logging.
    
    Most of the changes to debughdrclass() still seem necessary, since
    they handle the change of debug_syslog_format from a bool to an enum.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=15460
    
    Signed-off-by: Martin Schwenke <mschwenke at ddn.com>
    Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    
    Autobuild-User(master): Martin Schwenke <martins at samba.org>
    Autobuild-Date(master): Mon Aug 28 01:21:07 UTC 2023 on atb-devel-224
    
    (cherry picked from commit c7672779128ff12eb7a5cb34052559e62adbd5cb)
    
    Autobuild-User(v4-19-test): Jule Anger <janger at samba.org>
    Autobuild-Date(v4-19-test): Mon Aug 28 09:36:36 UTC 2023 on atb-devel-224

commit 645fc88b65cfa27bf5be88b7b485c273ae0d832b
Author: Joseph Sutton <josephsutton at catalyst.net.nz>
Date:   Fri Aug 25 12:14:23 2023 +1200

    samba-tool: Allow LDB URL to be None
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=15458
    
    Signed-off-by: Joseph Sutton <josephsutton at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 776597bce922d291257e34f1e3304227265a1dbc)

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

Summary of changes:
 lib/util/debug.c                    | 36 +++++++++++++-----------------------
 python/samba/netcmd/domain/level.py |  2 +-
 2 files changed, 14 insertions(+), 24 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/util/debug.c b/lib/util/debug.c
index b83075cb239..0e13fa564e3 100644
--- a/lib/util/debug.c
+++ b/lib/util/debug.c
@@ -1559,25 +1559,10 @@ void check_log_size( void )
 static void Debug1(const char *msg, size_t msg_len)
 {
 	int old_errno = errno;
-	enum debug_logtype logtype = state.logtype;
 
 	debug_count++;
 
-	if (state.settings.debug_syslog_format == DEBUG_SYSLOG_FORMAT_ALWAYS) {
-		switch(state.logtype) {
-		case DEBUG_STDOUT:
-		case DEBUG_STDERR:
-		case DEBUG_DEFAULT_STDOUT:
-		case DEBUG_DEFAULT_STDERR:
-			/* Behave the same as logging to a file */
-			logtype = DEBUG_FILE;
-			break;
-		default:
-			break;
-		}
-	}
-
-	switch(logtype) {
+	switch(state.logtype) {
 	case DEBUG_CALLBACK:
 		debug_callback_log(msg, msg_len, current_msg_level);
 		break;
@@ -1585,13 +1570,18 @@ static void Debug1(const char *msg, size_t msg_len)
 	case DEBUG_STDERR:
 	case DEBUG_DEFAULT_STDOUT:
 	case DEBUG_DEFAULT_STDERR:
-		if (dbgc_config[DBGC_ALL].fd > 0) {
-			ssize_t ret;
-			do {
-				ret = write(dbgc_config[DBGC_ALL].fd,
-					    msg,
-					    msg_len);
-			} while (ret == -1 && errno == EINTR);
+		if (state.settings.debug_syslog_format ==
+		    DEBUG_SYSLOG_FORMAT_ALWAYS) {
+			debug_file_log(current_msg_level, msg, msg_len);
+		} else {
+			if (dbgc_config[DBGC_ALL].fd > 0) {
+				ssize_t ret;
+				do {
+					ret = write(dbgc_config[DBGC_ALL].fd,
+						    msg,
+						    msg_len);
+				} while (ret == -1 && errno == EINTR);
+			}
 		}
 		break;
 	case DEBUG_FILE:
diff --git a/python/samba/netcmd/domain/level.py b/python/samba/netcmd/domain/level.py
index c4361eed342..7300561c30c 100644
--- a/python/samba/netcmd/domain/level.py
+++ b/python/samba/netcmd/domain/level.py
@@ -69,7 +69,7 @@ class cmd_domain_level(Command):
         domain_dn = samdb.domain_dn()
 
         in_transaction = False
-        if subcommand == "raise" and not H.startswith("ldap"):
+        if subcommand == "raise" and (H is None or not H.startswith("ldap")):
             samdb.transaction_start()
             in_transaction = True
             try:


-- 
Samba Shared Repository



More information about the samba-cvs mailing list