[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 9ebf380 lib/util:charset/tests: improve strlen_m[_term[_null]]() testing via bf6f032 lib/util: let strlen_m_term[_null]() use strlen_m_ext_term[_null]() via cd8bcec lib/util: add strlen_m_ext_term_null() helper function via 3cdac4a s4:pyrpc: remove pointless alter_context() method via 8499344 python:samba/tests: don't use the x.alter_context() method in dcerpc/bare.py via 828e1d3 s4:torture/rpc: expect NT_STATUS_CONNECTION_DISCONNECTED in torture_rpc_alter_context() via 58a8741 s4:torture/rpc: expect NT_STATUS_CONNECTION_DISCONNECTED when a dcerpc connection is not connected via 7e095eb libcli/smb: let tstream_smbXcli_np report connection errors as EPIPE instead of EIO via 793af3f s3:winbindd: use check dcerpc_binding_handle_is_connected() instead of a specific status via 24ea917 python/samba/tests: add fallbacks for assert{Less,Greater}[Equal]() via c7e9968 python/samba/tests: let the output of hexdump() match our C code in dump_data_cb() via 7a07f6a python/samba/tests: move hexdump() from DNSTest to TestCase via 2b16301 librpc/ndr: make use of dump_data_cb() in ndr_dump_data() via 4a0370b lib/util: fix output format in dump_data*() via 8c9612e s4:pyrpc: add base.bind_time_features_syntax(features) via e1498ac librpc/rpc: add dcerpc_[extract|construct]_bind_time_features() via 18dce19 librpc/rpc: add dcerpc_fault_from_nt_status() via 1eef708 librpc/rpc: add faultcode to nt_status mappings via cb8c156 midltests: add valid/midltests_DRS_EXTENSIONS.* via f3f1c38 auth/credentials: anonymous should not try to use kerberos via ebfb1e9 s4:ntvfs/ipc: fix ipc_close() via d1e81df s4-torture: pull, push and compare a witness Notify struct in ndr test. via f0156ca s4-torture: add new torture_suite_add_ndr_pullpush_fn_test_flags(). via 6d3f762 s4-torture: add torture_ndr_push_struct_blob_flags() in order to manipulate push flags. via c82aed8 libndr: reformat libndr torture_suite macros to make differences more visible. via c328ade s4-torture: using async dcerpc for witness async notifications. via e3cb9f7 lib/torture: be more verbose about ndr failures. via 6aeb0a0 s4-torture: move torture_assert_sid_equal() out of ndr headers. via 34e4dac s4-torture: finally enable witness_AsyncNotify ndr test. via 185896d s3-rpcclient: remove old extra hand marshalling from witness cmds. via 92709e9 s4-torture: add clusapi resource online/offline toggle code to witness test. via ceebd50 s4-torture: make some clusapi torture tests public. via 0a2c933 s3-rpcclient: close policy handle in cmd_clusapi_open_resource(). via 126c6f0 s3-rpcclient: use witness defines in witness rpcclient. via 5b95572 libndr: better debug message in ndr_pull_subcontext_start(). via d8dbbfc s3-rpcclient: add clusapi_get_resource_state command. via 82c4b92 witness: autogenerate the marshalling of the witness_notifyResponse_message. via e324184 witness: add default case to witness_notifyResponse_message union. via cf738cc s3-rpcclient: add cmdline tools to toggle online/offline cluster resource state. via cc3afec s4-torture: add some more tests for witness_AsyncNotify and RegisterEx with different timeouts. via 6e9c678 s4-torture: make setup of the clusapi pipe non-critical in witness test. via 9cdb69c s4-torture: minor cleanup in test_witness_Register(). via 1b70b1a s4-torture: open a clusapi connection to get list of cluster nodes, etc. from c6e044e s4:torture:vfs_fruit: check offset and length when reading AFP_AfpInfo stream https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 9ebf3804eb4ca48b6ff00db12f42795481347f37 Author: Stefan Metzmacher Date: Mon Jun 29 20:37:01 2015 +0200 lib/util:charset/tests: improve strlen_m[_term[_null]]() testing They differ in their "" vs. NULL handling. Signed-off-by: Stefan Metzmacher Reviewed-by: Guenther Deschner Autobuild-User(master): Günther Deschner Autobuild-Date(master): Fri Jul 3 05:02:45 CEST 2015 on sn-devel-104 commit bf6f03209494cc43dff717bd78c84bc59b03e76c Author: Stefan Metzmacher Date: Sat Jun 27 10:13:02 2015 +0200 lib/util: let strlen_m_term[_null]() use strlen_m_ext_term[_null]() Signed-off-by: Stefan Metzmacher Reviewed-by: Guenther Deschner commit cd8bcecf18544b907c1927aa716057216f948dac Author: Stefan Metzmacher Date: Sat Jun 27 10:12:29 2015 +0200 lib/util: add strlen_m_ext_term_null() helper function Signed-off-by: Stefan Metzmacher Reviewed-by: Guenther Deschner commit 3cdac4a85521974e3c71488ad4078c09245e3b7d Author
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via c6e044e s4:torture:vfs_fruit: check offset and length when reading AFP_AfpInfo stream via 25f302a vfs_fruit: check offset and length for AFP_AfpInfo read requests from f87e70a s3:libads: improve debug levels/messages in ads_find_dc() https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit c6e044ea33d1f16809196833e9e96a10e65b092e Author: Ralph Boehme Date: Thu Jun 25 16:25:05 2015 +0200 s4:torture:vfs_fruit: check offset and length when reading AFP_AfpInfo stream Bug: https://bugzilla.samba.org/show_bug.cgi?id=11363 Signed-off-by: Ralph Boehme Reviewed-by: Volker Lendecke Autobuild-User(master): Ralph Böhme Autobuild-Date(master): Fri Jul 3 01:47:29 CEST 2015 on sn-devel-104 commit 25f302a47c3119d454531dc992183552b9a42b13 Author: Ralph Boehme Date: Thu Jun 25 15:42:04 2015 +0200 vfs_fruit: check offset and length for AFP_AfpInfo read requests fruit_pread doesn't check the offset and length parameters and instead always writes 60 bytes, the size of the AFP_AfpInfo blob, to the the passed buffer. If the passed in buffer is smaller, we overwrite something somewhere. Bug: https://bugzilla.samba.org/show_bug.cgi?id=11363 Signed-off-by: Ralph Boehme Reviewed-by: Volker Lendecke --- Summary of changes: source3/modules/vfs_fruit.c | 16 +++- source4/torture/vfs/fruit.c | 92 + 2 files changed, 107 insertions(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c index a4272f5..d05d786 100644 --- a/source3/modules/vfs_fruit.c +++ b/source3/modules/vfs_fruit.c @@ -2621,6 +2621,17 @@ static ssize_t fruit_pread(vfs_handle_struct *handle, } if (ad->ad_type == ADOUBLE_META) { + char afpinfo_buf[AFP_INFO_SIZE]; + size_t to_return; + + if ((offset < 0) || (offset > AFP_INFO_SIZE)) { + len = 0; + rc = 0; + goto exit; + } + + to_return = AFP_INFO_SIZE - offset; + ai = afpinfo_new(talloc_tos()); if (ai == NULL) { rc = -1; @@ -2636,11 +2647,14 @@ static ssize_t fruit_pread(vfs_handle_struct *handle, memcpy(&ai->afpi_FinderInfo[0], ad_entry(ad, ADEID_FINDERI), ADEDLEN_FINDERI); - len = afpinfo_pack(ai, data); + len = afpinfo_pack(ai, afpinfo_buf); if (len != AFP_INFO_SIZE) { rc = -1; goto exit; } + + memcpy(data, afpinfo_buf + offset, to_return); + len = to_return; } else { len = SMB_VFS_NEXT_PREAD( handle, fsp, data, n, diff --git a/source4/torture/vfs/fruit.c b/source4/torture/vfs/fruit.c index c65ba74..4de21b2 100644 --- a/source4/torture/vfs/fruit.c +++ b/source4/torture/vfs/fruit.c @@ -49,6 +49,15 @@ goto done; \ }} while (0) +#define CHECK_VALUE(v, correct) do { \ + if ((v) != (correct)) { \ + torture_result(tctx, TORTURE_FAIL, \ + "(%s) Incorrect value %s=%u - should be %u\n", \ + __location__, #v, (unsigned)v, (unsigned)correct); \ + ret = false; \ + goto done; \ + }} while (0) + /* * REVIEW: * This is hokey, but what else can we do? @@ -932,6 +941,67 @@ static bool check_stream(struct smb2_tree *tree, * Read 'count' bytes at 'offset' from stream 'fname:sname' and * compare against buffer 'value' **/ +static ssize_t read_stream(struct smb2_tree *tree, + const char *location, + struct torture_context *tctx, + TALLOC_CTX *mem_ctx, + const char *fname, + const char *sname, + off_t read_offset, + size_t read_count) +{ + struct smb2_handle handle; + struct smb2_create create; + struct smb2_read r; + NTSTATUS status; + const char *full_name; + bool ret = true; + + full_name = talloc_asprintf(mem_ctx, "%s%s", fname, sname); + if (full_name == NULL) { + torture_comment(tctx, "talloc_asprintf error\n"); + return -1; + } + ZERO_STRUCT(create); + create.in.desired_access = SEC_FILE_READ_DATA; + create.in.file_attributes = FILE_ATTRIBUTE_NORMAL; + create.in.create_disposition = NTCREATEX_DISP_OPEN; + create.in.fname = full_name; + +
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via f87e70a s3:libads: improve debug levels/messages in ads_find_dc() from ddc4c67 librpc: prevent invalid NULL pointer derref in dcerpc_binding_get_auth_info(). https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit f87e70a93028cb64ed4793cb1db6b978fa917697 Author: Stefan Metzmacher Date: Sat Jun 27 09:31:21 2015 +0200 s3:libads: improve debug levels/messages in ads_find_dc() We should not flood the logs (and syslog) with fallback warnings. Signed-off-by: Stefan Metzmacher Reviewed-by: Michael Adam Autobuild-User(master): Michael Adam Autobuild-Date(master): Thu Jul 2 14:41:31 CEST 2015 on sn-devel-104 --- Summary of changes: source3/libads/ldap.c | 22 ++ 1 file changed, 14 insertions(+), 8 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index 5c53c63..8763164 100644 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -467,7 +467,7 @@ static NTSTATUS ads_find_dc(ADS_STRUCT *ads) } if (!*c_realm && !*c_domain) { - DEBUG(1, ("ads_find_dc: no realm or workgroup! Don't know " + DEBUG(0, ("ads_find_dc: no realm or workgroup! Don't know " "what to do\n")); return NT_STATUS_INVALID_PARAMETER; /* rather need MISSING_PARAMETER ... */ } @@ -515,10 +515,10 @@ static NTSTATUS ads_find_dc(ADS_STRUCT *ads) * - Guenther */ if (sitename) { - DEBUG(1, ("ads_find_dc: failed to find a valid DC on " - "our site (%s), " - "trying to find another DC\n", - sitename)); + DEBUG(3, ("ads_find_dc: failed to find a valid DC on " + "our site (%s), Trying to find another DC " + "for realm '%s' (domain '%s')\n", + sitename, c_realm, c_domain)); namecache_delete(c_realm, 0x1C); status = resolve_and_ping_dns(ads, NULL, c_realm); @@ -536,14 +536,20 @@ static NTSTATUS ads_find_dc(ADS_STRUCT *ads) or if configuration specifically requests it */ if (*c_domain) { if (*c_realm) { - DEBUG(1, ("ads_find_dc: falling back to netbios " - "name resolution for domain %s\n", - c_domain)); + DEBUG(3, ("ads_find_dc: falling back to netbios " + "name resolution for domain '%s' (realm '%s')\n", + c_domain, c_realm)); } status = resolve_and_ping_netbios(ads, c_domain, c_realm); + if (NT_STATUS_IS_OK(status)) { + return status; + } } + DEBUG(1, ("ads_find_dc: " + "name resolution for realm '%s' (domain '%s') failed: %s\n", + c_realm, c_domain, nt_errstr(status))); return status; } -- Samba Shared Repository
autobuild: intermittent test failure detected
The autobuild test system has detected an intermittent failing test in the current master tree. The autobuild log of the failure is available here: http://git.samba.org/autobuild.flakey/2015-07-02-0927/flakey.log The samba build logs are available here: http://git.samba.org/autobuild.flakey/2015-07-02-0927/samba.stderr http://git.samba.org/autobuild.flakey/2015-07-02-0927/samba.stdout The top commit at the time of the failure was: commit ddc4c6767a98bb087bb435ed3a4591e75637b1e8 Author: Günther Deschner Date: Wed Jul 1 17:14:10 2015 +0200 librpc: prevent invalid NULL pointer derref in dcerpc_binding_get_auth_info(). Guenther Signed-off-by: Günther Deschner Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Thu Jul 2 02:05:38 CEST 2015 on sn-devel-104