summaryrefslogtreecommitdiffstats
path: root/source4/torture/rpc
Commit message (Collapse)AuthorAgeFilesLines
* torture/fsrvp: remove verification trailer magic fieldDavid Disseldorp2015-03-071-34/+7
| | | | | | | | | | | | | | | During initial wire trace analysis, the DCE/RPC PDU verification trailer was incorrectly identified and tagged in IDL as an FSRVP "magic" blob. This change removes the incorrectly tagged FSRVP request fields and corresponding test code - with 1e1b7b1021b16e3ab61c2fca8328c94e60a2c99c verification trailer parsing is now tested separately. 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): Sat Mar 7 20:01:20 CET 2015 on sn-devel-104
* Fix the O3 developer buildVolker Lendecke2015-03-032-7/+10
| | | | | | | | | | Different gcc versions complain at different places Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Tue Mar 3 13:14:53 CET 2015 on sn-devel-104
* Fix the developer O3 buildVolker Lendecke2015-02-254-6/+6
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org> Autobuild-User(master): Alexander Bokovoy <ab@samba.org> Autobuild-Date(master): Wed Feb 25 16:32:29 CET 2015 on sn-devel-104
* torture-backupkey: Check the dcerpc call return code before calling ndr pullGarming Sam2015-02-251-3/+5
| | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* torture-backupkey: Add tests that read the secret from the server, and validateAndrew Bartlett2015-02-251-9/+312
| | | | | | | | | These show that MS-BKRP 3.1.4.1.1 BACKUPKEY_BACKUP_GUID is incorrect when it states that the key must be the leading 64 bytes, it must be the whole 256 byte buffer. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* backupkey: Add tests for ServerWrap protocolAndrew Bartlett2015-02-251-2/+645
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* backupkey: Change expected error codes to match Windows 2008R2 and Windows ↵Andrew Bartlett2015-02-251-2/+9
| | | | | | | | | 2012R2 This is done in both smbtoture and in our server Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* torture-backupkey: Assert dcerpc_bkrp_BackupKey_r call was successfulAndrew Bartlett2015-02-251-0/+6
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* torture-backupkey: Add consistent assertions that createRestoreGUIDStruct() ↵Andrew Bartlett2015-02-251-1/+12
| | | | | | | suceeds Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* s4:torture/rpc/backupkey: Require 2048 bit RSA keyArvid Requate2015-02-251-0/+75
| | | | | | | | | | | Signed-off-by: Arvid Requate <requate@univention.de> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> (fixed cleanup of memory) Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* torture: Add netr_setPassword(2) schannel test.Andreas Schneider2015-02-232-0/+110
| | | | | | | | | | | | Thanks to Florian Weimer <fweimer@redhat.com> for the help to write this torture test. Pair-Programmed-With: Guenther Deschner <gd@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Guenther Deschner <gd@samba.org> Autobuild-User(master): Karolin Seeger <kseeger@samba.org> Autobuild-Date(master): Mon Feb 23 20:01:01 CET 2015 on sn-devel-104
* torture/spoolss: issue GetJob after StartDocPrinterDavid Disseldorp2014-12-191-0/+8
| | | | | | | | | | | | This reflects Windows XP spoolss client behaviour. This fails if the job is not yet instantiated on the server, and prior to the bso#10984 fix resulted in an unsable DCERPC pipe. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Fri Dec 19 18:03:20 CET 2014 on sn-devel-104
* torture: improve rpc.remote_pac test so we check if LogonSamLogon actually ↵Andrew Bartlett2014-12-181-0/+2
| | | | | | | | | | | succeeds Signed-off-by: Andrew Bartlett <abartlet@samba.org> Pair-programmed-with: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Garming Sam <garming@catalyst.net.nz> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu Dec 18 02:51:02 CET 2014 on sn-devel-104
* samba: pass down size_t instead of int to add_string_to_array().Günther Deschner2014-11-173-8/+8
| | | | | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Mon Nov 17 19:53:22 CET 2014 on sn-devel-104
* torture/spoolss: cleanup print_job_enum test jobsDavid Disseldorp2014-10-291-0/+10
| | | | | | | | | | | | Purge print queue on startup to ensure that the test is not affected by jobs queued for prior tests. Also, empty the queue at the end of the test to play nice with others. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Wed Oct 29 14:31:52 CET 2014 on sn-devel-104
* torture/spoolss: test EnumJobs with an invalid levelDavid Disseldorp2014-10-281-0/+71
| | | | | | | | This test confirms that EnumJobs WERR_INVALID_LEVEL responses remain consistent with and without the presence of outstanding print jobs. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture/spoolss: add werr_expected arg to EnumJobs helperDavid Disseldorp2014-10-281-6/+12
| | | | | | | | This will allow for the future testing of specific EnumJobs failure cases. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:libsmb: remove unused smb2cli.hStefan Metzmacher2014-09-301-1/+0
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* idl: Merge NETR_TRUST and LSA_TRUST definitions into one set only in lsa.idlAndrew Bartlett2014-09-272-2/+2
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4-torture: use smb_krb5_get_allowed_weak_crypto() in remote PAC test.Günther Deschner2014-08-081-8/+1
| | | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Pair-Programmed-With: Andreas Schneider <asn@samba.org>
* s4:torture/rpc: add rpc.netlogon.ServerReqChallengeGlobalStefan Metzmacher2014-07-191-0/+73
| | | | | | | | | | | | This demonstrates that the challenge table should be global. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10723 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Sat Jul 19 12:51:39 CEST 2014 on sn-devel-104
* Order switch statementsSamuel Cabrero2014-07-071-9/+9
| | | | | | | | | Signed-off-by: Samuel Cabrero <scabrero@zentyal.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Kamen Mazdrashki <kamenim@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Mon Jul 7 07:47:44 CEST 2014 on sn-devel-104
* idl:drsuapi: Manage all possible lengths of drsuapi_DsBindInfoSamuel Cabrero2014-07-071-1/+20
| | | | | | | Signed-off-by: Samuel Cabrero <scabrero@zentyal.com> Reviewed-by: Kamen Mazdrashki <kamenim@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
* torture: Use torture_assert() macros in rpc.samr testAndrew Bartlett2014-06-231-18/+3
| | | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Kamen Mazdrashki <kamenim@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture: add FSRVP share snapshot ACL testDavid Disseldorp2014-06-211-2/+194
| | | | | | | | | | | The new test_fsrvp_share_sd test sets a unique ACL on the base share, and then confirms that snapshot shares carry the same ACL. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Sat Jun 21 15:10:12 CEST 2014 on sn-devel-104
* torture: add FSRVP message sequence timeout testDavid Disseldorp2014-06-211-0/+25
| | | | | | | | | Sleep at various points in the FSRVP snapshot creation state machine, and confirm that the state timeout is reflected in subsequent server responses. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* torture: add timeout sleeps to fsrvp create helperDavid Disseldorp2014-06-211-6/+92
| | | | | | | | | | | | Attempt to trip message sequence timeouts at various points in the FSRVP shadow-copy creation state machine. The default timeout-injection sleep durations correspond to those documented in MS-FSRVP (+500ms). They can also be manually set using the "fss: sequence timeout" parameter. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* torture: validate FSCTL_SRV_ENUMERATE_SNAPSHOTS responseDavid Disseldorp2014-06-211-0/+10
| | | | | | | | | | Check the NumberOfSnapShotsReturned and SnapShotArraySize fields in the FSCTL_SRV_ENUMERATE_SNAPSHOTS response match expected values. This is a regression test for bso#10549. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s4-torture: add print_test_purgeDavid Disseldorp2014-05-221-0/+84
| | | | | | | | | | | This change adds a regression test for print job purging via SetPrinter(SPOOLSS_PRINTER_CONTROL_PURGE). 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 May 22 01:55:39 CEST 2014 on sn-devel-104
* s4-torture: fix some build warnings in rpc samr test.Günther Deschner2014-05-161-11/+10
| | | | | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Fri May 16 23:48:35 CEST 2014 on sn-devel-104
* s4-torture: fix test_openprinter_wrap fake test result.Günther Deschner2014-05-161-1/+1
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* Allow FSRVP access generic HRESULT error message descriptionsNoel Power2014-04-021-2/+3
| | | | | | | | | | | | FSRVP can possibly return any HRESULT error in addition to it's own specific errors. This change searches the HRESULT errors for a description if the error doesn't match any of the known FSRVP ones. Also removed some errors defined in fsrvp.idl (now that they are defined in hresult.h) Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* torture-samr: Add testing of account lockout and password change behaviourAndrew Bartlett2014-04-021-39/+346
| | | | | | | | | | | | | | | | | | | | This is the regression test to avoid a repeat of CVE-2013-4496 This includes confirming that badPwdCount is updated on login, not just on first failure However the badPwdCount is not updated if the account is disabled Note: that samr_QueryUserInfo return the effective bad_password_count in level 5, 16 and 21, while it returns the raw value in level 3. (Sadly the s3 code does not do this correctly, so a knownfail is added) Change-Id: I4fd8ac5c3b1357e7a98386756dac2a43eb778ecf Signed-off-by: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Wed Apr 2 19:30:59 CEST 2014 on sn-devel-104
* torture-samr: Add test for lockout with and without a password historyAndrew Bartlett2014-04-021-2/+18
| | | | | | Change-Id: I6f4b3e92feabe4ff09839329b0db3d33cc6c73b4 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* torture-samr: Improve rpc.samr.passwords.badpwdcount testAndrew Bartlett2014-04-021-10/+12
| | | | | | Change-Id: I89ac30d715e89f14aca049e0e5c5043a39ab93c7 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* torture-samr: Do not issue a TORTURE_FAIL unless *this* test failedAndrew Bartlett2014-04-021-3/+5
| | | | | | Change-Id: I349d8ac77a98b934cd4b11b01a96a231097eeeed Signed-off-by: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* torture-samr: Lock accounts for 5 seconds in rpc.samr.passwords.badpwdcount ↵Andrew Bartlett2014-04-021-0/+10
| | | | | | | | | | test to ensure consistent results For "samba3" we use 60 seconds as in test_Password_lockout(). Change-Id: I886eb83d4c620e4d719a38ec47b45bacd1406b9d Signed-off-by: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* torture-samr: Try breaking the NT hash first, as the LM hash may not be ↵Andrew Bartlett2014-04-021-6/+6
| | | | | | | | being checked Change-Id: Iea9040bc7130f8b779c35bd367a9915633cd494d Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* torture-samr: set min password age to 0 for lockout and badpwdcount testsAndrew Bartlett2014-04-021-1/+5
| | | | | | Change-Id: I0d44fcc712e6f239d9adc739fdafc1b20dd2beba Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* torture-samr: Make failures easier to trace with torture_assertAndrew Bartlett2014-04-021-42/+17
| | | | | | Change-Id: I729ba2f0a0501575357977754401a0cb40d95b34 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* torture-samr: Indent samba3-skip blockAndrew Bartlett2014-04-021-20/+20
| | | | | | Change-Id: I2bb9f175e61401606742737a883604b922044ea5 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* torture-samr: Actually fail on failures in rpc.samr, rather than just ↵Andrew Bartlett2014-04-021-174/+174
| | | | | | | | printing pretty warnings Change-Id: I00d66ecd84cd1a7d733f491d19328cec93ba8d2b Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* torture/samr: Re-open the user when checking for ACB_AUTOLOCKAndrew Bartlett2014-04-021-12/+24
| | | | | | | | | | | This flag appears to be cached from the open, so the test incorrectly indicated that the flag was not set over SAMR. Andrew Bartlett Change-Id: I2f1f017191dddb6c2ac496712064fa1b6b48be53 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* torture-samr: Set lockout_seconds to 60 for samba3Andrew Bartlett2014-04-021-0/+4
| | | | | | | | | | | | The source3 account policy code deals with lockouts in terms of minutes, not nanoseconds, so we have to lock out for at least 60 seconds otherwise we do not wait long enough. Andrew Bartlett. Change-Id: I2b30d1c0d9b020b3aba6ed3343361e9a576b7d9a Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4:torture/rpc: avoid declaration after code warningsStefan Metzmacher2014-04-023-10/+10
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* torture: test FSRVP UNCs with and without trailing slashesDavid Disseldorp2014-03-311-5/+6
| | | | | | | | The trailing slash should not make a difference, unless the target share is hidden. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* auth/gensec: remove tevent_context argument from gensec_update()Stefan Metzmacher2014-03-271-6/+6
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:torture/rpc: make use of dcerpc_binding_handle_auth_info() in backupkey.cStefan Metzmacher2014-03-251-22/+55
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* 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>