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

410 Commits

Author SHA1 Message Date
Andreas Schneider
677bc1b184 s4:torture: Skip the deltest20 as user root
The test is meant to be run as a user and not root.

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Jan 30 16:54:33 UTC 2020 on sn-devel-184
2020-01-30 16:54:33 +00:00
Mathieu Parent
619e8f46d8 Spelling fixes s/ upto / up to /
Signed-off-by: Mathieu Parent <math.parent@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2019-09-01 22:21:27 +00:00
Andreas Schneider
c1b6fe62a4 s4:torture: Make sure we do not create a shadow 'struct params'
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-03-04 21:41:17 +00:00
Aliaksei Karaliou
facd6f2daf s4:torture:base:bench-readwrite: fix uninitialized memory causing segfault
Allocation of 'struct smb_composite_connect' happens without zeroing
so that smb_composite_connect_send() thinks that connection
already exists and fails on its handling.

Signed-off-by: Aliaksei Karaliou <akaraliou@panasas.com>
Reviewed-by: Douglas Bagnall <dbagnall@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2019-01-08 03:40:26 +01:00
Olly Betts
28aeb86a9f Fix spelling mistakes
Signed-off-by: Olly Betts <olly@survex.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-11-30 03:35:13 +01:00
Anoop C S
6a7f11746c s4/torture: Add new test for DELETE_ON_CLOSE on non-empty directories
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13204

Signed-off-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2018-08-10 18:05:09 +02:00
Andreas Schneider
7a00d90d66 s4:torture: Use strlcpy() in gen_name()
../source4/torture/basic/mangle_test.c: In function ‘gen_name’:
../source4/torture/basic/mangle_test.c:148:3: error: ‘strncpy’ output
    truncated before terminating nul copying 5 bytes from a string of the
    same length [-Werror=stringop-truncation]
   strncpy(p, "ABCDE", 5);
   ^~~~~~~~~~~~~~~~~~~~~~

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2018-05-17 17:30:09 +02:00
Mathieu Parent
6fa770fd54 Fix spelling s/processs/process/
Signed-off-by: Mathieu Parent <math.parent@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2018-05-12 02:09:27 +02:00
Mathieu Parent
2bde81db39 Fix spelling s/doens't/doesn't/
Signed-off-by: Mathieu Parent <math.parent@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2018-05-12 02:09:26 +02:00
Jeremy Allison
c98cd0f25e s4: torture: Test all combinations of directory open with existing directory to ensure behavior is the same.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13358

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Mar 29 23:13:42 CEST 2018 on sn-devel-144
2018-03-29 23:13:41 +02:00
Jeremy Allison
fd9084336e s4: torture: Test all combinations of directory create to ensure behavior is the same.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13358

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
2018-03-29 20:31:34 +02:00
Jeremy Allison
820b35bb1c s4: torture: Test all combinations of file open with existing file to ensure behavior is the same.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13358

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
2018-03-29 20:31:34 +02:00
Jeremy Allison
22fe8dcb77 s4: torture: Test all combinations of file create to ensure behavior is the same.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13358

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
2018-03-29 20:31:34 +02:00
Jeremy Allison
53cdf7a9a1 s4: torture: Ensure a failed file create doesn't create the file.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13358

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
2018-03-29 20:31:34 +02:00
Andreas Schneider
50d3a9e70d s4:torture: Add FALL_THROUGH statements in basic/misc.c
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-03-01 04:37:43 +01:00
Ralph Boehme
4c857e08a0 selftest: run deltest20 against s3 as well
This marks the test as knownfail, the next commit fixes it.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2018-02-03 18:41:08 +01:00
Uri Simchoni
559367ed60 s4-torture: fix truncation warnings
Fix various places where there is potential truncation
while doing time / size calculations.

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2017-11-24 01:13:15 +01:00
Richard Sharpe
2186d4d317 Add a test for unsetting Delete-on-Close before the close by DoC opener.
Windows semantics says that any unset of Delete-on-Close before the client
that opened for Delete-on-Close closes the file is silently ignored and the file
is still deleted on the last close. This test tests that in a single open case.

Signed-off-by: Richard Sharpe <realrichardsharpe@gmail.com>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Jul 28 11:47:06 CEST 2017 on sn-devel-144
2017-07-28 11:47:06 +02:00
Richard Sharpe
886c26238a Fix incorrect error messages:unsetting not setting.
The error messages are wrong and could give testers the wrong idea.

Signed-off-by: Richard Sharpe <realrichardsharpe@gmail.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
2017-07-28 07:53:25 +02:00
Herb Lewis
7dec1e1eb1 delete duplicate test
Signed-off-by: Herb Lewis <herb@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>

Autobuild-User(master): Herb Lewis <herb@samba.org>
Autobuild-Date(master): Sat Jul  8 05:57:55 CEST 2017 on sn-devel-144
2017-07-08 05:57:55 +02:00
Jeremy Allison
b2de5a81bf s4: popt: Global replace of cmdline_credentials -> popt_get_cmdline_credentials().
Add one use of popt_set_cmdline_credentials().
Fix 80 column limits when cmdline_credentials changes
to popt_get_cmdline_credentials().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2017-05-11 20:30:13 +02:00
Jeremy Allison
0a301e82d7 s4: torture: Add a TALLOC_CTX * to torture_test_delete().
Reviewed-by: Ralph Böhme <slow@samba.org>
Signed-off-by: Jeremy Allison <jra@samba.org>
2017-05-05 15:52:13 +02:00
Jeremy Allison
c99994eb5a s4: torture: Pass TALLOC_CTX * to torture_delay_write().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
2017-05-05 15:52:11 +02:00
Jeremy Allison
e7e56bcc72 s4: torture: Change torture_register_suite() to add a TALLOC_CTX *.
Change callers to use the passed in TALLOC_CTX *
instead of talloc_autofree_context().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
2017-05-05 15:52:11 +02:00
Jeremy Allison
306783d6f5 lib: modules: Change XXX_init interface from XXX_init(void) to XXX_init(TALLOC_CTX *)
Not currently used - no logic changes inside.

This will make it possible to pass down a long-lived talloc
context from the loading function for modules to use instead
of having them internally all use talloc_autofree_context()
which is a hidden global.

Updated all known module interface numbers, and added a
WHATSNEW.

Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Ralph Böhme <slow@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Apr 22 01:17:00 CEST 2017 on sn-devel-144
2017-04-22 01:17:00 +02: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
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
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
Stefan Metzmacher
68d6c10e5e CVE-2016-2115: s4:libcli/raw: pass the minprotocol to smb_raw_negotiate*()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11756

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2016-04-12 19:25:26 +02:00
Stefan Metzmacher
f10589c0e1 CVE-2016-2111: s4:torture/base: don't use ntlmv2 for dos connection in base.samba3error
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11749

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2016-04-12 19:25:24 +02:00
Aurelien Aptel
2285519043 s3,s4 torture/denytest: fix possible infinite loop
Signed-off-by: Aurelien Aptel <aaptel@suse.com>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: David Disseldorf <ddis@suse.de>

Autobuild-User(master): Alexander Bokovoy <ab@samba.org>
Autobuild-Date(master): Fri Mar  4 21:23:45 CET 2016 on sn-devel-144
2016-03-04 21:23:45 +01:00
Anoop C S
d2a0806cbd s4:torture/basic: Fix misleading test case names in aliases test
Previously, "QFILEINFO aliases" was running qfsinfo_aliases and
"QFSINFO aliases" was running qfileinfo_aliases. This change
is to make sure that each of them point towards correct test cases.

Signed-off-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Tue Dec  1 20:44:54 CET 2015 on sn-devel-104
2015-12-01 20:44:53 +01:00
Mathieu Parent
c315fce17e Fix various spelling errors
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Nov  6 13:43:45 CET 2015 on sn-devel-104
2015-11-06 13:43:45 +01:00
Michael Adam
6e3cb6b24f s4:torture: fix a comment typo.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Oct 29 00:42:49 CET 2015 on sn-devel-104
2015-10-29 00:42:49 +01:00
Herb Lewis
e9c5b63167 s4: torture: Fix double-free on error.
Signed-off-by: Herb Lewis <hlewis@panasas.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-09-22 20:45:10 +02:00
Volker Lendecke
de811f14af lib: Remove tdb_compat
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2015-03-17 11:30:52 +01:00
Volker Lendecke
47795aef9d lib: Remove tdb_open_compat
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2015-03-17 11:30:51 +01:00
Michael Adam
ca9e46d130 s4:torture:basic: eliminate potential for false failures in delayed_write_update1c
We want to test that the write did update the write time immediately.
We check this by getting the file info in a loop for a few seconds.
There are several result cases:

- the server updated the write time immediately - success
- the server updated the write time, but not immediately - failure
- the server did not update the write time - failure

The loop is only there to be able to discern between the two
failure cases. The check for success is whether the first
getinfo has reportet the updated write time.

The potential for false failures was the additional timing check.
So if the first fileinfo call just took too long (e.g. due to a
busy system), this was reported as failure.

This patch should eliminate interemittent autobuild failures.

Signed-off-by: Michael Adam <obnox@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-10-03 08:34:06 +02:00
Michael Adam
95d333f03d s4:torture:basic: use assert in the second loop in delayed_write_update1b
We can hence replace the assert after the loop by a success torture_comment.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-10-03 08:34:06 +02:00
Michael Adam
8d198769d4 s4:torture:basic: add check for size after initial write in delayed_write_update1c
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-10-03 08:34:06 +02:00