summaryrefslogtreecommitdiffstats
path: root/source4/torture
Commit message (Collapse)AuthorAgeFilesLines
...
* s4:torture/rpc: make use of dcerpc_binding_handle_auth_info() in lsa.cStefan Metzmacher2014-03-251-2/+7
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:torture/rpc: fix altercontext test against windowsStefan Metzmacher2014-03-251-1/+5
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:torture/rpc: remove bogus rpc.multibind testStefan Metzmacher2014-03-253-78/+1
| | | | | | | | | | | | We can later add a more useful test that tests security context multiplexing correctly. And another one that demonstrates that only DCERPC_BIND must be the first (and only the first) PDU on a connection. Otherwise DCERPC_ALTER_CONTEXT is used. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:torture/rpc: avoid using dcecli_connection->binding_stringStefan Metzmacher2014-03-251-5/+3
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:torture/rpc: fix error path in torture_leave_domain()Stefan Metzmacher2014-03-251-2/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4-torture: add some tests for pre-allocated buffers in enumprinterdrivers call.Günther Deschner2014-03-201-0/+10
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s4-torture: add test_EnumPrinterDrivers_buffers function.Günther Deschner2014-03-201-11/+31
| | | | | | | | | This will allow to test the enumdriver call with pre-allocated buffer. Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* CVE-2013-4496:samr: Remove ChangePasswordUserAndrew Bartlett2014-03-131-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This old password change mechanism does not provide the plaintext to validate against password complexity, and it is not used by modern clients. It also has quite difficult semantics to handle regarding password lockout. The missing features in both implementations (by design) were: - the password complexity checks (no plaintext) - the minimum password length (no plaintext) Additionally, the source3 version did not check: - the minimum password age - pdb_get_pass_can_change() which checks the security descriptor for the 'user cannot change password' setting. - the password history - the output of the 'passwd program' if 'unix passwd sync = yes'. Finally, the mechanism was almost useless, as it was incorrectly only made available to administrative users with permission to reset the password. It is removed here so that it is not mistakenly reinstated in the future. Andrew Bartlett Bug: https://bugzilla.samba.org/show_bug.cgi?id=10245 Change-Id: If2edd3183c177e5ff37c9511b0d0ad0dd9038c66 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-on: https://gerrit.samba.org/37
* s4: smbtorture: Add a proper change_notify going async followed by tdis test.Jeremy Allison2014-03-121-1/+67
| | | | | | | | | | | | [Bug 10344] SessionLogoff on a signed connection with an outstanding notify request crashes smbd. https://bugzilla.samba.org/show_bug.cgi?id=10344 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Mar 12 20:12:58 CET 2014 on sn-devel-104
* s4: smbtorture: Update the torture_smb2_notify_ulogoff test to demonstrate ↵Jeremy Allison2014-03-121-6/+14
| | | | | | | | | | | | | the problem. [Bug 10344] SessionLogoff on a signed connection with an outstanding notify request crashes smbd. https://bugzilla.samba.org/show_bug.cgi?id=10344 Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Jeremy Allison <jra@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s4:torture/smb2: accept NT_STATUS_RANGE_NOT_LOCKED after smb2_logoff/tdisStefan Metzmacher2014-03-121-11/+13
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* Remove all uses of the NT_STATUS_NOT_OK_RETURN_AND_FREE macro from the codebase.Garming Sam2014-03-051-1/+4
| | | | | | | | | | Following the current coding guidelines, it is considered bad practice to return from within a macro and change control flow as they look like normal function calls. Change-Id: I421e169275fe323e2b019c6cc5d386289aec07f7 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* torture: Fix a torture crash with -O3Volker Lendecke2014-02-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When compiled with -O3, smbtorture can crash after the following valgrind trace: ==16944== Conditional jump or move depends on uninitialised value(s) ==16944== at 0x57FFAC3: ndr_push_unique_ptr (ndr_basic.c:730) ==16944== by 0x58CB855: ndr_push_spoolss_SetPrinterInfo (ndr_spoolss.c:7939) ==16944== by 0x58E2F95: ndr_push_spoolss_SetPrinter (ndr_spoolss.c:24724) ==16944== by 0x417C78C: dcerpc_binding_handle_call_send (binding_handle.c:410) ==16944== by 0x417C986: dcerpc_binding_handle_call (binding_handle.c:547) ==16944== by 0x522059C: dcerpc_spoolss_SetPrinter_r (ndr_spoolss_c.c:1722) ==16944== by 0x2853BD: test_sd_set_level (spoolss.c:1248) ==16944== by 0x28F146: test_PrinterInfo_SD (spoolss.c:1962) ==16944== by 0x2A3C31: test_EnumPrinters_old (spoolss.c:6589) ==16944== by 0x41F6D66: internal_torture_run_test.part.0 (torture.c:442) ==16944== by 0x41F711F: torture_run_tcase_restricted (torture.c:758) ==16944== by 0x2018E8: run_matching.isra.1 (smbtorture.c:103) ==16944== by 0x20176B: run_matching.isra.1 (smbtorture.c:95) ==16944== by 0x20176B: run_matching.isra.1 (smbtorture.c:95) ==16944== by 0x201C12: torture_run_named_tests (smbtorture.c:143) ==16944== by 0x202F5B: main (smbtorture.c:661) My assumption is that with optimization gcc makes use of the fact that the structures that this patch moves go out of scope. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Fri Feb 28 21:27:11 CET 2014 on sn-devel-104
* torture: Fix a buffer overrunVolker Lendecke2014-02-281-2/+2
| | | | | | | | | | | In test_EnumPrinterDrivers we go up to driver level 8. In C, this means we are accessing the 9th entry in the following lines: ctx->driver_count[level] = count; ctx->drivers[level] = info; Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s4:torture/libnet: make use of dcerpc_binding_get_string_option("host")Stefan Metzmacher2014-02-134-7/+10
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:torture/rpc: make use of dcerpc_binding_get_string_option("host")Stefan Metzmacher2014-02-132-2/+3
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:torture/drs: make use of dcerpc_binding_get_string_option("host")Stefan Metzmacher2014-02-131-2/+5
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:torture/drs: use make use of dcerpc_binding_get_string_option("host")Stefan Metzmacher2014-02-131-1/+2
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:torture/drs: make use of dcerpc_binding_set_flags()Stefan Metzmacher2014-02-132-2/+13
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:torture/rpc: make use of dcerpc_binding_set_flags()Stefan Metzmacher2014-02-133-3/+11
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:torture/rpc: use dcerpc_binding_set_abstract_syntax() in epmapper.cStefan Metzmacher2014-02-131-1/+3
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:torture/rpc: make use of dcerpc_binding_set_abstract_syntax() in epmapper.cStefan Metzmacher2014-02-131-3/+4
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:torture/rpc: make use of dcerpc_binding_set_flags()Stefan Metzmacher2014-02-135-19/+34
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:torture/rpc: make use of dcerpc_binding_set_*() in torture_rpc_scanner()Stefan Metzmacher2014-02-131-1/+14
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:torture/rpc: make use of dcerpc_binding_[g|s]et_transport()Stefan Metzmacher2014-02-134-22/+31
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:torture: use dcerpc_binding_get_string_option("host") in smbtorture.cStefan Metzmacher2014-02-131-2/+5
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:torture/rpc: make use of dcerpc_binding_get_assoc_group_id() in handles.cStefan Metzmacher2014-02-131-6/+7
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:torture/rpc: make use of dcerpc_binding_set_*() in ↵Stefan Metzmacher2014-02-131-7/+18
| | | | | | | torture_rpc_connection_transport() Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:torture/rpc: use dcerpc_parse_binding() in epmapper.cStefan Metzmacher2014-02-131-7/+7
| | | | | | | This makes sure binding is talloc'ed. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:torture/rpc: use dcerpc_binding_dup() before modifying the given bindingStefan Metzmacher2014-02-131-1/+7
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:torture/rpc: s/pipe/p/ in order to avoid compiler warningsStefan Metzmacher2014-02-131-7/+7
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:torture: handle binding_struct->host == NULL in torture_parse_target()Stefan Metzmacher2014-02-111-1/+3
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:torture/rpc: fix rpc.scanner testStefan Metzmacher2014-02-111-13/+29
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:torture/rpc: pass object down to test_Map_display()Stefan Metzmacher2014-02-111-5/+15
| | | | | | | We also pass the given tower unmodified first. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:torture/rpc: print out the object guid in rpc.epmapper.epmapper.Lookup_simpleStefan Metzmacher2014-02-111-2/+3
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:torture/rpc: test all auth_types (8bit) in rpc.mgmtStefan Metzmacher2014-02-111-1/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:torture/rpc: fix rpc.mgmt testStefan Metzmacher2014-02-111-1/+2
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:torture/rpc: remove unused variable in session_key.cStefan Metzmacher2014-02-111-4/+2
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:torture/rpc: remove unused variable in frsapi.cStefan Metzmacher2014-02-111-9/+9
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:torture/rpc: remove unused variable in dsgetinfo.cStefan Metzmacher2014-02-111-3/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:torture/rpc: remove unused variable in backupkey.cStefan Metzmacher2014-02-111-25/+24
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:torture/rpc: fix compiler warnings in spoolss.cStefan Metzmacher2014-02-111-6/+14
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:torture/drs: remove unused variables.Stefan Metzmacher2014-02-112-15/+5
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:torture/rpc: initialize struct dcerpc_binding completelyStefan Metzmacher2014-02-111-0/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* torture: add zero length FSCTL_SRV_COPYCHUNK testDavid Disseldorp2014-02-061-0/+64
| | | | | | | | | | | Windows Server 2012 returns NT_STATUS_INVALID_PARAMETER for FSCTL_SRV_COPYCHUNK requests that include a server-side copy length of zero, in line with MS-SMB2 3.3.5.15.6. We should match this behaviour, so test for it. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture:smb2: fix durable-open.reopen4Michael Adam2014-01-301-1/+0
| | | | | | | | | | | | We currently don't support durable handles with delete-on-close: with delete-on-close, we close a durable handle with delete-on-close set upon disconnect. This patch adapts the test to behave accordingly, i.e. don't use delete-on-close... Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture/rpc: add invalidAuthenticate2Stefan Metzmacher2014-01-221-14/+74
| | | | | | | | | | | | This add 'rpc.netlogon.netlogon.invalidAuthenticate2' as new test it demonstrates the STATUS_BUFFER_OVERFLOW on computer names larger than 15 characters. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Wed Jan 22 19:07:12 CET 2014 on sn-devel-104
* s4:torture/libnet: fix compiler warnings in libnet_lookup.cStefan Metzmacher2014-01-161-0/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:torture/libnet: check the result of libnet_LookupName()Stefan Metzmacher2014-01-161-1/+5
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:torture/rpc: remove compiler warnings in ntsvcs.cStefan Metzmacher2014-01-161-9/+8
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>