[SCM] Samba Shared Repository - branch master updated

2022-06-16 Thread Andrew Bartlett
The branch, master has been updated
   via  eaf829ad0bf s4/torture/unix_info2: return NULL on failure
   via  8261545a0f6 bind_dlz: some commentary for b9_format
   via  f1017c6f2dd dns/dlz: remember old timestamp for dynamic records
   via  590d2e169c4 dlz_bind9: call dns_name_is_static before adding space 
for record
   via  aae68994536 tortures/dlz: more DNS update tests
   via  d0d18934fa0 torture: add torture_assertf()
   via  937c2cd38a6 torture/bind_dlz: return the right kind of failure
   via  5d89c90ab45 torture/dlz: minor reformatting for README.Coding
   via  9b47d818d04 torture/dlz: reserve test_ prefix for actual tests
   via  247a39bba04 torture/dlz: putrr callback recognises more than A 
records
   via  c7254de6fda util/debug: share classname table with tests
   via  1a6890a94d2 debug: add DBG_DEV()
   via  b94c805783e debug: drop an '#if _SAMBA_BUILD_ == 3'
   via  dfc9cf384de tests: rename logging test source
   via  ab949131b5f tests: adapt logging test for s3.
   via  c668b5caa92 tests: test source4 cmdline/smb.conf log level
   via  66cabb8fd1c s3/smbd: stdin fstat failure is a failure
   via  25ad724c014 s3:tests: Reformat test_symlink_traversal_smb2.sh
   via  fcedbfbbc61 s3:tests: Reformat test_symlink_traversal_smb1_posix.sh
   via  0714a6b435b s3:tests: Reformat test_symlink_traversal_smb1.sh
   via  8722450d09c s3:tests: Reformat test_symlink_rename_smb1_posix.sh
   via  b86936063ca s3:tests: Reformat test_success.sh
   via  1f94e871985 s3:tests: Reformat test_substitutions.sh
   via  ce6a31d2188 s3:tests: Reformat test_smbtorture_s3.sh
   via  7731fd6e3fa s3:tests: Reformat test_smbstatus.sh
   via  2eea4409b5c s3:tests: Reformat test_smbspool.sh
   via  627934bc2f0 s3:tests: Reformat test_smbpasswd.sh
   via  8b039153846 s3:tests: Reformat test_smbget.sh
   via  a1520e4e581 s3:tests: Reformat test_smbd_no_krb5.sh
   via  0754d46cd1a s3:tests: Reformat test_smbd_error.sh
   via  42e96b64b33 s3:tests: Reformat test_smbcquota.sh
   via  6368b82f976 s3:tests: Reformat test_smbclient_tarmode.sh
   via  69bb8853f61 s3: VFS: full_audit. Ensure the module doesn't load if 
an operation name is miss-spelled or otherwise unknown.
   via  ec91a583708 s3: VFS: full_audit: Use correct DBG_ print messages in 
init_bitmap().
   via  fe78d3c014d s3: test: Add tests to show we still connect to a 
full_audit share with a bad success or fail VFS names.
  from  e752f841e68 ctdb-daemon: Use DEBUG() macro for child logging

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


- Log -
commit eaf829ad0bf4bddf84da2dee0e375e36b13ad76d
Author: Douglas Bagnall 
Date:   Thu Apr 14 11:47:57 2022 +1200

s4/torture/unix_info2: return NULL on failure

false is also NULL, but NULL is NULLer.

Signed-off-by: Douglas Bagnall 
Reviewed-by: Andrew Bartlett 

Autobuild-User(master): Andrew Bartlett 
Autobuild-Date(master): Fri Jun 17 02:18:32 UTC 2022 on sn-devel-184

commit 8261545a0f68bb24911d3f734b803a13d90f0acf
Author: Douglas Bagnall 
Date:   Wed Apr 13 12:09:08 2022 +1200

bind_dlz: some commentary for b9_format

Signed-off-by: Douglas Bagnall 
Reviewed-by: Andrew Bartlett 

commit f1017c6f2dd136d1654a8ed3734721fc8f3c5b82
Author: Douglas Bagnall 
Date:   Wed Apr 13 15:20:50 2022 +1200

dns/dlz: remember old timestamp for dynamic records

If we don't tell dns_common_replace() the old timestamp, it will
think the node is static because the timestamp is 0.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15040

Signed-off-by: Douglas Bagnall 
Reviewed-by: Andrew Bartlett 

commit 590d2e169c4538a41ed1cd99f5cf72f4b6e6e424
Author: Michael Saxl 
Date:   Mon Apr 4 15:33:45 2022 +0200

dlz_bind9: call dns_name_is_static before adding space for record

dns_name_is_static is called after adding a uninitialized element to
recs. There is a chance that the uninizialized memory reads a element
with dwTimeStamp=0 and wType!=0. In that case dns_name_is_static will
return true

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15040

Signed-off-by: Michael Saxl 
Reviewed-by: Douglas Bagnall 
Reviewed-by: Andrew Bartlett 

commit aae689945369cc47574a7cf90faa0e2f20b5b504
Author: Douglas Bagnall 
Date:   Fri Apr 16 16:45:01 2021 +1200

tortures/dlz: more DNS update tests

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15040

Signed-off-by: Douglas Bagnall 
Reviewed-by: Andrew Bartlett 

commit d0d18934fa0660f85225f6a9387a4583f77bb780
Author: Douglas Bagnall 
Date:   Thu Apr 14 11:25:26 2022 +1200

torture: add torture_assertf()

Often we go 'torture_assert(tctx, expr, talloc_asprintf(tctx, "foo
%s", foo));' which is just a pain.

BUG: 

[SCM] Samba Shared Repository - branch master updated

2022-06-16 Thread Volker Lendecke
The branch, master has been updated
   via  e752f841e68 ctdb-daemon: Use DEBUG() macro for child logging
   via  88f35cf8628 ctdb-daemon: Drop unused prefix, logfn, logfn_private
   via  1596a3e84ba ctdb-common: Tell file logging not to redirect stderr
   via  a8091bd0c56 util: Add new debug setting debug_no_stderr_redirect
  from  d9e561a89a2 s3:tests: Reformat test_smbclient_s3.sh

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


- Log -
commit e752f841e682cc571006c09249b03d82aea5f8cd
Author: Martin Schwenke 
Date:   Mon Jun 6 18:02:31 2022 +1000

ctdb-daemon: Use DEBUG() macro for child logging

Directly using dbgtext() with file logging results in a log entry with
no header, which is wrong.  This is a regression, introduced in commit
10d15c9e5dfe4e8595d0b322c96f474fc7078f46.  Prior to this, CTDB's
callback for file logging would always add a header.

Use DEBUG() instead dbgtext().  Note that DEBUG() effectively compares
the passed script_log_level with DEBUGLEVEL, so an explicit check is
no longer necessary.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15090

Signed-off-by: Martin Schwenke 
Reviewed-by: Volker Lendecke 

Autobuild-User(master): Volker Lendecke 
Autobuild-Date(master): Thu Jun 16 13:33:10 UTC 2022 on sn-devel-184

commit 88f35cf86285b7a818282d5f465711de66dfad59
Author: Martin Schwenke 
Date:   Mon Jun 6 17:57:51 2022 +1000

ctdb-daemon: Drop unused prefix, logfn, logfn_private

These aren't set anywhere in the code.

Drop the log argument because it is also no longer used.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15090

Signed-off-by: Martin Schwenke 
Reviewed-by: Volker Lendecke 

commit 1596a3e84babb8fdd86af0c4b98906b309be7907
Author: Martin Schwenke 
Date:   Tue Jun 7 14:00:49 2022 +1000

ctdb-common: Tell file logging not to redirect stderr

This allows ctdb_set_child_logging() to work.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15090

Signed-off-by: Martin Schwenke 
Reviewed-by: Volker Lendecke 

commit a8091bd0c565a3f14542731e642319dbb68b4786
Author: Martin Schwenke 
Date:   Tue Jun 7 13:54:20 2022 +1000

util: Add new debug setting debug_no_stderr_redirect

CTDB doesn't want this redirection of stderr to the log file.  It
expects to be able to capture stderr of subprocesses and log them with
a header.  This redirection stops that from happening.

Unfortunately this has to be a negative option (i.e. "no" in the name)
so that the default of 0/false maintains existing behaviour.

Note that the default behaviour is sub-optimal because it causes raw
data (i.e. debug data without a header) to appear in the log.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15090

Signed-off-by: Martin Schwenke 
Reviewed-by: Volker Lendecke 

---

Summary of changes:
 ctdb/common/logging.c  |  1 +
 ctdb/server/ctdb_logging.c | 23 ---
 lib/util/debug.c   |  3 ++-
 lib/util/debug.h   |  1 +
 4 files changed, 8 insertions(+), 20 deletions(-)


Changeset truncated at 500 lines:

diff --git a/ctdb/common/logging.c b/ctdb/common/logging.c
index 1b91cdcc92b..3aa5ca996ee 100644
--- a/ctdb/common/logging.c
+++ b/ctdb/common/logging.c
@@ -148,6 +148,7 @@ static int file_log_setup(TALLOC_CTX *mem_ctx,
struct debug_settings settings = {
.debug_syslog_format = true,
.debug_hires_timestamp = true,
+   .debug_no_stderr_redirect = true,
};
const char *t = NULL;
 
diff --git a/ctdb/server/ctdb_logging.c b/ctdb/server/ctdb_logging.c
index 8af787c189f..1da26b5534c 100644
--- a/ctdb/server/ctdb_logging.c
+++ b/ctdb/server/ctdb_logging.c
@@ -38,12 +38,9 @@
 #include "common/logging.h"
 
 struct ctdb_log_state {
-   const char *prefix;
int fd, pfd;
char buf[1024];
uint16_t buf_used;
-   void (*logfn)(const char *, uint16_t, void *);
-   void *logfn_private;
 };
 
 /* Used by ctdb_set_child_logging() */
@@ -68,21 +65,9 @@ bool ctdb_logging_init(TALLOC_CTX *mem_ctx, const char 
*logging,
return true;
 }
 
-/* Note that do_debug always uses the global log state. */
-static void write_to_log(struct ctdb_log_state *log,
-const char *buf, unsigned int len)
+static void write_to_log(const char *buf, unsigned int len)
 {
-   if (script_log_level <= DEBUGLEVEL) {
-   if (log != NULL && log->prefix != NULL) {
-   dbgtext("%s: %*.*s\n", log->prefix, len, len, buf);
-   } else {
-   dbgtext("%*.*s\n", len, len, buf);
-   }
-   /* log it in the eventsystem as well */
-   if (log