1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

6624 Commits

Author SHA1 Message Date
Ralph Boehme
cc885223d7 selftest: move vfs_fruit tests that require "fruit:metadata=netatalk" to vfs.fruit_netatalk
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
2017-03-02 00:32:22 +01:00
Andreas Schneider
8a1b998acb s4:torture: Make sure handles are initialized
The CHECK_STATUS macro might goto done which checks the values of the
handle so they should be initialized in this case.

Found by covscan.

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2017-02-23 03:18:10 +01:00
Andreas Schneider
1daea6b0f8 s4-torture: Use the correct variable type in torture_smb2_maxfid()
Found by covscan.

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2017-02-23 03:18:10 +01:00
Chris Lamb
8de5c2e967 Correct "heirarchy" typos.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2017-02-22 08:26:23 +01:00
Chris Lamb
5482e5426e Correct "existence" typos.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2017-02-22 08:26:22 +01:00
Chris Lamb
a4ab7c73bd Correct "occured" typos.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2017-02-22 08:26:21 +01:00
Volker Lendecke
129015d1a6 lib: Fix "is_case_sensitive" in "ms_fnmatch_protocol"' callers
In the optimization in f969be5441 I got the boolean flag "is_case_sensitive"
wrong. The behaviour was case *insensitive*, so all the flags should have been
"false", keeping the old behaviour.  While there, simplify "mask_match" in
source4 client.c

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Feb 15 11:40:32 CET 2017 on sn-devel-144
2017-02-15 11:40:32 +01:00
Bob Campbell
b73c2e66f5 python/tests: improve samba-tool replicate --local test
It now makes sure that we only replicate incremental changes.

Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Feb 15 01:21:06 CET 2017 on sn-devel-144
2017-02-15 01:21:05 +01:00
Bob Campbell
bc5dc536f8 python/tests: move samba_tool_drs test to proper place
Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2017-02-14 21:28:25 +01:00
Bob Campbell
1c16e8abd2 torture/drs: Add a test for dn+binary linked attributes
Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11139
2017-02-14 02:20:07 +01:00
Bob Campbell
bfe423a660 torture/drs: run repl_schema in vampire_2000_dc environment as well
This will be necessary as linked attributes are handled differently in
Windows 2000.

We also only check msDS-IntId if we have a functional level of > Windows
2000, as this attribute is not present on lower domain function levels.

Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11139
2017-02-14 02:20:07 +01:00
Bob Campbell
373bd43542 torture/drs: generate linkID for test rather than specifying
Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11139
2017-02-14 02:20:07 +01:00
Bob Campbell
5c918e2942 torture/drs: expand test for DRSUAPI_DRS_GET_ANC
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12398

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Feb  9 03:16:09 CET 2017 on sn-devel-144
2017-02-09 03:16:09 +01:00
Stefan Metzmacher
41bc007d49 torture/drs: remove pointless nc_object_count replication checks in test_link_utdv_hwm()
nc_object_count and nc_linked_attributes_count are only filled if
DRSUAPI_DRS_GET_NC_SIZE is requested. And they should contain
the total number. This is only useful for the initial replication.

Samba ignores DRSUAPI_DRS_GET_NC_SIZE currently but that will change in
the following commits.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2017-02-08 23:20:18 +01:00
Günther Deschner
17a6e57fcc s4-torture: add more NDR tests for GetCorePrinterDrivers
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Tue Jan 24 14:42:34 CET 2017 on sn-devel-144
2017-01-24 14:42:34 +01:00
Günther Deschner
56255c1c60 s4-torture: add some NDR tests for validating ndr_push_charset behavior.
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2017-01-24 10:53:17 +01:00
Volker Lendecke
f969be5441 lib: Add "is_case_sensitive" to ms_fnmatch_protocol
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2017-01-22 18:30:12 +01:00
Günther Deschner
06e4d1c174 s4-torture: cleanup after printing tests that had to add a driver
We were only removing drivers from the upload area but did not delete
them via spoolss.

Guenther

Pair-Programmed-With: Andreas Schneider <asn@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
2017-01-12 15:35:13 +01:00
Andreas Schneider
39489a8ca9 s4-torture: cleanup architecture handling in spoolss driver tests.
Make sure the architecture field of the driver8 definition is always set
to the local environment (the one of the driver to be uploaded and
tested)

Pair-Programmed-With: Guenther Deschner <gd@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
2017-01-12 15:35:13 +01:00
Stefan Metzmacher
4b295b106c wscript: remove executable bits for all wscript* files
These files should not be executable.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Jan 11 20:21:01 CET 2017 on sn-devel-144
2017-01-11 20:21:01 +01:00
David Disseldorp
6fde123176 torture/ioctl: test set_compression(format_none)
This test case was overlooked in the previous bso#12144 update -
set compression requests with format=COMPRESSION_FORMAT_NONE should
succeed if the server / backing storage doesn't offer compression
support.
Confirm that Samba matches Windows Server 2016 ReFS behaviour here.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12144

Reported-by: Nick Barrett <nick@barrett.org.nz>
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2017-01-09 19:31:20 +01:00
Volker Lendecke
98bcdca632 torture-netlogon: Use "all_zero" where appropriate
... Saves a few bytes of footprint

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Tue Jan  3 19:56:17 CET 2017 on sn-devel-144
2017-01-03 19:56:17 +01:00
Volker Lendecke
015a41a5e3 torture-samlogon: Avoid static zeros
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2017-01-03 16:04:29 +01:00
Volker Lendecke
b3d5fe9679 torture-samlogon: Use "all_zero" where appropriate
... Saves a few bytes of footprint

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2017-01-03 16:04:29 +01:00
Volker Lendecke
6eeb3ec3ab torture-dfs: Use "all_zero" where appropriate
... Saves a few bytes of footprint

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2017-01-03 16:04:29 +01:00
Bob Campbell
5631421143 torture/drs: test link replication with hwm and utdv
Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-12-21 00:47:25 +01:00
Bob Campbell
e130c46e87 torture/drs: move ExopBaseTest into DrsBaseTest and extend
Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-12-21 00:47:24 +01:00
Andrew Bartlett
cf536e36fb torture: Add ServerReqChallengeReuseGlobal2 to rpc.netlogon
This test ensures that when the per-pipe challenge is used, the tdb cache
is wiped as well

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Dec 14 15:56:37 CET 2016 on sn-devel-144
2016-12-14 15:56:37 +01:00
Andrew Bartlett
5434bde87b torture: Add ServerReqChallengeReuse to rpc.netlogon
This test covers credentials reuse on the same process.

We test with direct re-use, and for the case where the challenge
is reset to zeros.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-12-14 11:55:18 +01:00
Andrew Bartlett
568d250bfb torture: Add new test ServerReqChallengeReuseGlobal to rpc.netlogon
This tests ensures we can not re-use the entries in global challenge table.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-12-14 11:55:18 +01:00
Andrew Bartlett
f55dc9cf72 torture/samba3rpc: Use NETLOGON_NEG_AUTH2_ADS_FLAGS
This allows this test to pass after "allow nt4 crypto" is removed from
the default environment.

We now only set it in ad_dc

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-12-14 11:55:18 +01:00
Andrew Bartlett
380ec1bb72 torture: Use DCERPC_SCHANNEL_AUTO in rpc.schannel.schannel2 test
This allows it to run against modern servers that do not permit NT4 crypto

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-12-14 11:55:18 +01:00
Andrew Bartlett
ecb1f569d7 torture: Add credentials downgrade and challenge reuse test to rpc.netlogon
This test confirms that the challenge set up is available
after the ServerAuthenticate has failed at the NT_STATUS_DOWNGRADE_DETECTED
check.

This is needed for NetApp ONTAP member servers.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-12-14 11:55:18 +01:00
Douglas Bagnall
6c9a185be2 s4-torture: better, failing, tests for GUID_from_string
These tests reveal that the current implementation accepts all kinds
of invalid GUIDs. In particular, we fail on these ones:

 "00000001-0002-0003-0405--060708090a0"
 "-0000001-0002-0003-0405-060708090a0b"
 "-0000001-0002-0003-04-5-060708090a0b"
 "d0000001-0002-0003-0405-060708090a-b"
 "00000001-  -2-0003-0405-060708090a0b"
 "00000001-0002-0003-0405- 060708090a0"
 "0x000001-0002-0003-0405-060708090a0b"
 "00000001-0x02-0x03-0405-060708090a0b"

This test is added to selftest/knownfail.

The test for valid string GUIDs is extended to test upper and mixed case
GUIDs.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-12-14 05:02:24 +01:00
Volker Lendecke
95353409ac torture: upload_printer_driver_file xfile->stdio
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-12-11 11:17:23 +01:00
Andrew Bartlett
bf7342bdf4 torture: Remove access to LSARPC via \\pipe\netlogon in rpc.netlogon for ManyGetDCName test
This exploited the fact that we had \\pipe\lsass in both netlogon.idl and lsarpc.idl

To do this, we reset the binding to a new endpoint and reset the association group.

We add a new test specifically for this "feature" that we can knownfail if we
break it to add other new functionality.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-12-01 05:54:22 +01:00
Günther Deschner
5adb1693bd s4-torture: Add LZX compressed cabinet test
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Nov 25 00:17:02 CET 2016 on sn-devel-144
2016-11-25 00:17:02 +01:00
Günther Deschner
6361559f41 s4-torture: Add MSZIP compressed cabinet test
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-11-24 20:24:27 +01:00
Günther Deschner
9ddf9bfb41 s4-torture: Add a validation test for uncompressed Cabinet files
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-11-24 20:24:26 +01:00
Günther Deschner
d5dd99a95f s4-torture: Introduce Cabinet ndr testsuite
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-11-24 20:24:26 +01:00
Günther Deschner
4d918d5100 s4-torture: test valid environment in spoolss_EnumMonitors level 2.
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2016-11-21 14:52:25 +01:00
Andreas Schneider
b1ade58ffe s4:torture: Add tortue test for AddPrinterDriverEx with COPY_FROM_DIRECTORY
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12415

Pair-Programmed-With: Guenther Deschner <gd@samba.org>

Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sun Nov 20 21:21:32 CET 2016 on sn-devel-144
2016-11-20 21:21:32 +01:00
Günther Deschner
e95012b01f s4-torture: add test to compare PRINTER_INFO_STRESS version and OSVersion
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-11-20 02:28:10 +01:00
Andreas Schneider
9de04626c0 s4:torture: Fix cleanup of the secrets object in session_key test
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12433

The test is known to be failing if sealing is turned on in some
circumstances. In this case a secret is created and then the function
dcerpc_fetch_session_key() fails. The secret is not removed!

We use torturesecret-%08x with random() to fill in the number. Sometimes
it happens that random() returns a number we already used. So we end up
trying to create a secret for an entry which already exists and run
into a collision

This change makes sure we always cleanup behind us and do not leave
secret objects we created.

Pair-Programmed-With: Guenther Deschner <gd@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Nov 17 22:30:36 CET 2016 on sn-devel-144
2016-11-17 22:30:36 +01:00
Andreas Schneider
31d21de548 s4:torture: Normalizes names in session_key test
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12433

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-11-17 18:36:19 +01:00
Andreas Schneider
80f7f568f8 s4:torture: Strip trailing whitespaces in session_key.c
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12433

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-11-17 18:36:19 +01:00
Günther Deschner
5462d2727d s4-torture: add test for winspool_AsyncGetPrinterDriverDirectory()
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Nov 15 05:09:31 CET 2016 on sn-devel-144
2016-11-15 05:09:31 +01:00
Günther Deschner
39ac61b993 s4-torture: add test for winspool_AsyncDeletePrintDriverPackage
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-11-15 01:14:23 +01:00
Günther Deschner
3268150b19 s4-torture: add test for winspool_AsyncCorePrinterDriverInstalled
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-11-15 01:14:22 +01:00
Günther Deschner
887e00cb0f s4-torture: add test for spoolss vs. iremotewinspool context handles
This test demonstrates that one cannot use a handle retrieved via
iremotewinspool in a spoolss context.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-11-15 01:14:22 +01:00
Günther Deschner
20b4b2bdca s4-torture: add test for winspool_AsyncGetPrinterData
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-11-15 01:14:22 +01:00
Günther Deschner
2c0350a04a s4-torture: add test for winspool_AsyncEnumPrinters
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-11-15 01:14:22 +01:00
Günther Deschner
b933b8ee86 s4-torture: add test for winspool_AsyncUploadPrinterDriverPackage
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-11-15 01:14:22 +01:00
Günther Deschner
01f859386d s4-torture: add test for winspool_SyncUnRegisterForRemoteNotifications.
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-11-15 01:14:22 +01:00
Günther Deschner
4b7097f833 s4-torture: add test for winspool_SyncRegisterForRemoteNotifications.
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-11-15 01:14:22 +01:00
Günther Deschner
8d0ad4126c s4-torture: add IRemoteWinspool rpc testsuite.
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-11-15 01:14:21 +01:00
Günther Deschner
b53b3b8e32 s4-torture: add torture_rpc_connection_with_binding()
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-11-15 01:14:21 +01:00
Günther Deschner
ef661b1bd9 s4-torture: Fix test_EnumPrinterDrivers for level 8 printer drivers.
Guenther

Pair-Programmed-With: Andreas Schneider <asn@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-11-11 22:57:23 +01:00
Günther Deschner
574dd65a81 s4-torture: add spoolss_SetPrinter ndr test to validate secdesc_ptr
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11197

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-11-11 22:57:22 +01:00
Günther Deschner
73f664710a spoolss: Use correct values for secdesc and devmode pointers
ULONG_PTR needs to be decoded as a uint3264 and not as a 'uint32 *'.

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

Guenther

Pair-Programmed-With: Andreas Schneider <asn@samba.org>

Signed-off-by: Guenther Deschner <gd@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-11-11 22:57:22 +01:00
Garming Sam
1b40bb69d1 tests/ridalloc_exop: Add a new suite of tests for RID allocation
This moves some tests from getnc_exop.py regarding RID sets as well as
adding new tests for actions on join.

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

Pair-programmed-with: Clive Ferreira <cliveferreira@catalyst.net.nz>

Signed-off-by: Andrew Bartlett <abartlet@samaba.org>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Clive Ferreira <cliveferreira@catalyst.net.nz>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-11-04 04:41:18 +01:00
Garming Sam
4c56793216 tests/getnc_exop: Finish a comment in getnc_exop.py
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12394
2016-11-01 21:39:19 +01:00
Bob Campbell
37aa11ce5b tests/getnc_exop: Improve the ridalloc test by performing an alloc against a new master
Currently we fail against ourselves due to rIDNextRid and
rIDPreviousAllocationPool normally being unset, despite being mandatory
attributes (being the only attributes in this situation).

Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
Pair-programmed-with: Clive Ferreira <cliveferreira@catalyst.net.nz>
Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12394
2016-11-01 21:39:19 +01:00
Stefan Metzmacher
5bad447768 s4:torture/rpc: concurrent dcerpc_echo_TestSleep requests require a connection with DCERPC_CONCURRENT_MULTIPLEX
Concurrent requests are only allowed if the client asked for
DCERPC_PFC_FLAG_CONC_MPX in the DCERPC_BIND.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-10-26 11:20:17 +02:00
Stefan Metzmacher
a701af1d76 s4:torture/rpc: add extra_flags to torture_rpc_connection_transport()
This can be used to pass DCERPC_CONCURRENT_MULTIPLEX, which
sends DCERPC_PFC_FLAG_CONC_MPX in the DCERPC_BIND.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-10-26 11:20:17 +02:00
Volker Lendecke
beda6d3d48 torture: Fix uninitialized variables
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Oct 20 02:48:30 CEST 2016 on sn-devel-144
2016-10-20 02:48:30 +02:00
Volker Lendecke
7d9f18f3f3 torture: Fix clang errors
h1.data is an array and as such always is != NULL, so it's always true

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Oct 19 05:11:25 CEST 2016 on sn-devel-144
2016-10-19 05:11:25 +02:00
David Disseldorp
f6f6263f1f torture/ioctl: test compression responses when unsupported
Confirm that Samba matches Windows Server 2016 ReFS behaviour here.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12144

Reported-by: Nick Barrett
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Oct  6 06:14:34 CEST 2016 on sn-devel-144
2016-10-06 06:14:34 +02:00
Günther Deschner
3487d6d78f werror: replace WERR_RPC_E_REMOTE_DISABLED with HRES_RPC_E_REMOTE_DISABLED
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-28 00:04:35 +02:00
Günther Deschner
5eb28d55a7 werror: replace WERR_UNKNOWN_LEVEL with WERR_INVALID_LEVEL in source4/torture/rpc/
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-28 00:04:35 +02:00
Günther Deschner
0bba91c7a7 werror: replace WERR_FRS_INVALID_SERVICE_PARAMETER with WERR_FRS_ERR_INVALID_SERVICE_PARAMETER in source4/torture/rpc/frsapi.c
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-28 00:04:34 +02:00
Günther Deschner
f1fb2d242d werror: replace WERR_SETUP_DOMAIN_CONTROLLER with WERR_NERR_SETUPDOMAINCONTROLLER in source4/torture/rpc/wkssvc.c
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-28 00:04:32 +02:00
Günther Deschner
a8f9e8d44e werror: replace WERR_SETUP_NOT_JOINED with WERR_NERR_SETUPNOTJOINED in source4/torture/rpc/wkssvc.c
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-28 00:04:32 +02:00
Günther Deschner
3f75e34c39 werror: replace WERR_SETUP_ALREADY_JOINED with WERR_NERR_SETUPALREADYJOINED in source4/torture/rpc/wkssvc.c
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-28 00:04:30 +02:00
Günther Deschner
f7081d5ce0 werror: replace WERR_NOT_CONNECTED with WERR_NERR_USENOTFOUND in source4/torture/rpc/wkssvc.c
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-28 00:04:26 +02:00
Günther Deschner
f05eb9b533 werror: replace WERR_USEREXISTS with WERR_NERR_USEREXISTS in source4/torture/rap/sam.c
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-28 00:04:26 +02:00
Günther Deschner
d8d7d67336 werror: replace WERR_USER_NOT_FOUND with WERR_NERR_USERNOTFOUND in source4/torture/rap/sam.c
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-28 00:04:26 +02:00
Günther Deschner
37853aef42 werror: replace WERR_INVALID_PARAM with WERR_INVALID_PARAMETER in source4/torture/
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-28 00:04:23 +02:00
Günther Deschner
076544ced2 werror: replace WERR_GENERAL_FAILURE with WERR_GEN_FAILURE in source4/torture/libnetapi/libnetapi.c
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-28 00:04:21 +02:00
Günther Deschner
dcdfc9937c werror: replace WERR_NOMEM with WERR_NOT_ENOUGH_MEMORY in source4/torture/rpc/spoolss.c
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-28 00:04:20 +02:00
Günther Deschner
2076c943bc werror: replace WERR_NOMEM with WERR_NOT_ENOUGH_MEMORY in source4/torture/drs/unit/prefixmap_tests.c
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-28 00:04:20 +02:00
Günther Deschner
329c169a09 werror: replace WERR_BADFID with WERR_INVALID_HANDLE in source4/torture/rpc/spoolss.c
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-28 00:04:18 +02:00
Günther Deschner
31ed3c0510 werror: replace WERR_BADFILE with WERR_FILE_NOT_FOUND in source4/torture/rpc/
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-28 00:04:17 +02:00
Günther Deschner
2c1075d63b werror: replace WERR_BADFILE with WERR_FILE_NOT_FOUND in source4/torture/ndr/winreg.c
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-28 00:04:17 +02:00
David Disseldorp
bff3e5efba torture/ioctl: switch sparse src/dest dup ext behaviour
Contrary to 2.3.8 FSCTL_DUPLICATE_EXTENTS_TO_FILE
STATUS_NOT_SUPPORTED: Target file is sparse, while source is a
non-sparse file.

...Windows Server 2016 RTM appears to respond the other way around.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Sep 23 00:23:09 CEST 2016 on sn-devel-144
2016-09-23 00:23:08 +02:00
David Disseldorp
710f06702b torture/smb2/ioctl: don't check for untruncated dest failure
This should fail, but passes against WS2016 RTM...

2.3.8 FSCTL_DUPLICATE_EXTENTS_TO_FILE Reply:
The destination range extends beyond the target file's allocation size.
The caller might need to increase the target's allocation size before
using FSCTL_DUPLICATE_EXTENTS_TO_FILE.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-22 20:40:08 +02:00
David Disseldorp
281ce600de torture/ioctl: add FSCTL_DUP_EXTENTS_TO_FILE tests
FSCTL_DUPLICATE_EXTENTS_TO_FILE is yet another copy offload mechanism,
this time only targeting COW FSes, where the request triggers a meta-
data only clone of the source range.

These tests attempt to cover most of the normal use cases, as well as
number of more exotic scenarios.

FILE_SUPPORTS_BLOCK_REFCOUNTING FS attribute presence is checked prior
to running the tests, so they will currently be skipped during Samba
self test (which lacks the flag).

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-22 20:40:08 +02:00
David Disseldorp
de7d7ac608 torture/ioctl: make sparse file support check generic
Rename test_ioctl_sparse_fs_supported() to test_ioctl_fs_supported() and
allow callers to query generic FileSystemAttributes flags via the new
fs_support_flags parameter.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-22 20:40:07 +02:00
Günther Deschner
872a18bbb4 s4-torture: parse spoolss ndr packets using iremotewinspool calls
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Thu Sep 22 16:16:30 CEST 2016 on sn-devel-144
2016-09-22 16:16:30 +02:00
Günther Deschner
5b1cc2c9c7 s4-torture: add IRemoteWinspool ndr testsuite.
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-09-22 12:29:28 +02:00
Günther Deschner
fac947194b s4-torture: add new test to compare "ServerSecurityDescriptor" and GetPrinter level 3.
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-09-22 12:29:27 +02:00
Günther Deschner
b78c96d878 s4-torture: test spoolss_SetPrinter level 3 on server handle.
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-09-22 12:29:27 +02:00
Günther Deschner
7ef26d3217 s4-torture: test GetPrinter level 3 on server handle (security descriptor query)
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-09-22 12:29:27 +02:00
Günther Deschner
c6d700ee1f spoolss: rename RPC_PrintNamedProperty to spoolss_PrintNamedProperty
We should try to avoid the RPC_ prefix in structs, enums for spoolss.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-09-22 12:29:27 +02:00
Günther Deschner
1e4ea50a4c spoolss: rename spoolss_RpcSendRecvBidiData to spoolss_SendRecvBidiData
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-09-22 12:29:27 +02:00
Günther Deschner
6476153069 spoolss: rename spoolss_RpcEnumJobNamedProperties to spoolss_EnumJobNamedProperties
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-09-22 12:29:27 +02:00
Günther Deschner
cdf958824e spoolss: rename spoolss_RpcDeleteJobNamedProperty to spoolss_DeleteJobNamedProperty
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-09-22 12:29:27 +02:00
Günther Deschner
17d94d0531 spoolss: rename spoolss_RpcSetJobNamedProperty to spoolss_SetJobNamedProperty
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-09-22 12:29:26 +02:00
Günther Deschner
d64b316fed spoolss: rename spoolss_RpcGetJobNamedPropertyValue to spoolss_GetJobNamedPropertyValue
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-09-22 12:29:26 +02:00
Günther Deschner
23f404b7f5 spoolss: rename spoolss_EnumPrintProcDataTypes to spoolss_EnumPrintProcessorDataTypes
This change makes automatic mapping for PAR->RPRN opcodes easier.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-09-22 12:29:26 +02:00
Günther Deschner
180fc18f49 s4-torture: also test NULL servername in spoolss_GetPrinterDriverPackagePath
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-11 19:57:26 +02:00
Günther Deschner
149da58ca6 s4-torture: use torture_comment in torture_rpc_connection()
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-11 19:57:26 +02:00
Günther Deschner
bed0d84550 s4-torture: add test for spoolss_LogJobInfoForBranchOffice
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-11 19:57:25 +02:00
Garming Sam
c0239a9bf6 torture: Remove unnecessary whitespace
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-09-08 10:46:08 +02:00
Günther Deschner
f9788a8424 s4-torture: also test CLUSCTL_CLUSTER_CHECK_VOTER_DOWN.
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-07 23:56:16 +02:00
Günther Deschner
4075d1c264 s4-torture: add test for CreateGroupEnum.
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-07 23:56:16 +02:00
Günther Deschner
8ce0aaef50 s4-torture: add test for CreateResTypeEnum().
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-07 23:56:16 +02:00
Günther Deschner
31d0ef96f8 s4-torture: test CLUSCTL_GROUP_GET_FLAGS GroupControl.
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-07 23:56:16 +02:00
Günther Deschner
058032c58b s4-torture: add test for clusapi_CreateGroupResourceEnum
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-07 23:56:16 +02:00
Günther Deschner
6ee7617207 s4-torture: add new tests for clusapi resourcetypes.
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-07 23:56:15 +02:00
Günther Deschner
71d3abbdc4 s4-torture: Fix logic errors in node and group control clusapi tests.
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-07 23:56:15 +02:00
Günther Deschner
be9a44a0f0 s4-torture: test multiple different cluster control codes.
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-07 23:56:15 +02:00
Günther Deschner
5bbaf81612 s4:torture:smb2 prefer torture_comment() to printf().
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
2016-09-07 12:09:17 +02:00
Günther Deschner
16592252cf s4:torture:smb2:acls: prefer torture_comment() to printf().
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
2016-09-07 12:09:17 +02:00
Günther Deschner
dcfe4df2ee s4:torture:smb2:scan: prefer torture_comment() to printf().
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
2016-09-07 12:09:16 +02:00
Günther Deschner
e9e109979c s4:torture:smb2:getinfo: prefer torture_comment() to printf().
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
2016-09-07 12:09:16 +02:00
Günther Deschner
d06d6bdc8c s4:torture:smb2:maxwrite: compile maxwrite test at least.
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
2016-09-07 12:09:16 +02:00
Günther Deschner
240ca83cc9 s4-torture: reformat TORTURE_SMB2 wscript_build list.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
2016-09-07 12:09:16 +02:00
Günther Deschner
1488f7e944 s4:torture:smb2:maxwrite: prefer torture_comment() to printf().
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
2016-09-07 12:09:16 +02:00
Günther Deschner
d3e4106420 source4/torture/rpc/testjoin.c: prefer torture_comment() over printf().
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
2016-09-07 12:09:16 +02:00
Günther Deschner
351a5f3875 s4:torture:smb2:connect: prefer torture_comment() to printf().
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
2016-09-07 12:09:16 +02:00
Günther Deschner
839cd98f48 s4-torture: cleanup torture_suite_add_ndr_pull_validate_test API.
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>

Autobuild-User(master): Uri Simchoni <uri@samba.org>
Autobuild-Date(master): Wed Sep  7 09:28:13 CEST 2016 on sn-devel-144
2016-09-07 09:28:13 +02:00
Günther Deschner
518b2a3f5f s4-torture: test GetPrinterData with server handle and 0 keylength.
This is what e.g. Windows 10 does a lot.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-09-06 23:17:21 +02:00
Andreas Schneider
a3852bc0b9 krb5_wrap: Remove unneded smb_krb5_free_error()
krb5_free_error() is availalbe in MIT and Heimdal. Both implementations
free the contents and the pointer. krb5_free_data_contents() is Heimdal
only. Which function you need to call depends.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-08-31 20:59:14 +02:00
Andreas Schneider
e8632e2af5 krb5_wrap: Rename kerberos_free_data_contents()
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-08-31 20:59:13 +02:00
Ralph Boehme
b72287514c vfs_acl_xattr|tdb: enforced settings when ignore system acls=yes
When "ignore system acls" is set to "yes, we need to ensure filesystem
permission always grant access so that when doing our own access checks
we don't run into situations where we grant access but the filesystem
doesn't.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12181

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Wed Aug 31 18:41:20 CEST 2016 on sn-devel-144
2016-08-31 18:41:20 +02:00
Andrew Bartlett
09580103fe ldb: Avoid multiple tiny allocations during full DB scan
LDB_UNPACK_DATA_FLAG_NO_VALUES_ALLOC allows us to consolidate some of these allocations

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>

Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
Autobuild-Date(master): Wed Aug 31 10:53:09 CEST 2016 on sn-devel-144
2016-08-31 10:53:09 +02:00
Ralph Boehme
946b93d0e3 s4/torture: tests for vfs_acl_xattr default ACL styles
Bug: https://bugzilla.samba.org/show_bug.cgi?id=12177

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-08-30 21:12:26 +02:00
Bob Campbell
cb243d86d8 tests/getnc_exop: Ensure that attribute list sorting is correct
With a binary search, this can only be tested on 3+ elements.

Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>

Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Garming Sam <garming@samba.org>
Autobuild-Date(master): Thu Aug 25 14:22:25 CEST 2016 on sn-devel-144
2016-08-25 14:22:24 +02:00
Garming Sam
36df826154 tests/getnc_exop: PartialAttrSetEx test (passes Windows, fails us)
This has an odd behaviour where PartialAttrSetEx does not respect the
incoming mapping. PartialAttrSetEx is not respected in Samba at all.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-08-25 10:32:09 +02:00
Garming Sam
e495d1b2ed tests/getnc_exop: Ensure the remote prefixmap is always used (name attr)
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-08-25 10:32:08 +02:00
Garming Sam
1f4ea1686f tests/getnc_exop: Ensure the remote prefixmap is always used (secret attrs)
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-08-25 10:32:08 +02:00
Garming Sam
7f3ef15075 tests/getnc_exop: Ensure that all attids are valid in a given PAS
On Windows this does not seem to fail, but causes silent errors.

Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-08-25 10:32:08 +02:00
Bob Campbell
1673590e8e tests/getnc_exop: Ensure we do the fallback if not given a PAS
This will cause silent errors in the translation, but as far as we know,
Windows will accept it just fine.

Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-08-25 10:32:08 +02:00
Amitay Isaacs
b077969a72 torture: Fix format-nonliteral warning
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12168

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-08-24 01:33:51 +02:00
Andreas Schneider
8aa97126a8 s4-torture: Enable tests for printer driver info level 8
Pair-Programmed-With: Guenther Deschner <gd@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Aug 23 05:00:13 CEST 2016 on sn-devel-144
2016-08-23 05:00:13 +02:00
Günther Deschner
e99c8b34fe s4-torture: add test for spoolss_GetPrinterDriverPackagePath().
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-08-23 01:06:25 +02:00
Günther Deschner
54eafcaa12 s4-torture: add test for spoolss_CorePrinterDriver().
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-08-23 01:06:24 +02:00
Uri Simchoni
5bf11f6f5b s4-smbtorture: pin copychunk exec right behavior
Add tests that show copychunk behavior when the
source and dest handles have execute right instead
of read-data right.

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

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2016-08-16 11:31:27 +02:00
Uri Simchoni
6ce0304eda seltest: allow opening files with arbitrary rights in smb2.ioctl tests
Separate file creation (which requires write access) from the
opening of the file for the test (which might be without write
access).

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

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2016-08-16 11:31:27 +02:00
Uri Simchoni
7dc9f58206 seltest: implicit FILE_READ_DATA non-reporting
This test (passes against Windows Server 2012R2) shows
that the implicit FILE_READ_DATA that is added whenever
FILE_EXECUTE is granted, is not reported back when querying
the handle.

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

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2016-08-16 11:31:27 +02:00
Uri Simchoni
55a9d35cab s4-selftest: add test for read access check
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12149

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2016-08-16 11:31:27 +02:00
Uri Simchoni
1b06acafa4 s4-selftest: add functions which create with desired access
Add functions which create a file or a directory with
specific desired access.

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

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2016-08-16 11:31:27 +02:00
Uri Simchoni
20b9a5bd74 s4-smbtorture: use standard macros in smb2.read test
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12149

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2016-08-16 11:31:27 +02:00
Andrew Bartlett
3ce5ad1e6c selftest: Move repl_schema test to a distinct OID prefix
We also take the chance to make it clearer that the number
being passed in should be unique.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-08-11 00:49:15 +02:00
Stefan Metzmacher
2e6860df71 s4:dsdb/schema: don't update the in memory schema->prefixmap without reloading the schema!
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12128

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-08-11 00:49:14 +02:00
Stefan Metzmacher
0a1627de6d s4:dsdb/schema: don't treat an older remote schema as SCHEMA_MISMATCH
It's perfectly valid to replicate from a partner with an older schema
version, otherwise schema changes would block any other replication
until every dc in the forest has the schema changes.

The avoids an endless loop trying to get schema in sync with the partner.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-08-11 00:49:14 +02:00
Stefan Metzmacher
386dbc428b s4:dsdb/schema: store struct dsdb_schema_info instead of a hexstring
This will simplify the schema checking in future.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-08-11 00:49:14 +02:00
Ralph Boehme
b17e2f5c74 s4/torture: add a test for ctdb-tombstrone-record deadlock
This tests for a possible deadlock between smbd and ctdb dealing with
ctdb tombstone records.

Commit 925625b528 explains the deadlock in
more details and contains the fix. It's a fix for a regression
introduced by the patch for bug 10008 (1cae59ce11).

If you ever want to use this test against that specific commit:

$ git checkout 925625b528
$ git cherry-pick THIS_COMMIT

This should not deadlock on a ctdb cluster.

$ git revert 925625b528

This will deadlock.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12005

Pair-Programmed-With: Michael Adam <obnox@samba.org>

Signed-off-by: Ralph Boehme <slow@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
2016-08-09 01:31:33 +02:00
Stefan Metzmacher
fed029a624 tests:samba_tool: pass stdout and stderr to assertCmdSuccess()
This allows us to generate better assert messages and give the
developer some ideas why the command wasn't able to run.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2016-08-04 18:26:06 +02:00
Andrew Bartlett
065dcc8a45 selftest: Merge alternate error codes into backupkey from backupkey_heimdal
This is from cea4a4b9b2 and
613d085a63ee554084cb99d2150921dd108f6b77

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Aug  3 21:43:21 CEST 2016 on sn-devel-144
2016-08-03 21:43:21 +02:00
Andrew Bartlett
664bde19bf torture/backupkey: Allow WERR_INVALID_ACCESS, WERR_INVALID_PARAM or WERR_INVALID_DATA
The use of the wrong key can still create structures that parse as a SID,
therefore we can sometimes get an unusual error, which becomes a flapping test

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-08-03 18:00:35 +02:00
Andrew Bartlett
f6e87188b6 ldb: Add ldb_unpack_data_only_attr_list_flags()
This function allows us to control allocation of memory during parse
of the packed ldb data.

This in turn can have an important performance impact as each
small allocation can have a large overhead

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2016-07-28 10:06:12 +02:00
Andrew Bartlett
00f77d10b6 torture: Add tests for ndr_push_struct_into_fixed_blob()
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-07-28 10:06:12 +02:00
Garming Sam
0555443213 msds_intid: Add test for schema linked attributes
This test only covers the forward link case.

NOTE: We can't confirm this against Windows because they prevent us from
modifying the schema for the schema classes.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-07-28 10:06:10 +02:00
Garming Sam
e0b6d6bb10 msds_intid: Add test for (non-schema) linked attributes
Prior to this, none of the linked attributes would be checked for their
ids.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-07-28 10:06:09 +02:00
Günther Deschner
497658fede s4-torture: fix compile of new NDR PAC tests with MIT Kerberos.
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sat Jul 23 09:50:46 CEST 2016 on sn-devel-144
2016-07-23 09:50:46 +02:00
Stefan Metzmacher
54d32c262b s4:kdc: provide a PAC_UPN_DNS_INFO element for logons
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-07-22 23:34:22 +02:00
Stefan Metzmacher
fbd0610953 s4:torture/remote_pac: verify the order of PAC elements
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-07-22 23:34:20 +02:00
Stefan Metzmacher
2d9958e46c auth/credentials: also do a shallow copy of the krb5_ccache.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-07-22 23:34:20 +02:00
Andrew Bartlett
88e968c9cc s4:torture/ndr: Add supplementalCredentials blob from Samba with the new SambaGPG blob
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-07-22 16:03:27 +02:00
Jeremy Allison
5e333b5a4e s4: torture: Don't crash if connections fail and treeXX variables are left as NULL.
Correctly log as torture fail.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2016-07-22 10:32:22 +02:00
Stefan Metzmacher
5437fdcffb s4:torture/ndr: add more krb5pac tests with PAC blobs from pkinit
We validate everything except the whole LOGON_INFO structure,
we even decrypt the PAC_CREDENTIALS_INFO blob and verify
PAC_CREDENTIAL_DATA_NDR and PAC_CREDENTIAL_NTLM_SECPKG.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Jul 21 01:07:28 CEST 2016 on sn-devel-144
2016-07-21 01:07:28 +02:00
Stefan Metzmacher
4e4cc8e91d s4:torture/ndr: make use of torture_suite_add_ndr_pull_validate_test() in krb5pac when possible
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
2016-07-20 21:27:19 +02:00
Andrew Bartlett
a6f672d69f torture: Add another sample of a PAC that broke the old PAC_UPN_DNS_INFO handling
This is included because this sample helped us addres issues in the previous attempt at
handling PAC_UPN_DNS_INFO correctly, and I have Tris's permission to include this in our
tests.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-07-20 21:27:19 +02:00
Günther Deschner
930dc1a12a s4-torture: add another krb5pac buffer to the ndr test.
This one nicely demonstrates that the strings are really non-null terminated.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-07-20 21:27:19 +02:00
Günther Deschner
7741e02867 s4-torture: add ndr krb5pac testsuite.
Someone changed the PAC buffer union without adding proper tests, now we
sometimes fail to parse the PAC completely due to that...

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-07-20 21:27:19 +02:00
Andrew Bartlett
7eab12fa63 s4:torture/ndr: Add supplementalCredentials blob from Win2012R2
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-07-20 21:27:18 +02:00
Andrew Bartlett
9e8228692d s4:torture/ndr: Add supplementalCredentials blobs from alpha13 and release_4_1_0rc3
This coveres the case without AES keys, and before the IDL was changed for SambaGPG support

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-07-20 21:27:18 +02:00
Stefan Metzmacher
c30dcaee4c s4:torture/ndr: add validation checks for strange supplementalCredentials blobs
From the mail to dochelp:

  I've also got cases (where I created an account with
  UF_NORMAL_ACCOUNT|UF_ACCOUNTDISABLE|UF_SMARTCARD_REQUIRED
  in the LDAP add) with the following strange blobs:

  One time:
  [0000] 00 00 00 00 00 00 00 00 00 00 00 00 00

  and once:
  [0000] 00 00 00 00 00 00 00 00 00 00 00 00 53

  The original issue I reported was the following, a user was created
  with a password and then userAccountControl was changed to
  UF_NORMAL_ACCOUNT|UF_SMARTCARD_REQUIRED. In that case I'm getting:

  [0000] 00 00 00 00 62 00 00 00   00 00 00 00 20 00 20 00
  [0010] 20 00 20 00 20 00 20 00   20 00 20 00 20 00 20 00
  [0020] 20 00 20 00 20 00 20 00   20 00 20 00 20 00 20 00
  [0030] 20 00 20 00 20 00 20 00   20 00 20 00 20 00 20 00
  [0040] 20 00 20 00 20 00 20 00   20 00 20 00 20 00 20 00
  [0050] 20 00 20 00 20 00 20 00   20 00 20 00 20 00 20 00
  [0060] 20 00 20 00 20 00 20 00   20 00 20 00 50 00 30

As you see the last byte (unknown3) is always different on Windows,
but always 0x00 from Samba, so I used 0x00 in order to allow the
test to pass.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
2016-07-20 21:27:18 +02:00
Günther Deschner
5690bc9095 s4-torture: rename torture_suite_add_ndr_pullpush_test to torture_suite_add_ndr_pull_validate_test.
Hoping the new name is not as confusing as the old name.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-07-20 21:27:17 +02:00
Andrew Bartlett
0b3f2c659a selftest: Disable all replication during most replication tests
Rather than just disabling inbound replication, consider that there may be another server
in the test network, and ensure we do not replicate to or from it either.

replica_sync.py is omitted, as it tests some more subtle variations
of the DISABLE_INBOUND_REPL flag.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2016-07-19 13:41:11 +02:00
Andrew Bartlett
e359875d00 selftest: Ensure we can call DRSUAPI_EXOP_REPL_OBJ with replication disabled
We add the forced flag, so that we can leave replication otherwise disabled

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2016-07-19 13:41:11 +02:00
Andrew Bartlett
fcb13cb640 selftest: Disable replication before doing forced pre-test replicate
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2016-07-19 13:41:11 +02:00
Andrew Bartlett
3a787f45cf selftest: Make repl_move more robust by disabling replication before the test
We do this before we ensure the two DCs are in sync, and then force the sync

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2016-07-19 13:41:11 +02:00
Andrew Bartlett
6145da66ef selftest: Make repl_schema more robust by disabling replication before the test
We also ensure the two DCs are in sync before the test starts

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2016-07-19 13:41:11 +02:00
Christof Schmitt
6bb41cf396 smbtorture: Correctly initialize notify request in smb2.notify.tree
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-07-18 15:14:11 +02:00
Douglas Bagnall
9d8e7666c0 drs tests: querying linked attribute over DRS
Without the deactivated links control, we assert certain conditions over DRS
instead.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-07-15 10:01:28 +02:00
Christof Schmitt
f6d4380a9d selftest: Add tunable for smb2.maxfid limit
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-07-14 02:06:10 +02:00
Christof Schmitt
f9db6fb893 smbtorture: Add smb2.maxfid
This is the same as base.maxfid, but for the SMB2 protocol: Keep opening
file handles until an error is returned, print the number of file
handles opened and finally close the file handles again.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-07-13 03:00:15 +02:00
Garming Sam
cea4a4b9b2 tests: Allow alternative error code for backupkey test
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-07-12 23:24:13 +02:00
Stefan Metzmacher
769230a49a s4:torture/drs: verify the whole metadata array to be the same in the repl_move tests
We've removed the difference compared to Windows and store metadata stamps for
some empty attributes.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-07-08 10:01:20 +02:00
Andreas Schneider
860d465e2b s4-torture: Add AES and RC4 enctype checks
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlet <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Jul  6 19:06:19 CEST 2016 on sn-devel-144
2016-07-06 19:06:18 +02:00
Andreas Schneider
bc3473e67c s4-torture: Add torture_check_krb5_error() function
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlet <abartlet@samba.org>
2016-07-06 15:35:17 +02:00
Garming Sam
978bc8681e kerberos: Return enc data on PREAUTH_FAILED
Without the enc data, Windows clients will perform two AS-REQ causing the password
lockout count to increase by two instead of one.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11539

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Jul  5 10:52:32 CEST 2016 on sn-devel-144
2016-07-05 10:52:32 +02:00
Ralph Boehme
2db5c10ac5 s4/torture: add a test for dosmode and hidden files
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11992

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-06-25 18:47:17 +02:00
Andreas Schneider
5499cff201 s3-torture: Do some code hygiene in the ldb test
Coverity is confused if in a expresion we use = and not ==.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-06-22 19:25:20 +02:00
Martin Schwenke
92cfd1e9b8 torture: Add tests for trim_string()
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Ralph Boehme <slow@samba.org>
2016-06-20 00:47:30 +02:00
Jeremy Allison
747de99fcd s4: torture: Added raw readX test to ensure 'reserved' fields are zero.
Passes against Win2k12+, and smbd with the previous patch.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>

Autobuild-User(master): Alexander Bokovoy <ab@samba.org>
Autobuild-Date(master): Sat Jun 18 19:32:22 CEST 2016 on sn-devel-144
2016-06-18 19:32:22 +02:00
Garming Sam
2bb8e183fd tests/drs: change sort order in tests to match Windows
Although we attempted to sort by GUID based on DRSR, it is actually
sorted by the ndr packed GUID.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11960
2016-06-17 14:13:18 +02:00
Garming Sam
4de5e7da9c tests/drs: assert sorted identifier GUIDs across getncchanges
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11960
2016-06-17 14:13:18 +02:00
Garming Sam
3f0be46b91 tests/drs: make cleanup more robust
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11960
2016-06-17 14:13:18 +02:00
Garming Sam
ed6a423232 tests/drs: extend getnc_exop test to check linked attributes
Assert that linked attributes propagate across DRS and come in a
particular sorted order.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11960
2016-06-17 14:13:18 +02:00
Andrew Bartlett
7f651d344b selftest: Remove print attribute from getnc_exop test
This otherwise fills the logs with every object

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-06-16 04:40:14 +02:00
Garming Sam
4b16cbda46 tests/drs: cleanup some whitespace
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11960
2016-06-16 04:40:13 +02:00
Andrew Bartlett
2d79b61731 samba-tool: Improve fsmo handling
This makes a clear seperation between data and display variables
and improves the tests.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-06-16 04:40:12 +02:00
Andrew Bartlett
9173f2027c selftest: Rebase DrsBaseTestCase on SambaToolCmdTest
This then makes SambaToolCmdTest based on BlackboxTestCase.

This allows us to use better command output testing in the fsmo tests

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-06-16 04:40:12 +02:00
Andrew Bartlett
c4afb1d3bd selftest: Add a reverse variation to ReplicateMoveObject3
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Samba <garming@catalyst.net.nz>
2016-06-07 10:28:11 +02:00
Andrew Bartlett
889f33d47f selftest: Assert replPropertyMetaData values before and after replication
This covers renames, addition of attributes, and the delete.

We also confirm the results via DRS.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-06-07 10:28:11 +02:00
Andrew Bartlett
9dcc62eb78 selftest: Add more tests to cover attribute changes vs DN renames
This covers a bug where unrelated attribute changes would reverse a rename

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz
2016-06-07 10:28:10 +02:00
Andrew Bartlett
f7eb865cd9 selftest: Assert that name, the RDN attribute and actual RDN are in sync
This allows us to catch such errors here, rather than just on dbcheck later

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz
2016-06-06 16:36:23 +02:00
Andrew Bartlett
39ac5ad90f selftest: Add another test case to replica_sync test
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz
2016-06-06 16:36:23 +02:00
Andrew Bartlett
ca37c7146c selftest/drs: Show we return the correct 3 objects for DRSUAPI_EXOP_FSMO_RID_ALLOC
This does not depend on DRSUAPI_DRS_GET_ANC.

This test is not new, but it was not previously being run.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-06-06 16:36:23 +02:00
Andrew Bartlett
c5ed894006 selftest: initial version of new repl_move test
This tests complex rename and modify combinations in a way that
demonstrated a number of replication failures, due to incorrect
handling in Samba when the parent of the record changes.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz
2016-06-06 16:36:23 +02:00
Andrew Bartlett
ee80da56b9 repl: Retry replication of the schema on WERR_DS_DRA_SCHEMA_MISMATCH
This makes us replicate the schema, and then go back to what we asked to replicate
originally, when the schema changes.  This should make the replication much more
robust after schema changes

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-06-06 08:50:09 +02:00
Andrew Bartlett
c6ed444ac7 selftest: Make replica_sync test pass against Windows 2012R2
The tests that invoke --local will not pass, naturally, but otherwise it works

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-06-06 08:50:09 +02:00
Andrew Bartlett
65a35acbf3 repl: Pass in the full partition DN to dsdb_replicated_objects_convert()
When we were processing an EXOP, we would pass in a DN specific to that
operation, but this stopped repl_meta_data from finding the parent object

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-06-06 08:50:09 +02:00
Andrew Bartlett
5c6a97769c selftest: Use random OIDs from under the Samba OID arc
The urgent_replication.py test used the OID of uid, and this caused
other tests to fail

The other random OIDs should have been from under our arc, not under
iso.member-body.us

We split up the range a little to avoid some of the birthday paradox,
in the tests that create multiple OIDs.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz
2016-06-06 08:50:08 +02:00
Andrew Bartlett
90665713ab repl: Do not consider userPassword differences to matter in rpc.dssync
userPassword is also not shown over LDAP

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-06-02 16:36:15 +02:00
Andrew Bartlett
b816ca3e0f torture: Only walk over objects actually converted in drs.dssync
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-06-02 16:36:15 +02:00
Andreas Schneider
db23c0fa97 torture: Add a dummy test for MIT Kerberos case
This is a preperatory test to add tests for the MIT KDC.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2016-06-02 12:48:13 +02:00
Andreas Schneider
38faafef23 torture: Fix trailing whitespaces in krb5 tests
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2016-06-02 12:48:13 +02:00
Dirk Godau
6ded4f5230 drsuapi tests for DsBind with w2k8
These are marked as known_fail pending the next patch ("Extend DsBind
and DsGetDomainControllerInfo to work with w2k8").

Signed-off-by: Dirk Godau <voidswitch@gmail.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-05-26 02:44:31 +02:00
Uri Simchoni
b2b951d14f heimdal make kvno unisgned internally
The folks at heimdal didn't like the patch in
commit 6379737b7d and insisted
that kvno should remain unsigned internally, even though it is
encoded as signed in packets. This patch reverts some of the
unsigned->signed changes in that commit, and resolves conversion
issues - in order to be aligned with upstream Heimdal.

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue May 24 03:00:39 CEST 2016 on sn-devel-144
2016-05-24 03:00:39 +02:00
Michael Adam
a7fc5e0f4d s4:torture:nbench: fix O3 error unused result of asprintf
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
2016-05-13 00:16:16 +02:00
Michael Adam
ea668a28e0 s4:torture:rpc:samlogon: fix O3 error unused result of asprintf
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
2016-05-13 00:16:16 +02:00
Michael Adam
080946ce91 s4:torture:basic:delete: fix O3 error unused result of asprintf
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
2016-05-13 00:16:16 +02:00
Michael Adam
ef63ebdcb7 s4:torture:basic:dir: fix O3 error unused result of asprintf
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
2016-05-13 00:16:16 +02:00
Michael Adam
f7256914d0 s4:torture:basic: fix O3 error unused result of write
in test_utable

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
2016-05-13 00:16:16 +02:00
Michael Adam
99182346a3 s4:torture:basic:misc: fix O3 error unused result of asprintf
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
2016-05-13 00:16:16 +02:00
Michael Adam
ebfbf6bc27 s4:torture:basic: fix O3 error unused result of asprintf
in run_opentest()

While fixing this, also convert to using talloc_asprintf instead.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
2016-05-13 00:16:16 +02:00
Uri Simchoni
6379737b7d heimdal: encode/decode kvno as signed integer
This patch changes the encoding/decoding of kvno (key version number)
in blobs and packets to signed integer, for compatibility with Windows.
Reportedly, MIT Kerberos does the same.

This patch effectively reverts commit 1124c4872dfb81bec9c4b527b8927ca35e39a599
in the heimdal tree.

According to the Kerberos spec (RFC 4120 5.2.9), the kvno field
in encrypted data object is an unsigned integer that fits in
32 bits. The Heimdal Kerberos component bundled with Samba
conforms to this. However, Windows deviates from the standard
and encodes kvno as a signed integer, and this creates
interoperability issues.

ASN.1 DER has no special encoding for unsigned integer. A 32-bit
unsigned integer is encoded as a signed integer, so while a signed
32-bit integer (covering the range of -0x80000000..0x7fffffff) is
encoded using up to 4 bytes, an unsigned integer (covering
0..0xffffffff) could require 5 bytes.

Normally, kvno for a given account starts at 1 and increments on
password changes. Kerberos defined this as unsigned because there's
no meaning for negative version numbers, so the standard writers figured
4 billion versions is better than 2 billion. It was not
expected for a kvno to really go past 0x7fffffff and the disctinction
usually does not matter. However, RODCs use kvnos which
have the most-significant bit set.

In Active Directory, RODCs have a private secret for the krbtgt,
because the assumption is that the RODC is less secure, and
recovering the domain krbtgt secret from the RODC would compromise
the security of the entire domain. The kvno field is being used
to identify the private krbtgt account that owns the key - the
upper 16 bits are the RODC id, and the lower 16 bits identify
the key version number for this specific RODC. It's common to
have an RODC id greater than 0x8000, and therefore to have a
kvno larger than 0x7fffffff, which would be DER-encoded using
5 bytes.

Windows encodes kvno as signed integer - basically taking the
32 bits and treating them as a signed integer rather than an
unsigned integer. This means that in Windows a kvno can
always be encoded using 4 bytes, and Windows DCs reject a kvno
encoded using more than 4 bytes without even generating an error
response (the DC assumes it's an attack).

Heimdal re-encodes the TGT when it creates a TGS request. Obviously
it cannot decode and encode the encrypted parts but it does re-encode
the plain parts, which include the kvno. That leads to a 5-byte
kvno in the TGS request, which is rejected without an error
response.

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

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Sat May  7 21:14:21 CEST 2016 on sn-devel-144
2016-05-07 21:14:21 +02:00
Volker Lendecke
93b982faad lib: Give base64.c its own .h
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-05-04 01:28:23 +02:00
Noel Power
39bbd40cda fix Invalid read of size 8
running rpc.dsgetinfo.DsGetReplicaInfo results in the following valgrind
trace

==14966== Invalid read of size 8
==14966==    at 0x88B2D5D: dcerpc_binding_handle_call (binding_handle.c:538)
==14966==    by 0x978F33B: dcerpc_drsuapi_DsUnbind_r (ndr_drsuapi_c.c:319)
==14966==    by 0x2E9F19: torture_dsgetinfo_tcase_teardown (dsgetinfo.c:431)
==14966==    by 0x95536EF: internal_torture_run_test (torture.c:452)
==14966==    by 0x9553A4B: torture_run_test_restricted (torture.c:542)
==14966==    by 0x260074: run_matching (smbtorture.c:110)
==14966==    by 0x25FF36: run_matching (smbtorture.c:95)
==14966==    by 0x260195: torture_run_named_tests (smbtorture.c:143)
==14966==    by 0x261E14: main (smbtorture.c:665)
==14966==  Address 0x28 is not stack'd, malloc'd or (recently) free'd
==14966==

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Apr 25 14:01:33 CEST 2016 on sn-devel-144
2016-04-25 14:01:33 +02:00
Noel Power
417a58a79f s4:torture:vfs: fix Invalid read of size 8 valgrind valgrind error (and segv)
when running smbtorture test
'vfs.fruit.SMB2/CREATE context AAPL.SMB2/CREATE context AAPL'
(on non-osx system) the following valgrind errors occur

==2419== Invalid read of size 8
==2419==    at 0x4055EA: test_aapl (fruit.c:1939)
==2419==    by 0x48B452: wrap_simple_1smb2_test (smb2.c:52)
==2419==    by 0x955368F: internal_torture_run_test (torture.c:442)
==2419==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==2419==    by 0x26013F: run_matching (smbtorture.c:110)
==2419==    by 0x260001: run_matching (smbtorture.c:95)
==2419==    by 0x260001: run_matching (smbtorture.c:95)
==2419==    by 0x260260: torture_run_named_tests (smbtorture.c:143)
==2419==    by 0x261EDF: main (smbtorture.c:665)
==2419==  Address 0x10 is not stack'd, malloc'd or (recently) free'd
==2419==
===============================================================
INTERNAL ERROR: Signal 11 in pid 2419 (4.2.4)
Please read the Trouble-Shooting section of the Samba HOWTO
===============================================================
PANIC: internal error

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-04-25 10:35:16 +02:00
Noel Power
8d998db788 s4:torture:libnet: fix 'Syscall param writev(vector[...])' valgrind error
smbtorture test  net.api.delshare.api.delshare generates the following
valgrind trace

==29209== Syscall param writev(vector[...]) points to uninitialised byte(s)
==29209==    at 0xFBA2C87: writev (in /lib64/libc-2.19.so)
==29209==    by 0x106CB033: writev_handler (async_sock.c:340)
==29209==    by 0xF67812A: ??? (in /usr/lib64/libtevent.so.0.9.26)
==29209==    by 0xF6765F6: ??? (in /usr/lib64/libtevent.so.0.9.26)
==29209==    by 0xF6727FC: _tevent_loop_once (in /usr/lib64/libtevent.so.0.9.26)
==29209==    by 0xF673ACE: tevent_req_poll (in /usr/lib64/libtevent.so.0.9.26)
==29209==    by 0x5D19325: tevent_req_poll_ntstatus (tevent_ntstatus.c:109)
==29209==    by 0x88B2E0D: dcerpc_binding_handle_call (binding_handle.c:556)
==29209==    by 0xBC6B4A1: dcerpc_srvsvc_NetShareAdd_r (ndr_srvsvc_c.c:3327)
==29209==    by 0x5990D8: test_addshare (libnet_share.c:194)
==29209==    by 0x5992D5: torture_delshare (libnet_share.c:228)
==29209==    by 0x9553F62: wrap_simple_test (torture.c:632)
==29209==    by 0x955368F: internal_torture_run_test (torture.c:442)
==29209==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==29209==    by 0x26013F: run_matching (smbtorture.c:110)
==29209==    by 0x260001: run_matching (smbtorture.c:95)
==29209==    by 0x260260: torture_run_named_tests (smbtorture.c:143)
==29209==    by 0x261EDF: main (smbtorture.c:665)
==29209==  Address 0x1887fd16 is 598 bytes inside a block of size 1,325 alloc'd
==29209==    at 0x4C29110: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==29209==    by 0xF464A73: _talloc_pooled_object (in /usr/lib64/libtalloc.so.2.1.5)
==29209==    by 0xF67366D: _tevent_req_create (in /usr/lib64/libtevent.so.0.9.26)
==29209==    by 0xB0D49FF: smb1cli_req_create (smbXcli_base.c:1322)
==29209==    by 0xB0E1E6D: smb1cli_trans_send (smb1cli_trans.c:512)
==29209==    by 0xB0ED47D: tstream_smbXcli_np_readv_trans_start (tstream_smbXcli_np.c:901)
==29209==    by 0xB0EC847: tstream_smbXcli_np_writev_write_next (tstream_smbXcli_np.c:578)
==29209==    by 0xB0EC4D7: tstream_smbXcli_np_writev_send (tstream_smbXcli_np.c:505)
==29209==    by 0xC259DFA: tstream_writev_send (tsocket.c:695)
==29209==    by 0xC25AD64: tstream_writev_queue_trigger (tsocket_helpers.c:513)
==29209==    by 0xF673023: tevent_common_loop_immediate (in /usr/lib64/libtevent.so.0.9.26)
==29209==    by 0xF677EED: ??? (in /usr/lib64/libtevent.so.0.9.26)
==29209==    by 0xF6765F6: ??? (in /usr/lib64/libtevent.so.0.9.26)
==29209==    by 0xF6727FC: _tevent_loop_once (in /usr/lib64/libtevent.so.0.9.26)
==29209==    by 0xF673ACE: tevent_req_poll (in /usr/lib64/libtevent.so.0.9.26)
==29209==    by 0x5D19325: tevent_req_poll_ntstatus (tevent_ntstatus.c:109)
==29209==    by 0x88B2E0D: dcerpc_binding_handle_call (binding_handle.c:556)
==29209==    by 0xBC6B4A1: dcerpc_srvsvc_NetShareAdd_r (ndr_srvsvc_c.c:3327)
==29209==    by 0x5990D8: test_addshare (libnet_share.c:194)
==29209==    by 0x5992D5: torture_delshare (libnet_share.c:228)
==29209==    by 0x9553F62: wrap_simple_test (torture.c:632)
==29209==    by 0x955368F: internal_torture_run_test (torture.c:442)
==29209==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==29209==    by 0x26013F: run_matching (smbtorture.c:110)
==29209==    by 0x260001: run_matching (smbtorture.c:95)
==29209==    by 0x260260: torture_run_named_tests (smbtorture.c:143)
==29209==    by 0x261EDF: main (smbtorture.c:665)

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-04-25 10:35:16 +02:00
Noel Power
0ae25fff0a s4:torture:libnet: fix 'Conditional jump or move' valgrind error
smbtorture test net.domopen.domopen generated the following valgrind
trace.

==29054== Conditional jump or move depends on uninitialised value(s)
==29054==    at 0x9788D31: libnet_DomainOpen_send (libnet_domain.c:617)
==29054==    by 0x9788E01: libnet_DomainOpen (libnet_domain.c:676)
==29054==    by 0x595F5D: test_domainopen (domain.c:41)
==29054==    by 0x5961AD: torture_domainopen (domain.c:101)
==29054==    by 0x9553F62: wrap_simple_test (torture.c:632)
==29054==    by 0x955368F: internal_torture_run_test (torture.c:442)
==29054==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==29054==    by 0x26013F: run_matching (smbtorture.c:110)
==29054==    by 0x260001: run_matching (smbtorture.c:95)
==29054==    by 0x260260: torture_run_named_tests (smbtorture.c:143)
==29054==    by 0x261EDF: main (smbtorture.c:665)
==29054==
==29054== Conditional jump or move depends on uninitialised value(s)
==29054==    at 0x9788D95: libnet_DomainOpen_recv (libnet_domain.c:648)
==29054==    by 0x9788E1D: libnet_DomainOpen (libnet_domain.c:677)
==29054==    by 0x595F5D: test_domainopen (domain.c:41)
==29054==    by 0x5961AD: torture_domainopen (domain.c:101)
==29054==    by 0x9553F62: wrap_simple_test (torture.c:632)
==29054==    by 0x955368F: internal_torture_run_test (torture.c:442)
==29054==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==29054==    by 0x26013F: run_matching (smbtorture.c:110)
==29054==    by 0x260001: run_matching (smbtorture.c:95)
==29054==    by 0x260260: torture_run_named_tests (smbtorture.c:143)

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-04-25 10:35:16 +02:00
Noel Power
ef461a3fef s4:torture:smb2: fix 'Use of uninitialised value of size 8' valgrind error.
smbtorture test smb2.streams.attributes.attributes generates the following
valgrind trace,

==17997== Use of uninitialised value of size 8
==17997==    at 0x8F005C2: _samba_rijndaelEncrypt (rijndael-alg-fst.c:957)
==17997==    by 0x8EFF24C: samba_AES_encrypt (aes.c:60)
==17997==    by 0x8F01A74: aes_cmac_128_update (aes_cmac_128.c:151)
==17997==    by 0xB0D11B7: smb2_signing_sign_pdu (smb2_signing.c:74)
==17997==    by 0xB0D984A: smb2cli_req_compound_submit (smbXcli_base.c:3062)
==17997==    by 0x5AFD5F5: smb2_transport_send (transport.c:237)
==17997==    by 0x5B030F3: smb2_close_send (close.c:42)
==17997==    by 0x5B0358A: smb2_close (close.c:78)
==17997==    by 0x5B087B3: smb2_util_close (util.c:40)
==17997==    by 0x521457: test_stream_attributes (streams.c:1750)
==17997==    by 0x48B452: wrap_simple_1smb2_test (smb2.c:52)
==17997==    by 0x955368F: internal_torture_run_test (torture.c:442)
==17997==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==17997==    by 0x26013F: run_matching (smbtorture.c:110)
==17997==    by 0x260001: run_matching (smbtorture.c:95)
==17997==    by 0x260001: run_matching (smbtorture.c:95)
==17997==    by 0x260260: torture_run_named_tests (smbtorture.c:143)
==17997==    by 0x261EDF: main (smbtorture.c:665)
==17997==
==17997== Use of uninitialised value of size 8
==17997==    at 0x8F005DE: _samba_rijndaelEncrypt (rijndael-alg-fst.c:958)
==17997==    by 0x8EFF24C: samba_AES_encrypt (aes.c:60)
==17997==    by 0x8F01A74: aes_cmac_128_update (aes_cmac_128.c:151)
==17997==    by 0xB0D11B7: smb2_signing_sign_pdu (smb2_signing.c:74)
==17997==    by 0xB0D984A: smb2cli_req_compound_submit (smbXcli_base.c:3062)
==17997==    by 0x5AFD5F5: smb2_transport_send (transport.c:237)
==17997==    by 0x5B030F3: smb2_close_send (close.c:42)
==17997==    by 0x5B0358A: smb2_close (close.c:78)
==17997==    by 0x5B087B3: smb2_util_close (util.c:40)
==17997==    by 0x521457: test_stream_attributes (streams.c:1750)
==17997==    by 0x48B452: wrap_simple_1smb2_test (smb2.c:52)
==17997==    by 0x955368F: internal_torture_run_test (torture.c:442)
==17997==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==17997==    by 0x26013F: run_matching (smbtorture.c:110)
==17997==    by 0x260001: run_matching (smbtorture.c:95)
==17997==    by 0x260001: run_matching (smbtorture.c:95)
==17997==    by 0x260260: torture_run_named_tests (smbtorture.c:143)
==17997==    by 0x261EDF: main (smbtorture.c:665)

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-04-25 10:35:16 +02:00
Noel Power
4045931f67 s4:torture:smb2: fix 'Use of uninitialised value of size 8' valgrind error.
smbtorture test smb2.streams.rename2.rename2 generates the following valgrind
trace

==17379== Use of uninitialised value of size 8
==17379==    at 0x8F005C2: _samba_rijndaelEncrypt (rijndael-alg-fst.c:957)
==17379==    by 0x8EFF24C: samba_AES_encrypt (aes.c:60)
==17379==    by 0x8F01A74: aes_cmac_128_update (aes_cmac_128.c:151)
==17379==    by 0xB0D11B7: smb2_signing_sign_pdu (smb2_signing.c:74)
==17379==    by 0xB0D984A: smb2cli_req_compound_submit (smbXcli_base.c:3062)
==17379==    by 0x5AFD5F5: smb2_transport_send (transport.c:237)
==17379==    by 0x5B030F3: smb2_close_send (close.c:42)
==17379==    by 0x5B0358A: smb2_close (close.c:78)
==17379==    by 0x5B087B3: smb2_util_close (util.c:40)
==17379==    by 0x51FBA7: test_stream_rename2 (streams.c:1381)
==17379==    by 0x48B452: wrap_simple_1smb2_test (smb2.c:52)
==17379==    by 0x955368F: internal_torture_run_test (torture.c:442)
==17379==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==17379==    by 0x26013F: run_matching (smbtorture.c:110)
==17379==    by 0x260001: run_matching (smbtorture.c:95)
==17379==    by 0x260001: run_matching (smbtorture.c:95)
==17379==    by 0x260260: torture_run_named_tests (smbtorture.c:143)
==17379==    by 0x261EDF: main (smbtorture.c:665)
==17379==
==17379== Use of uninitialised value of size 8
==17379==    at 0x8F005DE: _samba_rijndaelEncrypt (rijndael-alg-fst.c:958)
==17379==    by 0x8EFF24C: samba_AES_encrypt (aes.c:60)
==17379==    by 0x8F01A74: aes_cmac_128_update (aes_cmac_128.c:151)
==17379==    by 0xB0D11B7: smb2_signing_sign_pdu (smb2_signing.c:74)
==17379==    by 0xB0D984A: smb2cli_req_compound_submit (smbXcli_base.c:3062)
==17379==    by 0x5AFD5F5: smb2_transport_send (transport.c:237)
==17379==    by 0x5B030F3: smb2_close_send (close.c:42)
==17379==    by 0x5B0358A: smb2_close (close.c:78)
==17379==    by 0x5B087B3: smb2_util_close (util.c:40)
==17379==    by 0x51FBA7: test_stream_rename2 (streams.c:1381)
==17379==    by 0x48B452: wrap_simple_1smb2_test (smb2.c:52)
==17379==    by 0x955368F: internal_torture_run_test (torture.c:442)
==17379==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==17379==    by 0x26013F: run_matching (smbtorture.c:110)
==17379==    by 0x260001: run_matching (smbtorture.c:95)
==17379==    by 0x260001: run_matching (smbtorture.c:95)
==17379==    by 0x260260: torture_run_named_tests (smbtorture.c:143)
==17379==    by 0x261EDF: main (smbtorture.c:665)
==17379==

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-04-25 10:35:16 +02:00
Noel Power
37696e9bde s4:torture:smb2: fix 'Use of uninitialised value of size 8' valgrind error.
smbtorture test smb2.streams.names.names generated the following
valgrind trace.

(../source4/torture/smb2/streams.c:791) testing stream names
==17238== Use of uninitialised value of size 8
==17238==    at 0x8F005C2: _samba_rijndaelEncrypt (rijndael-alg-fst.c:957)
==17238==    by 0x8EFF24C: samba_AES_encrypt (aes.c:60)
==17238==    by 0x8F01A74: aes_cmac_128_update (aes_cmac_128.c:151)
==17238==    by 0xB0D11B7: smb2_signing_sign_pdu (smb2_signing.c:74)
==17238==    by 0xB0D984A: smb2cli_req_compound_submit (smbXcli_base.c:3062)
==17238==    by 0x5AFD5F5: smb2_transport_send (transport.c:237)
==17238==    by 0x5B030F3: smb2_close_send (close.c:42)
==17238==    by 0x5B0358A: smb2_close (close.c:78)
==17238==    by 0x5B087B3: smb2_util_close (util.c:40)
==17238==    by 0x51E480: test_stream_names (streams.c:1053)
==17238==    by 0x48B452: wrap_simple_1smb2_test (smb2.c:52)
==17238==    by 0x955368F: internal_torture_run_test (torture.c:442)
==17238==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==17238==    by 0x26013F: run_matching (smbtorture.c:110)
==17238==    by 0x260001: run_matching (smbtorture.c:95)
==17238==    by 0x260001: run_matching (smbtorture.c:95)
==17238==    by 0x260260: torture_run_named_tests (smbtorture.c:143)
==17238==    by 0x261EDF: main (smbtorture.c:665)
==17238==
==17238== Use of uninitialised value of size 8
==17238==    at 0x8F005DE: _samba_rijndaelEncrypt (rijndael-alg-fst.c:958)
==17238==    by 0x8EFF24C: samba_AES_encrypt (aes.c:60)
==17238==    by 0x8F01A74: aes_cmac_128_update (aes_cmac_128.c:151)
==17238==    by 0xB0D11B7: smb2_signing_sign_pdu (smb2_signing.c:74)
==17238==    by 0xB0D984A: smb2cli_req_compound_submit (smbXcli_base.c:3062)
==17238==    by 0x5AFD5F5: smb2_transport_send (transport.c:237)
==17238==    by 0x5B030F3: smb2_close_send (close.c:42)
==17238==    by 0x5B0358A: smb2_close (close.c:78)
==17238==    by 0x5B087B3: smb2_util_close (util.c:40)
==17238==    by 0x51E480: test_stream_names (streams.c:1053)
==17238==    by 0x48B452: wrap_simple_1smb2_test (smb2.c:52)
==17238==    by 0x955368F: internal_torture_run_test (torture.c:442)
==17238==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==17238==    by 0x26013F: run_matching (smbtorture.c:110)
==17238==    by 0x260001: run_matching (smbtorture.c:95)
==17238==    by 0x260001: run_matching (smbtorture.c:95)
==17238==    by 0x260260: torture_run_named_tests (smbtorture.c:143)
==17238==    by 0x261EDF: main (smbtorture.c:665)
==17238==

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-04-25 10:35:16 +02:00
Noel Power
b90f5f47dc s4:torture:smb2: fix 'Use of uninitialised value of size 8' valgrind error.
smbtorture test smb2.streams.sharemodes.sharemodes generates the following valgrind
trace

==16980== Use of uninitialised value of size 8
==16980==    at 0x8F005C2: _samba_rijndaelEncrypt (rijndael-alg-fst.c:957)
==16980==    by 0x8EFF24C: samba_AES_encrypt (aes.c:60)
==16980==    by 0x8F01A74: aes_cmac_128_update (aes_cmac_128.c:151)
==16980==    by 0xB0D11B7: smb2_signing_sign_pdu (smb2_signing.c:74)
==16980==    by 0xB0D984A: smb2cli_req_compound_submit (smbXcli_base.c:3062)
==16980==    by 0x5AFD5F5: smb2_transport_send (transport.c:237)
==16980==    by 0x5B030F3: smb2_close_send (close.c:42)
==16980==    by 0x5B0358A: smb2_close (close.c:78)
==16980==    by 0x5B087B3: smb2_util_close (util.c:40)
==16980==    by 0x51B4F3: test_stream_sharemodes (streams.c:557)
==16980==    by 0x48B452: wrap_simple_1smb2_test (smb2.c:52)
==16980==    by 0x955368F: internal_torture_run_test (torture.c:442)
==16980==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==16980==    by 0x26013F: run_matching (smbtorture.c:110)
==16980==    by 0x260001: run_matching (smbtorture.c:95)
==16980==    by 0x260001: run_matching (smbtorture.c:95)
==16980==    by 0x260260: torture_run_named_tests (smbtorture.c:143)
==16980==    by 0x261EDF: main (smbtorture.c:665)
==16980==
==16980== Use of uninitialised value of size 8
==16980==    at 0x8F005DE: _samba_rijndaelEncrypt (rijndael-alg-fst.c:958)
==16980==    by 0x8EFF24C: samba_AES_encrypt (aes.c:60)
==16980==    by 0x8F01A74: aes_cmac_128_update (aes_cmac_128.c:151)
==16980==    by 0xB0D11B7: smb2_signing_sign_pdu (smb2_signing.c:74)
==16980==    by 0xB0D984A: smb2cli_req_compound_submit (smbXcli_base.c:3062)
==16980==    by 0x5AFD5F5: smb2_transport_send (transport.c:237)
==16980==    by 0x5B030F3: smb2_close_send (close.c:42)
==16980==    by 0x5B0358A: smb2_close (close.c:78)
==16980==    by 0x5B087B3: smb2_util_close (util.c:40)
==16980==    by 0x51B4F3: test_stream_sharemodes (streams.c:557)
==16980==    by 0x48B452: wrap_simple_1smb2_test (smb2.c:52)
==16980==    by 0x955368F: internal_torture_run_test (torture.c:442)
==16980==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==16980==    by 0x26013F: run_matching (smbtorture.c:110)
==16980==    by 0x260001: run_matching (smbtorture.c:95)
==16980==    by 0x260001: run_matching (smbtorture.c:95)
==16980==    by 0x260260: torture_run_named_tests (smbtorture.c:143)
==16980==    by 0x261EDF: main (smbtorture.c:665)
==16980==

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-04-25 10:35:16 +02:00
Noel Power
fbf476e2d3 s4:torture:smb2: fix 'Use of uninitialised value of size 8' valgrind error.
smbtorture test smb2.streams.io.io generates the following valgrind trace

==16652== Use of uninitialised value of size 8
==16652==    at 0x8F005C2: _samba_rijndaelEncrypt (rijndael-alg-fst.c:957)
==16652==    by 0x8EFF24C: samba_AES_encrypt (aes.c:60)
==16652==    by 0x8F01A74: aes_cmac_128_update (aes_cmac_128.c:151)
==16652==    by 0xB0D11B7: smb2_signing_sign_pdu (smb2_signing.c:74)
==16652==    by 0xB0D984A: smb2cli_req_compound_submit (smbXcli_base.c:3062)
==16652==    by 0x5AFD5F5: smb2_transport_send (transport.c:237)
==16652==    by 0x5B030F3: smb2_close_send (close.c:42)
==16652==    by 0x5B0358A: smb2_close (close.c:78)
==16652==    by 0x5B087B3: smb2_util_close (util.c:40)
==16652==    by 0x51AF21: test_stream_io (streams.c:480)
==16652==    by 0x48B452: wrap_simple_1smb2_test (smb2.c:52)
==16652==    by 0x955368F: internal_torture_run_test (torture.c:442)
==16652==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==16652==    by 0x26013F: run_matching (smbtorture.c:110)
==16652==    by 0x260001: run_matching (smbtorture.c:95)
==16652==    by 0x260001: run_matching (smbtorture.c:95)
==16652==    by 0x260260: torture_run_named_tests (smbtorture.c:143)
==16652==    by 0x261EDF: main (smbtorture.c:665)
==16652==
==16652== Use of uninitialised value of size 8
==16652==    at 0x8F005DE: _samba_rijndaelEncrypt (rijndael-alg-fst.c:958)
==16652==    by 0x8EFF24C: samba_AES_encrypt (aes.c:60)
==16652==    by 0x8F01A74: aes_cmac_128_update (aes_cmac_128.c:151)
==16652==    by 0xB0D11B7: smb2_signing_sign_pdu (smb2_signing.c:74)
==16652==    by 0xB0D984A: smb2cli_req_compound_submit (smbXcli_base.c:3062)
==16652==    by 0x5AFD5F5: smb2_transport_send (transport.c:237)
==16652==    by 0x5B030F3: smb2_close_send (close.c:42)
==16652==    by 0x5B0358A: smb2_close (close.c:78)
==16652==    by 0x5B087B3: smb2_util_close (util.c:40)
==16652==    by 0x51AF21: test_stream_io (streams.c:480)
==16652==    by 0x48B452: wrap_simple_1smb2_test (smb2.c:52)
==16652==    by 0x955368F: internal_torture_run_test (torture.c:442)
==16652==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==16652==    by 0x26013F: run_matching (smbtorture.c:110)
==16652==    by 0x260001: run_matching (smbtorture.c:95)
==16652==    by 0x260001: run_matching (smbtorture.c:95)
==16652==    by 0x260260: torture_run_named_tests (smbtorture.c:143)
==16652==    by 0x261EDF: main (smbtorture.c:665)

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-04-25 10:35:16 +02:00
Noel Power
2f137a982c s4:torture:smb2: fix 'Use of uninitialised value of size 8' valgrind error
smbtorture test smb2.oplock.brl3.brl3 generated the following valgrind
trace

==16564== Use of uninitialised value of size 8
==16564==    at 0x8F005DE: _samba_rijndaelEncrypt (rijndael-alg-fst.c:958)
==16564==    by 0x8EFF24C: samba_AES_encrypt (aes.c:60)
==16564==    by 0x8F01BB2: aes_cmac_128_final (aes_cmac_128.c:179)
==16564==    by 0xB0D11E5: smb2_signing_sign_pdu (smb2_signing.c:78)
==16564==    by 0xB0D984A: smb2cli_req_compound_submit (smbXcli_base.c:3062)
==16564==    by 0x5AFD5F5: smb2_transport_send (transport.c:237)
==16564==    by 0x5B078DF: smb2_lock_send (lock.c:52)
==16564==    by 0x5B07AAE: smb2_lock (lock.c:80)
==16564==    by 0x4B62B1: test_smb2_oplock_brl3 (oplock.c:3578)
==16564==    by 0x48B452: wrap_simple_1smb2_test (smb2.c:52)
==16564==    by 0x955368F: internal_torture_run_test (torture.c:442)
==16564==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==16564==    by 0x26013F: run_matching (smbtorture.c:110)
==16564==    by 0x260001: run_matching (smbtorture.c:95)
==16564==    by 0x260001: run_matching (smbtorture.c:95)
==16564==    by 0x260260: torture_run_named_tests (smbtorture.c:143)
==16564==    by 0x261EDF: main (smbtorture.c:665)
==16564==
==16564== Use of uninitialised value of size 8
==16564==    at 0x8F00649: _samba_rijndaelEncrypt (rijndael-alg-fst.c:963)
==16564==    by 0x8EFF24C: samba_AES_encrypt (aes.c:60)
==16564==    by 0x8F01BB2: aes_cmac_128_final (aes_cmac_128.c:179)
==16564==    by 0xB0D11E5: smb2_signing_sign_pdu (smb2_signing.c:78)
==16564==    by 0xB0D984A: smb2cli_req_compound_submit (smbXcli_base.c:3062)
==16564==    by 0x5AFD5F5: smb2_transport_send (transport.c:237)
==16564==    by 0x5B078DF: smb2_lock_send (lock.c:52)
==16564==    by 0x5B07AAE: smb2_lock (lock.c:80)
==16564==    by 0x4B62B1: test_smb2_oplock_brl3 (oplock.c:3578)
==16564==    by 0x48B452: wrap_simple_1smb2_test (smb2.c:52)
==16564==    by 0x955368F: internal_torture_run_test (torture.c:442)
==16564==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==16564==    by 0x26013F: run_matching (smbtorture.c:110)
==16564==    by 0x260001: run_matching (smbtorture.c:95)
==16564==    by 0x260001: run_matching (smbtorture.c:95)
==16564==    by 0x260260: torture_run_named_tests (smbtorture.c:143)
==16564==    by 0x261EDF: main (smbtorture.c:665)
==16564==

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-04-25 10:35:16 +02:00
Noel Power
9ce1f28b8a s4:torture:smb2 fix 'Use of uninitialised value of size 8' valgrind error.
smbtorture test smb2.oplock.brl2.brl2 generates the following
valgrind trace

==16443== Use of uninitialised value of size 8
==16443==    at 0x8F005DE: _samba_rijndaelEncrypt (rijndael-alg-fst.c:958)
==16443==    by 0x8EFF24C: samba_AES_encrypt (aes.c:60)
==16443==    by 0x8F01BB2: aes_cmac_128_final (aes_cmac_128.c:179)
==16443==    by 0xB0D11E5: smb2_signing_sign_pdu (smb2_signing.c:78)
==16443==    by 0xB0D984A: smb2cli_req_compound_submit (smbXcli_base.c:3062)
==16443==    by 0x5AFD5F5: smb2_transport_send (transport.c:237)
==16443==    by 0x5B078DF: smb2_lock_send (lock.c:52)
==16443==    by 0x5B07AAE: smb2_lock (lock.c:80)
==16443==    by 0x4B5971: test_smb2_oplock_brl2 (oplock.c:3464)
==16443==    by 0x48B452: wrap_simple_1smb2_test (smb2.c:52)
==16443==    by 0x955368F: internal_torture_run_test (torture.c:442)
==16443==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==16443==    by 0x26013F: run_matching (smbtorture.c:110)
==16443==    by 0x260001: run_matching (smbtorture.c:95)
==16443==    by 0x260001: run_matching (smbtorture.c:95)
==16443==    by 0x260260: torture_run_named_tests (smbtorture.c:143)
==16443==    by 0x261EDF: main (smbtorture.c:665)
==16443==
==16443== Use of uninitialised value of size 8
==16443==    at 0x8F00649: _samba_rijndaelEncrypt (rijndael-alg-fst.c:963)
==16443==    by 0x8EFF24C: samba_AES_encrypt (aes.c:60)
==16443==    by 0x8F01BB2: aes_cmac_128_final (aes_cmac_128.c:179)
==16443==    by 0xB0D11E5: smb2_signing_sign_pdu (smb2_signing.c:78)
==16443==    by 0xB0D984A: smb2cli_req_compound_submit (smbXcli_base.c:3062)
==16443==    by 0x5AFD5F5: smb2_transport_send (transport.c:237)
==16443==    by 0x5B078DF: smb2_lock_send (lock.c:52)
==16443==    by 0x5B07AAE: smb2_lock (lock.c:80)
==16443==    by 0x4B5971: test_smb2_oplock_brl2 (oplock.c:3464)
==16443==    by 0x48B452: wrap_simple_1smb2_test (smb2.c:52)
==16443==    by 0x955368F: internal_torture_run_test (torture.c:442)
==16443==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==16443==    by 0x26013F: run_matching (smbtorture.c:110)
==16443==    by 0x260001: run_matching (smbtorture.c:95)
==16443==    by 0x260001: run_matching (smbtorture.c:95)
==16443==    by 0x260260: torture_run_named_tests (smbtorture.c:143)
==16443==    by 0x261EDF: main (smbtorture.c:665)
==16443==

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-04-25 10:35:16 +02:00
Noel Power
d7e6d37e5e s4:torture:smb2: fix 'Use of uninitialised value of size 8' valgrind error.
smbtorture smb2.oplock.brl1.brl1 generates the following valgrind trace

==16002== Use of uninitialised value of size 8
==16002==    at 0x8F005DE: _samba_rijndaelEncrypt (rijndael-alg-fst.c:958)
==16002==    by 0x8EFF24C: samba_AES_encrypt (aes.c:60)
==16002==    by 0x8F01BB2: aes_cmac_128_final (aes_cmac_128.c:179)
==16002==    by 0xB0D11E5: smb2_signing_sign_pdu (smb2_signing.c:78)
==16002==    by 0xB0D984A: smb2cli_req_compound_submit (smbXcli_base.c:3062)
==16002==    by 0x5AFD5F5: smb2_transport_send (transport.c:237)
==16002==    by 0x5B078DF: smb2_lock_send (lock.c:52)
==16002==    by 0x5B07AAE: smb2_lock (lock.c:80)
==16002==    by 0x4B50D8: test_smb2_oplock_brl1 (oplock.c:3352)
==16002==    by 0x48B7B5: wrap_simple_2smb2_test (smb2.c:112)
==16002==    by 0x955368F: internal_torture_run_test (torture.c:442)
==16002==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==16002==    by 0x26013F: run_matching (smbtorture.c:110)
==16002==    by 0x260001: run_matching (smbtorture.c:95)
==16002==    by 0x260001: run_matching (smbtorture.c:95)
==16002==    by 0x260260: torture_run_named_tests (smbtorture.c:143)
==16002==    by 0x261EDF: main (smbtorture.c:665)
==16002==
==16002== Use of uninitialised value of size 8
==16002==    at 0x8F00649: _samba_rijndaelEncrypt (rijndael-alg-fst.c:963)
==16002==    by 0x8EFF24C: samba_AES_encrypt (aes.c:60)
==16002==    by 0x8F01BB2: aes_cmac_128_final (aes_cmac_128.c:179)
==16002==    by 0xB0D11E5: smb2_signing_sign_pdu (smb2_signing.c:78)
==16002==    by 0xB0D984A: smb2cli_req_compound_submit (smbXcli_base.c:3062)
==16002==    by 0x5AFD5F5: smb2_transport_send (transport.c:237)
==16002==    by 0x5B078DF: smb2_lock_send (lock.c:52)
==16002==    by 0x5B07AAE: smb2_lock (lock.c:80)
==16002==    by 0x4B50D8: test_smb2_oplock_brl1 (oplock.c:3352)
==16002==    by 0x48B7B5: wrap_simple_2smb2_test (smb2.c:112)
==16002==    by 0x955368F: internal_torture_run_test (torture.c:442)
==16002==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==16002==    by 0x26013F: run_matching (smbtorture.c:110)
==16002==    by 0x260001: run_matching (smbtorture.c:95)
==16002==    by 0x260001: run_matching (smbtorture.c:95)
==16002==    by 0x260260: torture_run_named_tests (smbtorture.c:143)
==16002==    by 0x261EDF: main (smbtorture.c:665)
==16002==
==16002== Use of uninitialised value of size 8
==16002==    at 0x8F006AF: _samba_rijndaelEncrypt (rijndael-alg-fst.c:968)
==16002==    by 0x8EFF24C: samba_AES_encrypt (aes.c:60)
==16002==    by 0x8F01BB2: aes_cmac_128_final (aes_cmac_128.c:179)
==16002==    by 0xB0D11E5: smb2_signing_sign_pdu (smb2_signing.c:78)
==16002==    by 0xB0D984A: smb2cli_req_compound_submit (smbXcli_base.c:3062)
==16002==    by 0x5AFD5F5: smb2_transport_send (transport.c:237)
==16002==    by 0x5B078DF: smb2_lock_send (lock.c:52)
==16002==    by 0x5B07AAE: smb2_lock (lock.c:80)
==16002==    by 0x4B50D8: test_smb2_oplock_brl1 (oplock.c:3352)
==16002==    by 0x48B7B5: wrap_simple_2smb2_test (smb2.c:112)
==16002==    by 0x955368F: internal_torture_run_test (torture.c:442)
==16002==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==16002==    by 0x26013F: run_matching (smbtorture.c:110)
==16002==    by 0x260001: run_matching (smbtorture.c:95)
==16002==    by 0x260001: run_matching (smbtorture.c:95)
==16002==    by 0x260260: torture_run_named_tests (smbtorture.c:143)
==16002==    by 0x261EDF: main (smbtorture.c:665)
==16002==

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-04-25 10:35:16 +02:00
Noel Power
bfc2349a56 s4:torture:smb2 fix 'Use of uninitialised value of size 8' valgrind error.
smbtorture test smb2.oplock.batch10.batch10 produces the following
valgrind trace

Use of uninitialised value of size 8
==9662==    at 0x8F005A1: _samba_rijndaelEncrypt (rijndael-alg-fst.c:956)
==9662==    by 0x8EFF24C: samba_AES_encrypt (aes.c:60)
==9662==    by 0x8F01A74: aes_cmac_128_update (aes_cmac_128.c:151)
==9662==    by 0xB0D11B7: smb2_signing_sign_pdu (smb2_signing.c:74)
==9662==    by 0xB0D984A: smb2cli_req_compound_submit (smbXcli_base.c:3062)
==9662==    by 0x5AFD5F5: smb2_transport_send (transport.c:237)
==9662==    by 0x5B04C89: smb2_write_send (write.c:49)
==9662==    by 0x5B04F85: smb2_write (write.c:79)
==9662==    by 0x4AD523: test_smb2_oplock_batch10 (oplock.c:1820)
==9662==    by 0x48B7B5: wrap_simple_2smb2_test (smb2.c:112)
==9662==    by 0x955368F: internal_torture_run_test (torture.c:442)
==9662==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==9662==    by 0x26013F: run_matching (smbtorture.c:110)
==9662==    by 0x260001: run_matching (smbtorture.c:95)
==9662==    by 0x260001: run_matching (smbtorture.c:95)
==9662==    by 0x260260: torture_run_named_tests (smbtorture.c:143)
==9662==    by 0x261EDF: main (smbtorture.c:665)
==9662==
==9662== Use of uninitialised value of size 8
==9662==    at 0x8F005C2: _samba_rijndaelEncrypt (rijndael-alg-fst.c:957)
==9662==    by 0x8EFF24C: samba_AES_encrypt (aes.c:60)
==9662==    by 0x8F01A74: aes_cmac_128_update (aes_cmac_128.c:151)
==9662==    by 0xB0D11B7: smb2_signing_sign_pdu (smb2_signing.c:74)
==9662==    by 0xB0D984A: smb2cli_req_compound_submit (smbXcli_base.c:3062)
==9662==    by 0x5AFD5F5: smb2_transport_send (transport.c:237)
==9662==    by 0x5B04C89: smb2_write_send (write.c:49)
==9662==    by 0x5B04F85: smb2_write (write.c:79)
==9662==    by 0x4AD523: test_smb2_oplock_batch10 (oplock.c:1820)
==9662==    by 0x48B7B5: wrap_simple_2smb2_test (smb2.c:112)
==9662==    by 0x955368F: internal_torture_run_test (torture.c:442)
==9662==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==9662==    by 0x26013F: run_matching (smbtorture.c:110)
==9662==    by 0x260001: run_matching (smbtorture.c:95)
==9662==    by 0x260001: run_matching (smbtorture.c:95)
==9662==    by 0x260260: torture_run_named_tests (smbtorture.c:143)
==9662==    by 0x261EDF: main (smbtorture.c:665)
==9662==
 Please enter the commit message for your changes. Lines starting

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-04-25 10:35:16 +02:00
Noel Power
dc927dee2e s4:torture:smb2: fix 'Use of uninitialised value of size 8' valgrind error.
smbtorture test smb2.notify.mask.mask

==6451== Use of uninitialised value of size 8
==6451==    at 0x8F005C2: _samba_rijndaelEncrypt (rijndael-alg-fst.c:957)
==6451==    by 0x8EFF24C: samba_AES_encrypt (aes.c:60)
==6451==    by 0x8F01A74: aes_cmac_128_update (aes_cmac_128.c:151)
==6451==    by 0xB0D11B7: smb2_signing_sign_pdu (smb2_signing.c:74)
==6451==    by 0xB0D984A: smb2cli_req_compound_submit (smbXcli_base.c:3062)
==6451==    by 0x5AFD5F5: smb2_transport_send (transport.c:237)
==6451==    by 0x5B030F3: smb2_close_send (close.c:42)
==6451==    by 0x5B0358A: smb2_close (close.c:78)
==6451==    by 0x5B087B3: smb2_util_close (util.c:40)
==6451==    by 0x483E97: torture_smb2_notify_mask (notify.c:1061)
==6451==    by 0x48B783: wrap_simple_2smb2_test (smb2.c:112)
==6451==    by 0x955368F: internal_torture_run_test (torture.c:442)
==6451==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==6451==    by 0x26013F: run_matching (smbtorture.c:110)
==6451==    by 0x260001: run_matching (smbtorture.c:95)
==6451==    by 0x260001: run_matching (smbtorture.c:95)
==6451==    by 0x260260: torture_run_named_tests (smbtorture.c:143)
==6451==    by 0x261EDF: main (smbtorture.c:665)
==6451==
==6451== Use of uninitialised value of size 8
==6451==    at 0x8F005DE: _samba_rijndaelEncrypt (rijndael-alg-fst.c:958)
==6451==    by 0x8EFF24C: samba_AES_encrypt (aes.c:60)
==6451==    by 0x8F01A74: aes_cmac_128_update (aes_cmac_128.c:151)
==6451==    by 0xB0D11B7: smb2_signing_sign_pdu (smb2_signing.c:74)
==6451==    by 0xB0D984A: smb2cli_req_compound_submit (smbXcli_base.c:3062)
==6451==    by 0x5AFD5F5: smb2_transport_send (transport.c:237)
==6451==    by 0x5B030F3: smb2_close_send (close.c:42)
==6451==    by 0x5B0358A: smb2_close (close.c:78)
==6451==    by 0x5B087B3: smb2_util_close (util.c:40)
==6451==    by 0x483E97: torture_smb2_notify_mask (notify.c:1061)
==6451==    by 0x48B783: wrap_simple_2smb2_test (smb2.c:112)
==6451==    by 0x955368F: internal_torture_run_test (torture.c:442)
==6451==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==6451==    by 0x26013F: run_matching (smbtorture.c:110)
==6451==    by 0x260001: run_matching (smbtorture.c:95)
==6451==    by 0x260001: run_matching (smbtorture.c:95)
==6451==    by 0x260260: torture_run_named_tests (smbtorture.c:143)
==6451==    by 0x261EDF: main (smbtorture.c:665)
==6451==

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-04-25 10:35:15 +02:00
Noel Power
1ae19203e2 s4:torture:smb2: fix Use of 'uninitialised value of size 8' valgrind error.
smbtorture test smb2.create.aclfile.aclfile produces the following
valgrind trace

==6025== Use of uninitialised value of size 8
==6025==    at 0xFB0B061: _itoa_word (in /lib64/libc-2.19.so)
==6025==    by 0xFB0EAD2: vfprintf (in /lib64/libc-2.19.so)
==6025==    by 0xFB36712: vasprintf (in /lib64/libc-2.19.so)
==6025==    by 0xAEBB348: ndr_print_debug_helper (ndr.c:314)
==6025==    by 0xAEB8ED1: ndr_print_uint16 (ndr_basic.c:1055)
==6025==    by 0x3E5951: ndr_print_security_ace (ndr_security.c:539)
==6025==    by 0x3E6251: ndr_print_security_acl (ndr_security.c:642)
==6025==    by 0x3E7A76: ndr_print_security_descriptor (ndr_security.c:890)
==6025==    by 0xAEBB860: ndr_print_debug (ndr.c:409)
==6025==    by 0x45FCB6: smb2_util_verify_sd (util.c:598)
==6025==    by 0x502246: test_create_acl_ext (create.c:634)
==6025==    by 0x506E13: test_create_acl_file (create.c:1232)
==6025==    by 0x48B420: wrap_simple_1smb2_test (smb2.c:52)
==6025==    by 0x955368F: internal_torture_run_test (torture.c:442)
==6025==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==6025==    by 0x26013F: run_matching (smbtorture.c:110)
==6025==    by 0x260001: run_matching (smbtorture.c:95)
==6025==    by 0x260001: run_matching (smbtorture.c:95)
==6025==    by 0x260260: torture_run_named_tests (smbtorture.c:143)
==6025==    by 0x261EDF: main (smbtorture.c:665)
==6025==
==6025== Conditional jump or move depends on uninitialised value(s)
==6025==    at 0xFB0B068: _itoa_word (in /lib64/libc-2.19.so)
==6025==    by 0xFB0EAD2: vfprintf (in /lib64/libc-2.19.so)
==6025==    by 0xFB36712: vasprintf (in /lib64/libc-2.19.so)
==6025==    by 0xAEBB348: ndr_print_debug_helper (ndr.c:314)
==6025==    by 0xAEB8ED1: ndr_print_uint16 (ndr_basic.c:1055)
==6025==    by 0x3E5951: ndr_print_security_ace (ndr_security.c:539)
==6025==    by 0x3E6251: ndr_print_security_acl (ndr_security.c:642)
==6025==    by 0x3E7A76: ndr_print_security_descriptor (ndr_security.c:890)
==6025==    by 0xAEBB860: ndr_print_debug (ndr.c:409)
==6025==    by 0x45FCB6: smb2_util_verify_sd (util.c:598)
==6025==    by 0x502246: test_create_acl_ext (create.c:634)
==6025==    by 0x506E13: test_create_acl_file (create.c:1232)
==6025==    by 0x48B420: wrap_simple_1smb2_test (smb2.c:52)
==6025==    by 0x955368F: internal_torture_run_test (torture.c:442)
==6025==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==6025==    by 0x26013F: run_matching (smbtorture.c:110)
==6025==    by 0x260001: run_matching (smbtorture.c:95)
==6025==    by 0x260001: run_matching (smbtorture.c:95)
==6025==    by 0x260260: torture_run_named_tests (smbtorture.c:143)
==6025==    by 0x261EDF: main (smbtorture.c:665)
==6025==

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-04-25 10:35:15 +02:00
Noel Power
cd7c57c85d s4:torture:raw: fix 'Invalid read of size 1 & Conditional jump or move' errors.
smbtorture test raw.offline.offline generates the following valgrind trace(s).

==5130==    at 0x2223AF: loadfile_callback (offline.c:107)
==5130==    by 0x5AF73E6: loadfile_handler (loadfile.c:208)
==5130==    by 0x5ADFEE0: smbcli_request_done (clitransport.c:395)
==5130==    by 0xF676EEE: tevent_common_loop_timer_delay (in /usr/lib64/libtevent.so.0.9.26)
==5130==    by 0xF677EF9: ??? (in /usr/lib64/libtevent.so.0.9.26)
==5130==    by 0xF6765F6: ??? (in /usr/lib64/libtevent.so.0.9.26)
==5130==    by 0xF6727FC: _tevent_loop_once (in /usr/lib64/libtevent.so.0.9.26)
==5130==    by 0x223A16: torture_test_offline (offline.c:493)
==5130==    by 0x9553F62: wrap_simple_test (torture.c:632)
==5130==    by 0x955368F: internal_torture_run_test (torture.c:442)
==5130==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==5130==    by 0x260121: run_matching (smbtorture.c:110)
==5130==    by 0x25FFE3: run_matching (smbtorture.c:95)
==5130==    by 0x260242: torture_run_named_tests (smbtorture.c:143)
==5130==    by 0x261EC1: main (smbtorture.c:665)
==5130==  Address 0x188b80d0 is 96 bytes inside a block of size 8,288 free'd
==5130==    at 0x4C2A37C: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==5130==    by 0xF4673A3: ??? (in /usr/lib64/libtalloc.so.2.1.5)
==5130==    by 0xF460E42: _talloc_free (in /usr/lib64/libtalloc.so.2.1.5)
==5130==    by 0x5AF7635: smb_composite_loadfile_recv (loadfile.c:278)
==5130==    by 0x2222F7: loadfile_callback (offline.c:91)
==5130==    by 0x5AF73E6: loadfile_handler (loadfile.c:208)
==5130==    by 0x5ADFEE0: smbcli_request_done (clitransport.c:395)
==5130==    by 0xF676EEE: tevent_common_loop_timer_delay (in /usr/lib64/libtevent.so.0.9.26)
==5130==    by 0xF677EF9: ??? (in /usr/lib64/libtevent.so.0.9.26)
==5130==    by 0xF6765F6: ??? (in /usr/lib64/libtevent.so.0.9.26)
==5130==    by 0xF6727FC: _tevent_loop_once (in /usr/lib64/libtevent.so.0.9.26)
==5130==    by 0x223A16: torture_test_offline (offline.c:493)
==5130==    by 0x9553F62: wrap_simple_test (torture.c:632)
==5130==    by 0x955368F: internal_torture_run_test (torture.c:442)
==5130==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==5130==    by 0x260121: run_matching (smbtorture.c:110)
==5130==    by 0x25FFE3: run_matching (smbtorture.c:95)
==5130==    by 0x260242: torture_run_named_tests (smbtorture.c:143)
==5130==    by 0x261EC1: main (smbtorture.c:665)
==5130==

AND

==5428== Conditional jump or move depends on uninitialised value(s)
==5428==    at 0x22270E: getoffline_callback (offline.c:197)
==5428==    by 0x5ADFEE0: smbcli_request_done (clitransport.c:395)
==5428==    by 0xF676EEE: tevent_common_loop_timer_delay (in /usr/lib64/libtevent.so.0.9.26)
==5428==    by 0xF677EF9: ??? (in /usr/lib64/libtevent.so.0.9.26)
==5428==    by 0xF6765F6: ??? (in /usr/lib64/libtevent.so.0.9.26)
==5428==    by 0xF6727FC: _tevent_loop_once (in /usr/lib64/libtevent.so.0.9.26)
==5428==    by 0x223A1B: torture_test_offline (offline.c:494)
==5428==    by 0x9553F62: wrap_simple_test (torture.c:632)
==5428==    by 0x955368F: internal_torture_run_test (torture.c:442)
==5428==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==5428==    by 0x260126: run_matching (smbtorture.c:110)
==5428==    by 0x25FFE8: run_matching (smbtorture.c:95)
==5428==    by 0x260247: torture_run_named_tests (smbtorture.c:143)
==5428==    by 0x261EC6: main (smbtorture.c:665)
==5428==

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-04-25 10:35:15 +02:00
Noel Power
bb0c4a95df s4:torture:raw: fix 'Conditional jump or move' valgrind error.
smbtorture test raw.bench-tcon.bench-tcon produces the following valgrind
trace

==32163== Conditional jump or move depends on uninitialised value(s)
==32163==    at 0x1F9D61: rate_convert_secs (tconrate.c:149)
==32163==    by 0x1FA04C: torture_bench_treeconnect (tconrate.c:189)
==32163==    by 0x9553F62: wrap_simple_test (torture.c:632)
==32163==    by 0x955368F: internal_torture_run_test (torture.c:442)
==32163==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==32163==    by 0x260121: run_matching (smbtorture.c:110)
==32163==    by 0x25FFE3: run_matching (smbtorture.c:95)
==32163==    by 0x260242: torture_run_named_tests (smbtorture.c:143)
==32163==    by 0x261EC1: main (smbtorture.c:665)
==32163==
==32163== Use of uninitialised value of size 8
==32163==    at 0xFB0B0BB: _itoa_word (in /lib64/libc-2.19.so)
==32163==    by 0xFB0EAD2: vfprintf (in /lib64/libc-2.19.so)
==32163==    by 0xFB15598: printf (in /lib64/libc-2.19.so)
==32163==    by 0x1FA064: torture_bench_treeconnect (tconrate.c:188)
==32163==    by 0x9553F62: wrap_simple_test (torture.c:632)
==32163==    by 0x955368F: internal_torture_run_test (torture.c:442)
==32163==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==32163==    by 0x260121: run_matching (smbtorture.c:110)
==32163==    by 0x25FFE3: run_matching (smbtorture.c:95)
==32163==    by 0x260242: torture_run_named_tests (smbtorture.c:143)
==32163==    by 0x261EC1: main (smbtorture.c:665)

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-04-25 10:35:15 +02:00
Noel Power
04d70f5206 s4:torture:raw: fix 'use of uninitialised value of size 8' valgrind errors
smbtorture test raw.acls.create_file.create_file produces the following
valgrind trace

==31783== Use of uninitialised value of size 8
==31783==    at 0xFB0B061: _itoa_word (in /lib64/libc-2.19.so)
==31783==    by 0xFB0EAD2: vfprintf (in /lib64/libc-2.19.so)
==31783==    by 0xFB36712: vasprintf (in /lib64/libc-2.19.so)
==31783==    by 0xAEBB348: ndr_print_debug_helper (ndr.c:314)
==31783==    by 0xAEB8ED1: ndr_print_uint16 (ndr_basic.c:1055)
==31783==    by 0x3E591A: ndr_print_security_ace (ndr_security.c:539)
==31783==    by 0x3E621A: ndr_print_security_acl (ndr_security.c:642)
==31783==    by 0x3E7A3F: ndr_print_security_descriptor (ndr_security.c:890)
==31783==    by 0xAEBB860: ndr_print_debug (ndr.c:409)
==31783==    by 0x20C91F: verify_sd (acls.c:89)
==31783==    by 0x20D8C3: test_nttrans_create_ext (acls.c:306)
==31783==    by 0x20E3A8: test_nttrans_create_file (acls.c:381)
==31783==    by 0x16B21D: wrap_simple_1smb_test (util_smb.c:856)
==31783==    by 0x955368F: internal_torture_run_test (torture.c:442)
==31783==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==31783==    by 0x260108: run_matching (smbtorture.c:110)
==31783==    by 0x25FFCA: run_matching (smbtorture.c:95)
==31783==    by 0x25FFCA: run_matching (smbtorture.c:95)
==31783==    by 0x260229: torture_run_named_tests (smbtorture.c:143)
==31783==    by 0x261EA8: main (smbtorture.c:665)
==31783==
==31783== Conditional jump or move depends on uninitialised value(s)
==31783==    at 0xFB0B068: _itoa_word (in /lib64/libc-2.19.so)
==31783==    by 0xFB0EAD2: vfprintf (in /lib64/libc-2.19.so)
==31783==    by 0xFB36712: vasprintf (in /lib64/libc-2.19.so)
==31783==    by 0xAEBB348: ndr_print_debug_helper (ndr.c:314)
==31783==    by 0xAEB8ED1: ndr_print_uint16 (ndr_basic.c:1055)
==31783==    by 0x3E591A: ndr_print_security_ace (ndr_security.c:539)
==31783==    by 0x3E621A: ndr_print_security_acl (ndr_security.c:642)
==31783==    by 0x3E7A3F: ndr_print_security_descriptor (ndr_security.c:890)
==31783==    by 0xAEBB860: ndr_print_debug (ndr.c:409)
==31783==    by 0x20C91F: verify_sd (acls.c:89)
==31783==    by 0x20D8C3: test_nttrans_create_ext (acls.c:306)
==31783==    by 0x20E3A8: test_nttrans_create_file (acls.c:381)
==31783==    by 0x16B21D: wrap_simple_1smb_test (util_smb.c:856)
==31783==    by 0x955368F: internal_torture_run_test (torture.c:442)
==31783==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==31783==    by 0x260108: run_matching (smbtorture.c:110)
==31783==    by 0x25FFCA: run_matching (smbtorture.c:95)
==31783==    by 0x25FFCA: run_matching (smbtorture.c:95)
==31783==    by 0x260229: torture_run_named_tests (smbtorture.c:143)
==31783==    by 0x261EA8: main (smbtorture.c:665)
==31783==

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-04-25 10:35:15 +02:00
Noel Power
de590daa1c s4:torture:raw: fix 'Syscall param writev(vector[...])' valgrind error
running smbtorture test raw.streams.createdisp.createdisp results in
the following valgrind trace

==30946== Syscall param writev(vector[...]) points to uninitialised byte(s)
==30946==    at 0xFBA2C87: writev (in /lib64/libc-2.19.so)
==30946==    by 0x106CB033: writev_handler (async_sock.c:340)
==30946==    by 0xF67812A: ??? (in /usr/lib64/libtevent.so.0.9.26)
==30946==    by 0xF6765F6: ??? (in /usr/lib64/libtevent.so.0.9.26)
==30946==    by 0xF6727FC: _tevent_loop_once (in /usr/lib64/libtevent.so.0.9.26)
==30946==    by 0x5AE3400: smbcli_request_receive (rawrequest.c:416)
==30946==    by 0x5AE343E: smbcli_request_simple_recv (rawrequest.c:430)
==30946==    by 0x5ADC8BC: smb_raw_close (rawfile.c:847)
==30946==    by 0x9BE60B4: smbcli_close (clifile.c:316)
==30946==    by 0x209F0D: create_file_with_stream (streams.c:1502)
==30946==    by 0x20A072: test_stream_create_disposition (streams.c:1527)
==30946==    by 0x16B21D: wrap_simple_1smb_test (util_smb.c:856)
==30946==    by 0x955368F: internal_torture_run_test (torture.c:442)
==30946==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==30946==    by 0x2600D6: run_matching (smbtorture.c:110)
==30946==    by 0x25FF98: run_matching (smbtorture.c:95)
==30946==    by 0x25FF98: run_matching (smbtorture.c:95)
==30946==    by 0x2601F7: torture_run_named_tests (smbtorture.c:143)
==30946==    by 0x261E76: main (smbtorture.c:665)
==30946==  Address 0x187ebbc6 is 598 bytes inside a block of size 1,325 alloc'd
==30946==    at 0x4C29110: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==30946==    by 0xF464A73: _talloc_pooled_object (in /usr/lib64/libtalloc.so.2.1.5)
==30946==    by 0xF67366D: _tevent_req_create (in /usr/lib64/libtevent.so.0.9.26)
==30946==    by 0xB0D49FF: smb1cli_req_create (smbXcli_base.c:1322)
==30946==    by 0x5ADFAB7: smbcli_transport_setup_subreq (clitransport.c:254)
==30946==    by 0x5ADFC37: smbcli_transport_send (clitransport.c:326)
==30946==    by 0x5AE33C3: smbcli_request_send (rawrequest.c:400)
==30946==    by 0x5ADC869: smb_raw_close_send (rawfile.c:832)
==30946==    by 0x5ADC8AC: smb_raw_close (rawfile.c:846)
==30946==    by 0x9BE60B4: smbcli_close (clifile.c:316)
==30946==    by 0x209F0D: create_file_with_stream (streams.c:1502)
==30946==    by 0x20A072: test_stream_create_disposition (streams.c:1527)
==30946==    by 0x16B21D: wrap_simple_1smb_test (util_smb.c:856)
==30946==    by 0x955368F: internal_torture_run_test (torture.c:442)
==30946==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==30946==    by 0x2600D6: run_matching (smbtorture.c:110)
==30946==    by 0x25FF98: run_matching (smbtorture.c:95)
==30946==    by 0x25FF98: run_matching (smbtorture.c:95)
==30946==    by 0x2601F7: torture_run_named_tests (smbtorture.c:143)
==30946==    by 0x261E76: main (smbtorture.c:665

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-04-25 10:35:15 +02:00
Noel Power
a22ccb04a0 s4:torture:raw: fix 'Syscall param writev(vector[...])' valgrind error
running smbtorture test raw.open.openx-over-dir.openx-over-dir results in
the following valgrind trace

==30597== Syscall param writev(vector[...]) points to uninitialised byte(s)
==30597==    at 0xFBA2C87: writev (in /lib64/libc-2.19.so)
==30597==    by 0x106CB033: writev_handler (async_sock.c:340)
==30597==    by 0xF67812A: ??? (in /usr/lib64/libtevent.so.0.9.26)
==30597==    by 0xF6765F6: ??? (in /usr/lib64/libtevent.so.0.9.26)
==30597==    by 0xF6727FC: _tevent_loop_once (in /usr/lib64/libtevent.so.0.9.26)
==30597==    by 0x5AE3400: smbcli_request_receive (rawrequest.c:416)
==30597==    by 0x5AE343E: smbcli_request_simple_recv (rawrequest.c:430)
==30597==    by 0x5ADC8BC: smb_raw_close (rawfile.c:847)
==30597==    by 0x9BE60B4: smbcli_close (clifile.c:316)
==30597==    by 0x1A57F0: test_openx_over_dir (open.c:1495)
==30597==    by 0x16B21D: wrap_simple_1smb_test (util_smb.c:856)
==30597==    by 0x955368F: internal_torture_run_test (torture.c:442)
==30597==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==30597==    by 0x2600BD: run_matching (smbtorture.c:110)
==30597==    by 0x25FF7F: run_matching (smbtorture.c:95)
==30597==    by 0x25FF7F: run_matching (smbtorture.c:95)
==30597==    by 0x2601DE: torture_run_named_tests (smbtorture.c:143)
==30597==    by 0x261E5D: main (smbtorture.c:665)
==30597==  Address 0x187e41d6 is 598 bytes inside a block of size 1,325 alloc'd
==30597==    at 0x4C29110: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==30597==    by 0xF464A73: _talloc_pooled_object (in /usr/lib64/libtalloc.so.2.1.5)
==30597==    by 0xF67366D: _tevent_req_create (in /usr/lib64/libtevent.so.0.9.26)
==30597==    by 0xB0D49FF: smb1cli_req_create (smbXcli_base.c:1322)
==30597==    by 0x5ADFAB7: smbcli_transport_setup_subreq (clitransport.c:254)
==30597==    by 0x5ADFC37: smbcli_transport_send (clitransport.c:326)
==30597==    by 0x5AE33C3: smbcli_request_send (rawrequest.c:400)
==30597==    by 0x5ADC869: smb_raw_close_send (rawfile.c:832)
==30597==    by 0x5ADC8AC: smb_raw_close (rawfile.c:846)
==30597==    by 0x9BE60B4: smbcli_close (clifile.c:316)
==30597==    by 0x1A57F0: test_openx_over_dir (open.c:1495)
==30597==    by 0x16B21D: wrap_simple_1smb_test (util_smb.c:856)
==30597==    by 0x955368F: internal_torture_run_test (torture.c:442)
==30597==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==30597==    by 0x2600BD: run_matching (smbtorture.c:110)
==30597==    by 0x25FF7F: run_matching (smbtorture.c:95)
==30597==    by 0x25FF7F: run_matching (smbtorture.c:95)
==30597==    by 0x2601DE: torture_run_named_tests (smbtorture.c:143)
==30597==    by 0x261E5D: main (smbtorture.c:665)
==30597==

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-04-25 10:35:15 +02:00
Noel Power
2a06c992c8 s4:torture:raw: fix 'Syscall param writev(vector[...])' valgrind error
running smbtorture test raw.open.chained-ntcreatex.chained-ntcreatex results
in the following valgrind trace

==30405== Syscall param writev(vector[...]) points to uninitialised byte(s)
==30405==    at 0xFBA2C87: writev (in /lib64/libc-2.19.so)
==30405==    by 0x106CB033: writev_handler (async_sock.c:340)
==30405==    by 0xF67812A: ??? (in /usr/lib64/libtevent.so.0.9.26)
==30405==    by 0xF6765F6: ??? (in /usr/lib64/libtevent.so.0.9.26)
==30405==    by 0xF6727FC: _tevent_loop_once (in /usr/lib64/libtevent.so.0.9.26)
==30405==    by 0x5AE3400: smbcli_request_receive (rawrequest.c:416)
==30405==    by 0x5AE343E: smbcli_request_simple_recv (rawrequest.c:430)
==30405==    by 0x5ADC8BC: smb_raw_close (rawfile.c:847)
==30405==    by 0x9BE60B4: smbcli_close (clifile.c:316)
==30405==    by 0x1A66B4: test_chained_ntcreatex_readx (open.c:1735)
==30405==    by 0x16B21D: wrap_simple_1smb_test (util_smb.c:856)
==30405==    by 0x955368F: internal_torture_run_test (torture.c:442)
==30405==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==30405==    by 0x2600A4: run_matching (smbtorture.c:110)
==30405==    by 0x25FF66: run_matching (smbtorture.c:95)
==30405==    by 0x25FF66: run_matching (smbtorture.c:95)
==30405==    by 0x2601C5: torture_run_named_tests (smbtorture.c:143)
==30405==    by 0x261E44: main (smbtorture.c:665)
==30405==  Address 0x187e1196 is 598 bytes inside a block of size 1,325 alloc'd
==30405==    at 0x4C29110: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==30405==    by 0xF464A73: _talloc_pooled_object (in /usr/lib64/libtalloc.so.2.1.5)
==30405==    by 0xF67366D: _tevent_req_create (in /usr/lib64/libtevent.so.0.9.26)
==30405==    by 0xB0D49FF: smb1cli_req_create (smbXcli_base.c:1322)
==30405==    by 0x5ADFAB7: smbcli_transport_setup_subreq (clitransport.c:254)
==30405==    by 0x5ADFC37: smbcli_transport_send (clitransport.c:326)
==30405==    by 0x5AE33C3: smbcli_request_send (rawrequest.c:400)
==30405==    by 0x5ADC869: smb_raw_close_send (rawfile.c:832)
==30405==    by 0x5ADC8AC: smb_raw_close (rawfile.c:846)
==30405==    by 0x9BE60B4: smbcli_close (clifile.c:316)
==30405==    by 0x1A66B4: test_chained_ntcreatex_readx (open.c:1735)
==30405==    by 0x16B21D: wrap_simple_1smb_test (util_smb.c:856)
==30405==    by 0x955368F: internal_torture_run_test (torture.c:442)
==30405==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==30405==    by 0x2600A4: run_matching (smbtorture.c:110)
==30405==    by 0x25FF66: run_matching (smbtorture.c:95)
==30405==    by 0x25FF66: run_matching (smbtorture.c:95)
==30405==    by 0x2601C5: torture_run_named_tests (smbtorture.c:143)
==30405==    by 0x261E44: main (smbtorture.c:665)

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-04-25 10:35:15 +02:00
Noel Power
83cb2bae8d s4:torture:basic: fix 'Conditional jump or move ' valgrind error
running smbtorture test base.bench-holdopen.bench-holdopen yields the
following valgrind trace.

==29953== Conditional jump or move depends on uninitialised value(s)
==29953==    at 0xF4634F0: _talloc_zero_array (in /usr/lib64/libtalloc.so.2.1.5)
==29953==    by 0x5AE257E: smbcli_request_setup_transport (rawrequest.c:101)
==29953==    by 0x5AE04AF: smb_raw_echo_send (clitransport.c:554)
==29953==    by 0x5AE0774: smb_raw_echo (clitransport.c:609)
==29953==    by 0x4183D3: torture_holdopen (misc.c:288)
==29953==    by 0x16B21D: wrap_simple_1smb_test (util_smb.c:856)
==29953==    by 0x955368F: internal_torture_run_test (torture.c:442)
==29953==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==29953==    by 0x2600A4: run_matching (smbtorture.c:110)
==29953==    by 0x25FF66: run_matching (smbtorture.c:95)
==29953==    by 0x2601C5: torture_run_named_tests (smbtorture.c:143)
==29953==    by 0x261E44: main (smbtorture.c:665)
==29953==
==29953== Conditional jump or move depends on uninitialised value(s)
==29953==    at 0xF4630E3: _talloc_zero (in /usr/lib64/libtalloc.so.2.1.5)
==29953==    by 0x5AE257E: smbcli_request_setup_transport (rawrequest.c:101)
==29953==    by 0x5AE04AF: smb_raw_echo_send (clitransport.c:554)
==29953==    by 0x5AE0774: smb_raw_echo (clitransport.c:609)
==29953==    by 0x4183D3: torture_holdopen (misc.c:288)
==29953==    by 0x16B21D: wrap_simple_1smb_test (util_smb.c:856)
==29953==    by 0x955368F: internal_torture_run_test (torture.c:442)
==29953==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==29953==    by 0x2600A4: run_matching (smbtorture.c:110)
==29953==    by 0x25FF66: run_matching (smbtorture.c:95)
==29953==    by 0x2601C5: torture_run_named_tests (smbtorture.c:143)
==29953==    by 0x261E44: main (smbtorture.c:665)
==29953==

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-04-25 10:35:15 +02:00
Noel Power
d94940276a s4:torture:basic: fix 'Syscall param writev(vector[...])' valgrind error
smbtorture test  base.winattr.winattr yields the following trace

==25514== Syscall param writev(vector[...]) points to uninitialised byte(s)
==25514==    at 0xFBA2C87: writev (in /lib64/libc-2.19.so)
==25514==    by 0x106CB033: writev_handler (async_sock.c:340)
==25514==    by 0xF67812A: ??? (in /usr/lib64/libtevent.so.0.9.26)
==25514==    by 0xF6765F6: ??? (in /usr/lib64/libtevent.so.0.9.26)
==25514==    by 0xF6727FC: _tevent_loop_once (in /usr/lib64/libtevent.so.0.9.26)
==25514==    by 0x5AE3400: smbcli_request_receive (rawrequest.c:416)
==25514==    by 0x5AEEC7E: smb_raw_nttrans_recv (rawtrans.c:408)
==25514==    by 0x5AF6543: smb_raw_query_secdesc_recv (rawacl.c:67)
==25514==    by 0x5AF580F: smb_raw_fileinfo_recv (rawfileinfo.c:699)
==25514==    by 0x5AF58BE: smb_raw_fileinfo (rawfileinfo.c:721)
==25514==    by 0x454AC3: torture_winattrtest (attr.c:217)
==25514==    by 0x16B21D: wrap_simple_1smb_test (util_smb.c:856)
==25514==    by 0x955368F: internal_torture_run_test (torture.c:442)
==25514==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==25514==    by 0x2600A4: run_matching (smbtorture.c:110)
==25514==    by 0x25FF66: run_matching (smbtorture.c:95)
==25514==    by 0x2601C5: torture_run_named_tests (smbtorture.c:143)
==25514==    by 0x261E44: main (smbtorture.c:665)
==25514==  Address 0x187d69c6 is 598 bytes inside a block of size 1,325 alloc'd
==25514==    at 0x4C29110: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==25514==    by 0xF464A73: _talloc_pooled_object (in /usr/lib64/libtalloc.so.2.1.5)
==25514==    by 0xF67366D: _tevent_req_create (in /usr/lib64/libtevent.so.0.9.26)
==25514==    by 0xB0D49FF: smb1cli_req_create (smbXcli_base.c:1322)
==25514==    by 0xB0E1E6D: smb1cli_trans_send (smb1cli_trans.c:512)
==25514==    by 0x5AEE9B2: smb_raw_nttrans_send (rawtrans.c:310)
==25514==    by 0x5AF64F0: smb_raw_query_secdesc_send (rawacl.c:51)
==25514==    by 0x5AF56E5: smb_raw_fileinfo_send (rawfileinfo.c:658)
==25514==    by 0x5AF58A3: smb_raw_fileinfo (rawfileinfo.c:720)
==25514==    by 0x454AC3: torture_winattrtest (attr.c:217)
==25514==    by 0x16B21D: wrap_simple_1smb_test (util_smb.c:856)
==25514==    by 0x955368F: internal_torture_run_test (torture.c:442)
==25514==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==25514==    by 0x2600A4: run_matching (smbtorture.c:110)
==25514==    by 0x25FF66: run_matching (smbtorture.c:95)
==25514==    by 0x2601C5: torture_run_named_tests (smbtorture.c:143)
==25514==    by 0x261E44: main (smbtorture.c:665)

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-04-25 10:35:15 +02:00
Noel Power
c20fb11665 s4:torture:basic: fix valgrind 'Syscall param writev(vector[...])' error.
smbtorture test base.aliases.setpathinfo_aliases.setpathinfo_aliases
results in the following valgrind trace

==23067== Syscall param writev(vector[...]) points to uninitialised byte(s)
==23067==    at 0xFBA2C87: writev (in /lib64/libc-2.19.so)
==23067==    by 0x106CB033: writev_handler (async_sock.c:340)
==23067==    by 0xF67812A: ??? (in /usr/lib64/libtevent.so.0.9.26)
==23067==    by 0xF6765F6: ??? (in /usr/lib64/libtevent.so.0.9.26)
==23067==    by 0xF6727FC: _tevent_loop_once (in /usr/lib64/libtevent.so.0.9.26)
==23067==    by 0x5AE3400: smbcli_request_receive (rawrequest.c:416)
==23067==    by 0x5AE6019: smb_raw_write_recv (rawreadwrite.c:303)
==23067==    by 0x5AE63FD: smb_raw_write (rawreadwrite.c:344)
==23067==    by 0x9BE50CA: smbcli_write (clireadwrite.c:118)
==23067==    by 0x423EB4: setpathinfo_aliases (aliases.c:367)
==23067==    by 0x16B21D: wrap_simple_1smb_test (util_smb.c:856)
==23067==    by 0x955368F: internal_torture_run_test (torture.c:442)
==23067==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==23067==    by 0x2600A4: run_matching (smbtorture.c:110)
==23067==    by 0x25FF66: run_matching (smbtorture.c:95)
==23067==    by 0x25FF66: run_matching (smbtorture.c:95)
==23067==    by 0x2601C5: torture_run_named_tests (smbtorture.c:143)
==23067==    by 0x261E44: main (smbtorture.c:665)
==23067==  Address 0x187e0096 is 598 bytes inside a block of size 1,325 alloc'd
==23067==    at 0x4C29110: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==23067==    by 0xF464A73: _talloc_pooled_object (in /usr/lib64/libtalloc.so.2.1.5)
==23067==    by 0xF67366D: _tevent_req_create (in /usr/lib64/libtevent.so.0.9.26)
==23067==    by 0xB0D49FF: smb1cli_req_create (smbXcli_base.c:1322)
==23067==    by 0x5ADFAB7: smbcli_transport_setup_subreq (clitransport.c:254)
==23067==    by 0x5ADFC37: smbcli_transport_send (clitransport.c:326)
==23067==    by 0x5AE33C3: smbcli_request_send (rawrequest.c:400)
==23067==    by 0x5AE5FDD: smb_raw_write_send (rawreadwrite.c:289)
==23067==    by 0x5AE63E6: smb_raw_write (rawreadwrite.c:343)
==23067==    by 0x9BE50CA: smbcli_write (clireadwrite.c:118)
==23067==    by 0x423EB4: setpathinfo_aliases (aliases.c:367)
==23067==    by 0x16B21D: wrap_simple_1smb_test (util_smb.c:856)
==23067==    by 0x955368F: internal_torture_run_test (torture.c:442)
==23067==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==23067==    by 0x2600A4: run_matching (smbtorture.c:110)
==23067==    by 0x25FF66: run_matching (smbtorture.c:95)
==23067==    by 0x25FF66: run_matching (smbtorture.c:95)
==23067==    by 0x2601C5: torture_run_named_tests (smbtorture.c:143)
==23067==    by 0x261E44: main (smbtorture.c:665)
==23067==

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-04-25 10:35:15 +02:00
Noel Power
6806c1486e s4:torture:basic: fix valgrind 'Syscall param writev(vector[...])' error
smbtorture test  base.aliases.setfileinfo_aliases.setfileinfo_aliases
results in the following valgrind trace

==22757== Syscall param writev(vector[...]) points to uninitialised byte(s)
==22757==    at 0xFBA2C87: writev (in /lib64/libc-2.19.so)
==22757==    by 0x106CB033: writev_handler (async_sock.c:340)
==22757==    by 0xF67812A: ??? (in /usr/lib64/libtevent.so.0.9.26)
==22757==    by 0xF6765F6: ??? (in /usr/lib64/libtevent.so.0.9.26)
==22757==    by 0xF6727FC: _tevent_loop_once (in /usr/lib64/libtevent.so.0.9.26)
==22757==    by 0x5AE3400: smbcli_request_receive (rawrequest.c:416)
==22757==    by 0x5AE6019: smb_raw_write_recv (rawreadwrite.c:303)
==22757==    by 0x5AE63FD: smb_raw_write (rawreadwrite.c:344)
==22757==    by 0x9BE50CA: smbcli_write (clireadwrite.c:118)
==22757==    by 0x423C91: setfileinfo_aliases (aliases.c:327)
==22757==    by 0x16B21D: wrap_simple_1smb_test (util_smb.c:856)
==22757==    by 0x955368F: internal_torture_run_test (torture.c:442)
==22757==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==22757==    by 0x2600A4: run_matching (smbtorture.c:110)
==22757==    by 0x25FF66: run_matching (smbtorture.c:95)
==22757==    by 0x25FF66: run_matching (smbtorture.c:95)
==22757==    by 0x2601C5: torture_run_named_tests (smbtorture.c:143)
==22757==    by 0x261E44: main (smbtorture.c:665)
==22757==  Address 0x187dfee6 is 598 bytes inside a block of size 1,325 alloc'd
==22757==    at 0x4C29110: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==22757==    by 0xF464A73: _talloc_pooled_object (in /usr/lib64/libtalloc.so.2.1.5)
==22757==    by 0xF67366D: _tevent_req_create (in /usr/lib64/libtevent.so.0.9.26)
==22757==    by 0xB0D49FF: smb1cli_req_create (smbXcli_base.c:1322)
==22757==    by 0x5ADFAB7: smbcli_transport_setup_subreq (clitransport.c:254)
==22757==    by 0x5ADFC37: smbcli_transport_send (clitransport.c:326)
==22757==    by 0x5AE33C3: smbcli_request_send (rawrequest.c:400)
==22757==    by 0x5AE5FDD: smb_raw_write_send (rawreadwrite.c:289)
==22757==    by 0x5AE63E6: smb_raw_write (rawreadwrite.c:343)
==22757==    by 0x9BE50CA: smbcli_write (clireadwrite.c:118)
==22757==    by 0x423C91: setfileinfo_aliases (aliases.c:327)
==22757==    by 0x16B21D: wrap_simple_1smb_test (util_smb.c:856)
==22757==    by 0x955368F: internal_torture_run_test (torture.c:442)
==22757==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==22757==    by 0x2600A4: run_matching (smbtorture.c:110)
==22757==    by 0x25FF66: run_matching (smbtorture.c:95)
==22757==    by 0x25FF66: run_matching (smbtorture.c:95)
==22757==    by 0x2601C5: torture_run_named_tests (smbtorture.c:143)
==22757==    by 0x261E44: main (smbtorture.c:665)

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-04-25 10:35:15 +02:00
Noel Power
a5ce559a80 s4:torture:basic: fix valgrind 'Syscall param writev(vector[...])' error
running smbtorture test base.aliases.FINDFIRST aliases.FINDFIRST aliases
results in the following valgrind trace

==22639== Syscall param writev(vector[...]) points to uninitialised byte(s)
==22639==    at 0xFBA2C87: writev (in /lib64/libc-2.19.so)
==22639==    by 0x106CB033: writev_handler (async_sock.c:340)
==22639==    by 0xF67812A: ??? (in /usr/lib64/libtevent.so.0.9.26)
==22639==    by 0xF6765F6: ??? (in /usr/lib64/libtevent.so.0.9.26)
==22639==    by 0xF6727FC: _tevent_loop_once (in /usr/lib64/libtevent.so.0.9.26)
==22639==    by 0x5AE3400: smbcli_request_receive (rawrequest.c:416)
==22639==    by 0x5AE6019: smb_raw_write_recv (rawreadwrite.c:303)
==22639==    by 0x5AE63FD: smb_raw_write (rawreadwrite.c:344)
==22639==    by 0x9BE50CA: smbcli_write (clireadwrite.c:118)
==22639==    by 0x423672: findfirst_aliases (aliases.c:213)
==22639==    by 0x16B21D: wrap_simple_1smb_test (util_smb.c:856)
==22639==    by 0x955368F: internal_torture_run_test (torture.c:442)
==22639==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==22639==    by 0x2600A4: run_matching (smbtorture.c:110)
==22639==    by 0x25FF66: run_matching (smbtorture.c:95)
==22639==    by 0x25FF66: run_matching (smbtorture.c:95)
==22639==    by 0x2601C5: torture_run_named_tests (smbtorture.c:143)
==22639==    by 0x261E44: main (smbtorture.c:665)
==22639==  Address 0x187dfd26 is 598 bytes inside a block of size 1,325 alloc'd
==22639==    at 0x4C29110: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==22639==    by 0xF464A73: _talloc_pooled_object (in /usr/lib64/libtalloc.so.2.1.5)
==22639==    by 0xF67366D: _tevent_req_create (in /usr/lib64/libtevent.so.0.9.26)
==22639==    by 0xB0D49FF: smb1cli_req_create (smbXcli_base.c:1322)
==22639==    by 0x5ADFAB7: smbcli_transport_setup_subreq (clitransport.c:254)
==22639==    by 0x5ADFC37: smbcli_transport_send (clitransport.c:326)
==22639==    by 0x5AE33C3: smbcli_request_send (rawrequest.c:400)
==22639==    by 0x5AE5FDD: smb_raw_write_send (rawreadwrite.c:289)
==22639==    by 0x5AE63E6: smb_raw_write (rawreadwrite.c:343)
==22639==    by 0x9BE50CA: smbcli_write (clireadwrite.c:118)
==22639==    by 0x423672: findfirst_aliases (aliases.c:213)
==22639==    by 0x16B21D: wrap_simple_1smb_test (util_smb.c:856)
==22639==    by 0x955368F: internal_torture_run_test (torture.c:442)
==22639==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==22639==    by 0x2600A4: run_matching (smbtorture.c:110)
==22639==    by 0x25FF66: run_matching (smbtorture.c:95)
==22639==    by 0x25FF66: run_matching (smbtorture.c:95)
==22639==    by 0x2601C5: torture_run_named_tests (smbtorture.c:143)
==22639==    by 0x261E44: main (smbtorture.c:665)

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-04-25 10:35:15 +02:00
Noel Power
4d5a73e246 s4:torture:basic fix 'Syscall param writev(vector[...])' valgrind error
smbtorture 'base.aliases.QPATHINFO aliases.QPATHINFO aliases' results in
following valgrind trace

==22469== Syscall param writev(vector[...]) points to uninitialised byte(s)
==22469==    at 0xFBA2C87: writev (in /lib64/libc-2.19.so)
==22469==    by 0x106CB033: writev_handler (async_sock.c:340)
==22469==    by 0xF67812A: ??? (in /usr/lib64/libtevent.so.0.9.26)
==22469==    by 0xF6765F6: ??? (in /usr/lib64/libtevent.so.0.9.26)
==22469==    by 0xF6727FC: _tevent_loop_once (in /usr/lib64/libtevent.so.0.9.26)
==22469==    by 0x5AE3400: smbcli_request_receive (rawrequest.c:416)
==22469==    by 0x5AE6019: smb_raw_write_recv (rawreadwrite.c:303)
==22469==    by 0x5AE63FD: smb_raw_write (rawreadwrite.c:344)
==22469==    by 0x9BE50CA: smbcli_write (clireadwrite.c:118)
==22469==    by 0x423431: qpathinfo_aliases (aliases.c:171)
==22469==    by 0x16B21D: wrap_simple_1smb_test (util_smb.c:856)
==22469==    by 0x955368F: internal_torture_run_test (torture.c:442)
==22469==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==22469==    by 0x2600A4: run_matching (smbtorture.c:110)
==22469==    by 0x25FF66: run_matching (smbtorture.c:95)
==22469==    by 0x25FF66: run_matching (smbtorture.c:95)
==22469==    by 0x2601C5: torture_run_named_tests (smbtorture.c:143)
==22469==    by 0x261E44: main (smbtorture.c:665)
==22469==  Address 0x187dfb86 is 598 bytes inside a block of size 1,325 alloc'd
==22469==    at 0x4C29110: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==22469==    by 0xF464A73: _talloc_pooled_object (in /usr/lib64/libtalloc.so.2.1.5)
==22469==    by 0xF67366D: _tevent_req_create (in /usr/lib64/libtevent.so.0.9.26)
==22469==    by 0xB0D49FF: smb1cli_req_create (smbXcli_base.c:1322)
==22469==    by 0x5ADFAB7: smbcli_transport_setup_subreq (clitransport.c:254)
==22469==    by 0x5ADFC37: smbcli_transport_send (clitransport.c:326)
==22469==    by 0x5AE33C3: smbcli_request_send (rawrequest.c:400)
==22469==    by 0x5AE5FDD: smb_raw_write_send (rawreadwrite.c:289)
==22469==    by 0x5AE63E6: smb_raw_write (rawreadwrite.c:343)
==22469==    by 0x9BE50CA: smbcli_write (clireadwrite.c:118)
==22469==    by 0x423431: qpathinfo_aliases (aliases.c:171)
==22469==    by 0x16B21D: wrap_simple_1smb_test (util_smb.c:856)
==22469==    by 0x955368F: internal_torture_run_test (torture.c:442)
==22469==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==22469==    by 0x2600A4: run_matching (smbtorture.c:110)
==22469==    by 0x25FF66: run_matching (smbtorture.c:95)
==22469==    by 0x25FF66: run_matching (smbtorture.c:95)
==22469==    by 0x2601C5: torture_run_named_tests (smbtorture.c:143)
==22469==    by 0x261E44: main (smbtorture.c:665)

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-04-25 10:35:14 +02:00