summaryrefslogtreecommitdiff
path: root/source4/torture/ndr
Commit message (Collapse)AuthorAgeFilesLines
* s4-torture: point out why we cannot validate MSZIP compressed filesGünther Deschner2017-07-201-0/+7
| | | | | | | | | | 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): Thu Jul 20 01:38:02 CEST 2017 on sn-devel-144
* librpc/ndr: add MSZIP compression for cabinet filesAurelien Aptel2017-07-191-3/+2
| | | | | | Signed-off-by: Aurelien Aptel <aaptel@suse.com> Reviewed-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* librpc: use DATA_BLOB in CFDATA structureAurelien Aptel2017-07-191-3/+3
| | | | | | Signed-off-by: Aurelien Aptel <aaptel@suse.com> Reviewed-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* ndr tests: silence a harmless warningDouglas Bagnall2017-03-021-10/+10
| | | | | | | | | gcc 7. "duplicate ‘const’ declaration specifier [-Wduplicate-decl-specifier]" Signed-off-by: Douglas Bagnall <douglas@halo.gen.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4-torture: add more NDR tests for GetCorePrinterDriversGünther Deschner2017-01-241-0/+143
| | | | | | | | | | 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
* s4-torture: add some NDR tests for validating ndr_push_charset behavior.Günther Deschner2017-01-242-0/+92
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4-torture: better, failing, tests for GUID_from_stringDouglas Bagnall2016-12-141-9/+55
| | | | | | | | | | | | | | | | | | | | | | 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>
* s4-torture: Add LZX compressed cabinet testGünther Deschner2016-11-251-0/+70
| | | | | | | | | | 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
* s4-torture: Add MSZIP compressed cabinet testGünther Deschner2016-11-241-0/+65
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s4-torture: Add a validation test for uncompressed Cabinet filesGünther Deschner2016-11-241-0/+2
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s4-torture: Introduce Cabinet ndr testsuiteGünther Deschner2016-11-242-0/+4187
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s4-torture: add spoolss_SetPrinter ndr test to validate secdesc_ptrGünther Deschner2016-11-111-0/+58
| | | | | | | | | 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>
* werror: replace WERR_INVALID_PARAM with WERR_INVALID_PARAMETER in ↵Günther Deschner2016-09-281-2/+2
| | | | | | | | | source4/torture/ Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* werror: replace WERR_BADFILE with WERR_FILE_NOT_FOUND in ↵Günther Deschner2016-09-281-2/+2
| | | | | | | | | source4/torture/ndr/winreg.c Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4-torture: parse spoolss ndr packets using iremotewinspool callsGünther Deschner2016-09-221-0/+28
| | | | | | | | | | 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
* s4-torture: add IRemoteWinspool ndr testsuite.Günther Deschner2016-09-222-0/+174
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* spoolss: rename spoolss_RpcSetJobNamedProperty to spoolss_SetJobNamedPropertyGünther Deschner2016-09-221-4/+4
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4-torture: cleanup torture_suite_add_ndr_pull_validate_test API.Günther Deschner2016-09-078-42/+38
| | | | | | | | | | 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
* krb5_wrap: Rename kerberos_free_data_contents()Andreas Schneider2016-08-311-1/+1
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* torture: Add tests for ndr_push_struct_into_fixed_blob()Andrew Bartlett2016-07-281-0/+110
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* s4-torture: fix compile of new NDR PAC tests with MIT Kerberos.Günther Deschner2016-07-231-10/+22
| | | | | | | | | | 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
* s4:torture/ndr: Add supplementalCredentials blob from Samba with the new ↵Andrew Bartlett2016-07-221-0/+101
| | | | | | | SambaGPG blob Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4:torture/ndr: add more krb5pac tests with PAC blobs from pkinitStefan Metzmacher2016-07-211-1/+354
| | | | | | | | | | | | 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
* s4:torture/ndr: make use of torture_suite_add_ndr_pull_validate_test() in ↵Stefan Metzmacher2016-07-201-6/+28
| | | | | | | krb5pac when possible Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
* torture: Add another sample of a PAC that broke the old PAC_UPN_DNS_INFO ↵Andrew Bartlett2016-07-201-0/+62
| | | | | | | | | | | 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>
* s4-torture: add another krb5pac buffer to the ndr test.Günther Deschner2016-07-201-0/+118
| | | | | | | | | 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>
* s4-torture: add ndr krb5pac testsuite.Günther Deschner2016-07-202-0/+149
| | | | | | | | | | 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>
* s4:torture/ndr: Add supplementalCredentials blob from Win2012R2Andrew Bartlett2016-07-201-0/+69
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4:torture/ndr: Add supplementalCredentials blobs from alpha13 and ↵Andrew Bartlett2016-07-201-3/+128
| | | | | | | | | 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>
* s4:torture/ndr: add validation checks for strange supplementalCredentials blobsStefan Metzmacher2016-07-201-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* s4-torture: rename torture_suite_add_ndr_pullpush_test to ↵Günther Deschner2016-07-208-15/+15
| | | | | | | | | | | 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>
* lib: Give base64.c its own .hVolker Lendecke2016-05-041-0/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* ntlmssp.idl: MsAvRestrictions is MsvAvSingleHost nowStefan Metzmacher2016-03-101-6/+7
| | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
* s4:torture/ntlmssp fix a compiler warningChristian Ambach2016-02-121-3/+0
| | | | | | | about invalid array subscript Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s4-torture: fix gcc6 build warning.Günther Deschner2016-02-061-0/+2
| | | | | | | | | | | source4/torture/ndr/samr.c:277:22: warning: 'samr_changepassworduser3_w2k_out_data' defined but not used [-Wunused-const-variable] Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4-torture: fix gcc6 build warning.Günther Deschner2016-02-061-0/+4
| | | | | | | | | | source4/torture/ndr/drsuapi.c:272:22: warning: 'DsBind_req2_dat' defined but not used [-Wunused-const-variable] Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* dlist: remove unneeded type argument from DLIST_ADD_END()Michael Adam2016-02-061-2/+2
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4-torture: flesh out ntlmssp_AUTHENTICATE_MESSAGE_check().Günther Deschner2016-02-041-0/+107
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s4-torture: add ndr pullpush validation for NTLMSSP CHALLENGE and ↵Günther Deschner2016-02-041-0/+10
| | | | | | | | | AUTHENTICATE messages. Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s4-torture: flesh out ntlmssp_CHALLENGE_MESSAGE_check().Günther Deschner2016-02-041-0/+43
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s4-torture: activate testing of CHALLENGE and AUTHENTICATE ntlmssp messages.Günther Deschner2016-02-041-4/+1
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s4-torture: fill in ntlmssp_NEGOTIATE_MESSAGE_check().Günther Deschner2016-02-041-1/+19
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s4-torture: add a negoex ndr pullpush test.Günther Deschner2015-12-212-0/+101
| | | | | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Mon Dec 21 01:37:29 CET 2015 on sn-devel-144
* s4-torture: make sure we always verify ndr pull and push of ↵Günther Deschner2015-12-101-1/+5
| | | | | | | | | | bkrp_exported_RSA_key_pair struct. Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* s4-torture: add test to verify WITNESS_NOTIFY_CLIENT_MOVE message marshalling.Günther Deschner2015-09-241-0/+44
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Jose A. Rivera <jarrpa@samba.org>
* s4-torture: add more ndr tests for property lists.Günther Deschner2015-08-041-0/+226
| | | | | | | | | This data is derived from clusapi_NodeControl. Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: José A. Rivera <jarrpa@samba.org>
* s4-torture: add ndr testsuite for complex clusapi_PROPERTY_LIST structs.Günther Deschner2015-08-042-0/+158
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: José A. Rivera <jarrpa@samba.org>
* s4-torture: pull, push and compare a witness Notify struct in ndr test.Günther Deschner2015-07-031-0/+6
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4-torture: add new torture_suite_add_ndr_pullpush_fn_test_flags().Günther Deschner2015-07-031-0/+9
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4-torture: add torture_ndr_push_struct_blob_flags() in order to manipulate ↵Günther Deschner2015-07-031-1/+18
| | | | | | | | | push flags. Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>