[SCM] Samba Shared Repository - branch master updated

2022-02-22 Thread Amitay Isaacs
The branch, master has been updated
   via  0d8084ed628 ctdb-protocol: CID 1499395: Uninitialized variables 
(UNINIT)
   via  0f373443ef3 ctdb-tests: Fix missing #include for sigaction(2)
   via  ef9017a1503 ctdb-tests: Dump a stack trace on abort
  from  3990c33efec examples: Reformat shell scripts

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


- Log -
commit 0d8084ed6281e5f6e894315d61f196a887510f8d
Author: Martin Schwenke 
Date:   Wed Feb 16 09:32:55 2022 +1100

ctdb-protocol: CID 1499395: Uninitialized variables (UNINIT)

Issue is reported here:

853 case CTDB_CONTROL_DB_VACUUM: {
854 struct ctdb_db_vacuum db_vacuum;
855
>>> CID 1499395:  Uninitialized variables  (UNINIT)
>>> Using uninitialized value "db_vacuum.full_vacuum_run" when calling 
"ctdb_db_vacuum_len".
856 CHECK_CONTROL_DATA_SIZE(ctdb_db_vacuum_len(_vacuum));
857 return ctdb_control_db_vacuum(ctdb, c, indata, 
async_reply);
858 }

The problem is that ctdb_bool_len() unnecessarily dereferences its
argument, which in this case is _vacuum.full_vacuum_run.  Not a
security issue because the value copied by dereferencing is not used.

Signed-off-by: Martin Schwenke 
Reviewed-by: Amitay Isaacs 

Autobuild-User(master): Amitay Isaacs 
Autobuild-Date(master): Wed Feb 23 02:02:06 UTC 2022 on sn-devel-184

commit 0f373443ef32d368c84640362786e7bd3e092c19
Author: Martin Schwenke 
Date:   Wed Feb 16 22:12:37 2022 +1100

ctdb-tests: Fix missing #include for sigaction(2)

Signed-off-by: Martin Schwenke 
Reviewed-by: Amitay Isaacs 

commit ef9017a15033ec00c6661a2bab4b254dbfa41fe5
Author: Martin Schwenke 
Date:   Tue Jan 4 22:19:19 2022 +1100

ctdb-tests: Dump a stack trace on abort

Debugging a test failure here without GDB is not possible.  Dumping a
stack trace gives a good hint.

Signed-off-by: Martin Schwenke 
Reviewed-by: Amitay Isaacs 

---

Summary of changes:
 ctdb/protocol/protocol_basic.c | 2 +-
 ctdb/tests/src/protocol_common_basic.c | 4 
 ctdb/wscript   | 2 +-
 3 files changed, 6 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/ctdb/protocol/protocol_basic.c b/ctdb/protocol/protocol_basic.c
index 94b18c1cd10..42f207790d0 100644
--- a/ctdb/protocol/protocol_basic.c
+++ b/ctdb/protocol/protocol_basic.c
@@ -162,7 +162,7 @@ int ctdb_double_pull(uint8_t *buf, size_t buflen, double 
*out, size_t *npull)
 
 size_t ctdb_bool_len(bool *in)
 {
-   uint8_t u8 = *in;
+   uint8_t u8 = 0;
 
return ctdb_uint8_len();
 }
diff --git a/ctdb/tests/src/protocol_common_basic.c 
b/ctdb/tests/src/protocol_common_basic.c
index 668fb46cfb3..7567f7b6520 100644
--- a/ctdb/tests/src/protocol_common_basic.c
+++ b/ctdb/tests/src/protocol_common_basic.c
@@ -18,9 +18,12 @@
 */
 
 #include "replace.h"
+#include "system/wait.h"
 
 #include 
 
+#include "lib/util/fault.h"
+
 #include "tests/src/protocol_common_basic.h"
 
 uint8_t BUFFER[1024*1024];
@@ -242,6 +245,7 @@ static void protocol_test_iterate_abort_handler(int sig)
if (protocol_test_iterate_buf[0] != '\0') {
   fprintf(stderr, " tag: %s\n", protocol_test_iterate_buf);
}
+   log_stack_trace();
sigaction(SIGABRT, , NULL);
abort();
 }
diff --git a/ctdb/wscript b/ctdb/wscript
index a9fef9241aa..4a28dfd3cf0 100644
--- a/ctdb/wscript
+++ b/ctdb/wscript
@@ -977,7 +977,7 @@ def build(bld):
 bld.SAMBA_SUBSYSTEM('ctdb-protocol-tests-basic',
 source=bld.SUBDIR('tests/src',
   'protocol_common_basic.c'),
-deps='replace talloc')
+deps='samba-util replace talloc')
 
 bld.SAMBA_SUBSYSTEM('ctdb-protocol-tests-common',
 source=bld.SUBDIR('tests/src',


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2022-02-22 Thread Andreas Schneider
The branch, master has been updated
   via  3990c33efec examples: Reformat shell scripts
   via  1b8b6ac801e docs-xml: Reformat shell scripts
   via  2d5d88ff345 buildtools: Reformat shell scripts
   via  a9eebca923a configure: Reformat wrapper script
   via  38a1e4c5bd8 editorconfig: Change shell to tabs with tab width 8
  from  5030bba13ae samba-dcerpcd: Silence a DEBUG message

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


- Log -
commit 3990c33efec319a1262688b7ef069f4ce6a01949
Author: Andreas Schneider 
Date:   Sat Feb 19 16:06:32 2022 +0100

examples: Reformat shell scripts

shfmt -f examples/ | xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider 
Reviewed-by: Andrew Bartlett 

Autobuild-User(master): Andreas Schneider 
Autobuild-Date(master): Tue Feb 22 16:20:58 UTC 2022 on sn-devel-184

commit 1b8b6ac801e94c3f2fb026e6dfe1275ae9caef47
Author: Andreas Schneider 
Date:   Sat Feb 19 08:56:15 2022 +0100

docs-xml: Reformat shell scripts

shfmt -f docs-xml | xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider 
Reviewed-by: Andrew Bartlett 

commit 2d5d88ff34532ba2d78997467e5720bba480f07e
Author: Andreas Schneider 
Date:   Sat Feb 19 08:52:17 2022 +0100

buildtools: Reformat shell scripts

shfmt -f buildtools | xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider 
Reviewed-by: Andrew Bartlett 

commit a9eebca923ae7461a94448d3f6800e36bbfc8e46
Author: Andreas Schneider 
Date:   Sat Feb 19 08:54:01 2022 +0100

configure: Reformat wrapper script

shfmt -w -p -i 0 -fn configure

Signed-off-by: Andreas Schneider 
Reviewed-by: Andrew Bartlett 

commit 38a1e4c5bd8c672b1e5f7b116fc1c5d0618fec17
Author: Andreas Schneider 
Date:   Sat Feb 19 16:10:29 2022 +0100

editorconfig: Change shell to tabs with tab width 8

Signed-off-by: Andreas Schneider 
Reviewed-by: Andrew Bartlett 

---

Summary of changes:
 .editorconfig  |   8 +-
 buildtools/compare_config_h4.sh|   4 +-
 buildtools/compare_generated.sh|  59 +
 buildtools/compare_install.sh  |   4 +-
 buildtools/scripts/abi_gen.sh  |  22 ++--
 buildtools/scripts/autogen-waf.sh  |   6 +-
 buildtools/testwaf.sh  |  66 +-
 configure  |   2 +-
 docs-xml/smbdotconf/generate-file-list.sh  |   9 +-
 examples/LDAP/get_next_oid |  12 +-
 examples/ad-bench/ad-bench.sh  |  14 +--
 examples/ad-bench/settings.sh  |   5 +-
 examples/ad-bench/test_utils.sh|  14 +--
 examples/ad-bench/time_group.sh|  38 +++---
 examples/ad-bench/time_join.sh |  22 ++--
 examples/ad-bench/time_kinit.sh|  18 +--
 examples/ad-bench/time_ldap.sh |  45 ---
 examples/ad-bench/time_user.sh |  38 +++---
 examples/ad-bench/utils.sh |  72 ++-
 examples/scripts/debugging/linux/backtrace |  12 +-
 examples/scripts/debugging/solaris/solaris-oops.sh |  28 +++--
 examples/scripts/idmap/idmap_nis.sh| 133 +++--
 examples/scripts/wins_hook/dns_update  |   8 +-
 examples/systemtap/generate-winbindd.stp.sh|  14 +--
 24 files changed, 343 insertions(+), 310 deletions(-)


Changeset truncated at 500 lines:

diff --git a/.editorconfig b/.editorconfig
index b5d39118772..fa1c0680aa0 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -18,10 +18,10 @@ indent_size = 4
 tab_width = 4
 insert_final_newline = true
 
-[*.{sh}]
-indent_style = space
-indent_size = 4
-tab_width = 4
+[*.sh]
+indent_style = tab
+indent_size = 8
+tab_width = 8
 
 [*.{pl,pm}]
 indent_style = tab
diff --git a/buildtools/compare_config_h4.sh b/buildtools/compare_config_h4.sh
index b78b36fdd0f..fee8abfbd50 100755
--- a/buildtools/compare_config_h4.sh
+++ b/buildtools/compare_config_h4.sh
@@ -3,8 +3,8 @@
 # compare the generated config.h from a waf build with existing samba
 # build
 
-grep "^.define" bin/default/source4/include/config.h | sort > waf-config.h
-grep "^.define" $HOME/samba_old/source4/include/config.h | sort > old-config.h
+grep "^.define" bin/default/source4/include/config.h | sort >waf-config.h
+grep "^.define" $HOME/samba_old/source4/include/config.h | sort >old-config.h
 
 comm -23 old-config.h waf-config.h
 
diff --git a/buildtools/compare_generated.sh b/buildtools/compare_generated.sh
index ebef8a979bd..e6265795813 100755
--- a/buildtools/compare_generated.sh
+++ b/buildtools/compare_generated.sh
@@ -10,41 +10,40 @@ gen_files=$(cd 

[SCM] Samba Shared Repository - branch master updated

2022-02-22 Thread Ralph Böhme
The branch, master has been updated
   via  5030bba13ae samba-dcerpcd: Silence a DEBUG message
   via  1912a0d65cb smbd: We have the fsp available, use 
fsp_is_alternate_stream()
   via  118b63bb2c2 smbd: Fix a typo
   via  5204da2ac5a smbd: Convert get_real_filename_full_scan() to 
OpenDir_ntstatus()
   via  f143eeae169 smbd: Initialize a pointer
   via  7e3c51ee431 vfs: walk_streams() returns NTSTATUS
   via  9027cc357a0 smbd: can_delete_directory_fsp() returns NTSTATUS
   via  be201475167 smbd: Factor out OpenDir_ntstatus()
   via  afd037df111 smbd: Make OpenDir_fsp() return NTSTATUS
   via  2cef24a5fa6 smbd: Initialize a pointer
  from  a2590298b03 util: CID 1499409:  Memory - corruptions  
(OVERLAPPING_COPY)

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


- Log -
commit 5030bba13aee6dc5cc1507c063acf19e4e091cf2
Author: Volker Lendecke 
Date:   Tue Feb 22 10:02:57 2022 +0100

samba-dcerpcd: Silence a DEBUG message

This is not worth a debuglevel 1 message

Signed-off-by: Volker Lendecke 
Reviewed-by: Ralph Boehme 

Autobuild-User(master): Ralph Böhme 
Autobuild-Date(master): Tue Feb 22 10:16:44 UTC 2022 on sn-devel-184

commit 1912a0d65cb286ebf76c008bfbc9b0b60024859d
Author: Volker Lendecke 
Date:   Fri Feb 11 18:49:53 2022 +0100

smbd: We have the fsp available, use fsp_is_alternate_stream()

Signed-off-by: Volker Lendecke 
Reviewed-by: Ralph Boehme 

commit 118b63bb2c2ed9d3d91eb6ab59f9d267adf5c954
Author: Volker Lendecke 
Date:   Mon Feb 21 15:26:06 2022 +0100

smbd: Fix a typo

Signed-off-by: Volker Lendecke 
Reviewed-by: Ralph Boehme 

commit 5204da2ac5ace4d62a8665544780453469b885fa
Author: Volker Lendecke 
Date:   Mon Feb 21 17:43:17 2022 +0100

smbd: Convert get_real_filename_full_scan() to OpenDir_ntstatus()

Get us a better error message without going through the lossy errno.

Signed-off-by: Volker Lendecke 
Reviewed-by: Ralph Boehme 

commit f143eeae1690dd0084789859d0898291fe6b75a8
Author: Volker Lendecke 
Date:   Mon Feb 21 17:30:29 2022 +0100

smbd: Initialize a pointer

Signed-off-by: Volker Lendecke 
Reviewed-by: Ralph Boehme 

commit 7e3c51ee431f5070f87f3596b11da1b7a1c19e9a
Author: Volker Lendecke 
Date:   Mon Feb 21 17:19:49 2022 +0100

vfs: walk_streams() returns NTSTATUS

Don't go via errno

Signed-off-by: Volker Lendecke 
Reviewed-by: Ralph Boehme 

commit 9027cc357a0db4fe08b3abc93ce2d7a9d729d815
Author: Volker Lendecke 
Date:   Mon Feb 21 17:19:49 2022 +0100

smbd: can_delete_directory_fsp() returns NTSTATUS

Don't go via errno

Signed-off-by: Volker Lendecke 
Reviewed-by: Ralph Boehme 

commit be201475167afaeb7824cbb40034b3dde4a182bb
Author: Volker Lendecke 
Date:   Mon Feb 21 17:17:24 2022 +0100

smbd: Factor out OpenDir_ntstatus()

We might have callers interested in the exact NTSTATUS error code.

Signed-off-by: Volker Lendecke 
Reviewed-by: Ralph Boehme 

commit afd037df202adefa49d1b746ec18d522dcd1
Author: Volker Lendecke 
Date:   Mon Feb 21 17:12:05 2022 +0100

smbd: Make OpenDir_fsp() return NTSTATUS

Preparation for making OpenDir return NTSTATUS

Signed-off-by: Volker Lendecke 
Reviewed-by: Ralph Boehme 

commit 2cef24a5fa681840147509e1f97d8ce19e0f533d
Author: Volker Lendecke 
Date:   Mon Feb 21 17:09:36 2022 +0100

smbd: Initialize a pointer

Signed-off-by: Volker Lendecke 
Reviewed-by: Ralph Boehme 

---

Summary of changes:
 source3/modules/vfs_streams_depot.c |   8 +--
 source3/rpc_server/rpc_host.c   |   8 +--
 source3/smbd/close.c|   2 +-
 source3/smbd/dir.c  | 102 +++-
 source3/smbd/filename.c |  12 +++--
 source3/smbd/proto.h|   6 +++
 source3/smbd/reply.c|   2 +-
 7 files changed, 91 insertions(+), 49 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_streams_depot.c 
b/source3/modules/vfs_streams_depot.c
index ae73ba965a5..f1ec5b9748a 100644
--- a/source3/modules/vfs_streams_depot.c
+++ b/source3/modules/vfs_streams_depot.c
@@ -551,6 +551,7 @@ static NTSTATUS walk_streams(vfs_handle_struct *handle,
const char *dname = NULL;
long offset = 0;
char *talloced = NULL;
+   NTSTATUS status;
 
dirname = stream_dir(handle, smb_fname_base, _fname_base->st,
 false);
@@ -594,13 +595,14 @@ static NTSTATUS walk_streams(vfs_handle_struct *handle,
orig_connectpath = handle->conn->connectpath;
handle->conn->connectpath = rootdir;
 
-   dir_hnd = OpenDir(talloc_tos(), handle->conn, dir_smb_fname, NULL, 0);
-   if (dir_hnd == NULL) {
+   status =