summaryrefslogtreecommitdiff
path: root/source4/librpc/tests
AgeCommit message (Collapse)AuthorFilesLines
2024-02-27python/tests: Add test for new krb5 keytab parserAndrew Bartlett2-0/+67
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jo Sutton <josutton@catalyst.net.nz>
2023-11-20python:tests: Add ndrdump test for GMSA Managed Password blobsJoseph Sutton1-0/+28
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Mon Nov 20 22:51:17 UTC 2023 on atb-devel-224
2023-08-24selftest:ndrdump: adjust xattr_NTACL test for ACE codaDouglas Bagnall1-0/+8
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu Aug 24 03:47:08 UTC 2023 on atb-devel-224
2023-03-31selftest: Add test parsing krb5 PAC claims via ndrdumpAndrew Bartlett4-0/+240
Including * compressed claims * plain (uncompressed) claims Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Fri Mar 31 02:50:30 UTC 2023 on atb-devel-224
2022-01-24blackbox.ndrdump: fix ↵Stefan Metzmacher1-3/+49
test_ndrdump_fuzzed_NULL_struct_ntlmssp_CHALLENGE_MESSAGE test This actually reveals that ndr_push_string() for TargetName="" was failing before because it resulted in 1 byte for a subcontext with TargetLen=0. This is fixed now and we no longer expect ndrdump to exit with 1. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14956 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Mon Jan 24 16:18:34 UTC 2022 on sn-devel-184
2022-01-24blackbox.ndrdump: adjust example files to the usage of dump_data_diff output.Stefan Metzmacher5-0/+466
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14956 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2022-01-24blackbox.ndrdump: adjust example files to changed dump_data() output.Stefan Metzmacher4-13/+16
The cleanup using dump_data_block16() fixed the space handling. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14956 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2021-11-09CVE-2020-25721 ndrdump: Add tests for PAC with UPN_DNS_INFOJoseph Sutton4-0/+435
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14835 Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2020-02-27librpc ndr: Stack-overflow in ndr_pull_drsuapi_DsaAddressListItem_V1Gary Lockyer1-0/+1
Reproducer for oss-fuzz Issue 19280 Project: samba Fuzzing Engine: libFuzzer Fuzz Target: fuzz_ndr_drsuapi_TYPE_OUT Job Type: libfuzzer_asan_samba Platform Id: linux Crash Type: Stack-overflow Crash Address: 0x7ffcb4cc2ff8 Crash State: ndr_pull_drsuapi_DsaAddressListItem_V1 Sanitizer: address (ASAN) Credit to OSS-Fuzz REF: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19280 BUG: https://bugzilla.samba.org/show_bug.cgi?id=14254 Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2020-02-07libprc ndr tests: Fix ndrdump test ntlmssp_CHALLENGE_MESSAGEGary Lockyer1-1/+1
Fix the expected data in fuzzed_ntlmssp-CHALLENGE_MESSAGE.txt, as it contained source code line numbers. Andrew this test needs to be altered to us a regular expression and remove the dependency on source line numbers. Credit to OSS-Fuzz REF: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=20083 BUG: https://bugzilla.samba.org/show_bug.cgi?id=14236 Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-12-20selftest: Confirm parse of dnsProperty recordsAndrew Bartlett1-0/+32
This confirms a name of "." will round-trip correctly. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2019-12-18sefltest: Demonstrate crash in manually written printer for ↵Andrew Bartlett1-0/+76
drsuapi_DsAttributeValue Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2019-12-12selftest: Add test for ndr_size_struct() faulting on a NULL pointerAndrew Bartlett1-0/+43
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13876 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2019-12-12selftest: Add example xattr_NTACL packets to demonstrate switch/union behaviourAndrew Bartlett2-0/+119
This is a good example with both buffers and scalars in the union. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13876 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2019-12-10selftest: Add ndrdump tests for malformed drsuapi trafficAndrew Bartlett4-0/+541
Thanks to Douglas Bagnall for the samples, produced from seeds generated by Samba's make test traffic, fuzzed by ndr_fuzz_X and Hongfuzz. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-11-20selftest: Test repushing an ntlmssp AUTHENTICATE_MESSAGEAndrew Bartlett2-0/+135
This demonstrates a bug found by Douglas Bagnall using Hongfuzz and the new fuzz_ndr_X fuzzer where the value() evaluatuion could segfault if it was made to follow a NULL pointer. This also demonstrates that the --base64 mode works on file inputs. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-11-17ndrdump: Use human-readable strings for NDR decode errorsAndrew Bartlett1-1/+1
These make much more sense than the NTSTATUS values they can be forced to map to. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-11-17selftest: Test fix for ndrdump of structures by numberAndrew Bartlett1-0/+1
This requires that misc.GUID not move in the IDL, so a comment is added. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14191 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-11-13selftest: Add expected-output tests for the ndrdump struct modeAndrew Bartlett2-0/+35
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14191 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2017-02-14tests/ndrdump: Add a test for --hex-inputGarming Sam1-0/+7
Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Tue Feb 14 13:39:01 CET 2017 on sn-devel-144
2016-10-26s4-torture: test support for [packet] binding string option.Günther Deschner1-0/+19
Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2014-04-02s4:librpc/tests: add missing #include "torture/local/proto.h"Stefan Metzmacher1-0/+1
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-03-25s4:librpc/tests: assert the the abstract syntax has the expected value (null)Stefan Metzmacher1-0/+4
This makes sure that it's not mixed with the object guid anymore. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-03-25s4:librpc/tests: reset the object on the binding created from the towerStefan Metzmacher1-0/+7
The tower doesn't contain information about the object only about the abstract syntax. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-03-25s4:librpc/test: test ipv6 addresses in dcerpc_binding stringsStefan Metzmacher1-0/+22
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-03-25s4:librpc/tests: add more no transport testsStefan Metzmacher1-3/+16
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-02-13s4:librpc/tests: add dcerpc_binding assoc_group_id testsStefan Metzmacher1-0/+19
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13s4:librpc/tests: add dcerpc_binding target_hostname/target_principal testsStefan Metzmacher1-0/+19
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13s4:librpc/tests: use dcerpc_binding_get*() functionsStefan Metzmacher1-21/+63
We should not dereference struct dcerpc_binding. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13librpc/rpc: remove dcerpc_binding->localaddress and store it in the options ↵Stefan Metzmacher1-2/+3
array Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13librpc/rpc: let derpc_binding_string() add ncacn_options before key=value ↵Stefan Metzmacher1-1/+1
options Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-11s4:librpc/test: an empty hostname means b->host == NULLStefan Metzmacher1-1/+2
In future we'll not allow b->host == "" any more. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
2010-12-11s4-smbtorture: Make test names lowercase and dot-separated.Jelmer Vernooij1-1/+1
This is consistent with the test names used by selftest, should make the names less confusing and easier to integrate with other tools. Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sat Dec 11 04:16:13 CET 2010 on sn-devel-104
2010-09-22ndrdump: Move blackbox test to standard python namespace.Jelmer Vernooij1-20/+0
2010-09-07Add unique IP address binding for client connections (EPM and ncacn_ip_tcp ↵Julien Kerihuel1-0/+6
levels) This allows for binding strings like this: ncacn_ip_tcp:host[localaddress=192.168.2.1,seal] which will force the connection to be locally bound to the specified IP address Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-03-26libutil: moved the networking defines to util_net.hAndrew Tridgell1-0/+1
These were causing thousands of warnings on solaris8
2009-02-03s4:selftest: avoid hardcoded pathes in blackbox testsStefan Metzmacher1-2/+2
metze
2008-09-19Fix path to ndrdump in blackbox test, don't start smb server for ndrdumpJelmer Vernooij1-2/+2
tests.
2008-09-16Fix paths to subunit.shJelmer Vernooij1-1/+1
2008-09-16Move ndrdump tests closer to the code they test.Jelmer Vernooij3-0/+20
2008-04-02Install public header files again and include required prototypes.Jelmer Vernooij1-0/+1
(This used to be commit 47ffbbf67435904754469544390b67d34c958343)
2007-12-26r26588: Janitorial: Rename torture_*_add_*test to torture_*_add_*test_const.Kai Blin1-6/+7
Also rename the corresponding wrap_ functions. (This used to be commit e59c2eaf681f076d175b9779d1c27b5f74a57c96)
2007-10-10r24866: Put remainder of binding string tests in librpc/ directory.Jelmer Vernooij1-0/+37
(This used to be commit 5b78d845a4d107e6a0e77a6e57e2b0e22fc0db95)
2007-10-10r24753: Allow host name in binding string without transport.Jelmer Vernooij1-0/+23
(This used to be commit f7051d3a84486ed9d0a1689c10a693521ec63528)
2007-10-10r23792: convert Samba4 to GPLv3Andrew Tridgell1-3/+2
There are still a few tidyups of old FSF addresses to come (in both s3 and s4). More commits soon. (This used to be commit fcf38a38ac691abd0fa51b89dc951a08e89fdafa)
2007-10-10r21656: Move tests a bit closer to the things they test, should make syncing ↵Jelmer Vernooij1-0/+111
with samba3 easier. (This used to be commit 4d755fb5d7adedd1dd8bad917b921324411bfd59)