The branch, master has been updated via 2bd28d2 lib/util/util.c: move null-check before use via 6d00855 torture:smb2: fix skip message if share is not CA via cd3ee2a torture:smb2: skip replay5 test if server does not support persistent handles via 95835b9 torture:smb2: skip replay3 if server does not support Multi-Channel from 7105e171 lib/util: Add tests for strv_addn()
https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 2bd28d23fdac82f366c0e9d412d2fefca9c077eb Author: Aurelien Aptel <aap...@suse.com> Date: Thu Feb 25 14:11:10 2016 +0100 lib/util/util.c: move null-check before use moves a null pointer check *before* the pointer is used in the strlen() call - still allocate the `fname` array on the stack - still compiles under C90 definition/code mixing rules Signed-off-by: Aurelien Aptel <aap...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> Reviewed-by: Ralph Boehme <r...@sernet.de> Autobuild-User(master): Jeremy Allison <j...@samba.org> Autobuild-Date(master): Tue Mar 1 02:25:22 CET 2016 on sn-devel-144 commit 6d008556722a5bca73e5881345497ec8f97595dd Author: Michael Adam <ob...@samba.org> Date: Mon Feb 29 01:52:42 2016 +0100 torture:smb2: fix skip message if share is not CA Signed-off-by: Michael Adam <ob...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> commit cd3ee2a2aa46cb49e14c451ea8ee64039e5b8fa6 Author: Michael Adam <ob...@samba.org> Date: Mon Feb 29 01:52:07 2016 +0100 torture:smb2: skip replay5 test if server does not support persistent handles Signed-off-by: Michael Adam <ob...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> commit 95835b9280f8b191245786305b43ae802886ee01 Author: Michael Adam <ob...@samba.org> Date: Mon Feb 29 01:51:23 2016 +0100 torture:smb2: skip replay3 if server does not support Multi-Channel Signed-off-by: Michael Adam <ob...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> ----------------------------------------------------------------------- Summary of changes: lib/util/util.c | 6 +----- source4/torture/smb2/replay.c | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 6 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/util/util.c b/lib/util/util.c index 03edd7f..683741c 100644 --- a/lib/util/util.c +++ b/lib/util/util.c @@ -66,15 +66,11 @@ _PUBLIC_ const char *tmpdir(void) **/ int create_unlink_tmp(const char *dir) { - size_t len = strlen(dir); + size_t len = strlen(dir ? dir : (dir = tmpdir())); char fname[len+25]; int fd; mode_t mask; - if (!dir) { - dir = tmpdir(); - } - len = snprintf(fname, sizeof(fname), "%s/listenerlock_XXXXXX", dir); if (len >= sizeof(fname)) { errno = ENOMEM; diff --git a/source4/torture/smb2/replay.c b/source4/torture/smb2/replay.c index 4b3f569..26c32d1 100644 --- a/source4/torture/smb2/replay.c +++ b/source4/torture/smb2/replay.c @@ -487,12 +487,20 @@ static bool test_replay3(struct torture_context *tctx, struct smb2_tree *tree1) struct smb2_session *session1_2 = NULL; uint32_t share_capabilities; bool share_is_so; + uint32_t server_capabilities; if (smbXcli_conn_protocol(transport1->conn) < PROTOCOL_SMB3_00) { torture_skip(tctx, "SMB 3.X Dialect family required for " "Replay tests\n"); } + server_capabilities = smb2cli_conn_server_capabilities( + tree1->session->transport->conn); + if (!(server_capabilities & SMB2_CAP_MULTI_CHANNEL)) { + torture_skip(tctx, + "Server does not support multi-channel."); + } + share_capabilities = smb2cli_tcon_capabilities(tree1->smbXcli); share_is_so = share_capabilities & SMB2_SHARE_CAP_SCALEOUT; @@ -869,6 +877,7 @@ static bool test_replay5(struct torture_context *tctx, struct smb2_tree *tree) uint32_t share_capabilities; bool share_is_ca; bool share_is_so; + uint32_t server_capabilities; const char *fname = BASEDIR "\\replay5.dat"; struct smb2_transport *transport = tree->session->transport; struct smbcli_options options = tree->session->transport->options; @@ -880,11 +889,18 @@ static bool test_replay5(struct torture_context *tctx, struct smb2_tree *tree) "Replay tests\n"); } + server_capabilities = smb2cli_conn_server_capabilities( + tree->session->transport->conn); + if (!(server_capabilities & SMB2_CAP_PERSISTENT_HANDLES)) { + torture_skip(tctx, + "Server does not support persistent handles."); + } + share_capabilities = smb2cli_tcon_capabilities(tree->smbXcli); share_is_ca = share_capabilities & SMB2_SHARE_CAP_CONTINUOUS_AVAILABILITY; if (!share_is_ca) { - torture_skip(tctx, "Persistent File Handles not supported"); + torture_skip(tctx, "Share is not continuously available."); } share_is_so = share_capabilities & SMB2_SHARE_CAP_SCALEOUT; -- Samba Shared Repository