summaryrefslogtreecommitdiff
path: root/source4/torture/local
Commit message (Collapse)AuthorAgeFilesLines
* s4: torture: Change torture_register_suite() to add a TALLOC_CTX *.Jeremy Allison2017-05-051-3/+3
| | | | | | | | 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>
* lib: modules: Change XXX_init interface from XXX_init(void) to ↵Jeremy Allison2017-04-221-1/+1
| | | | | | | | | | | | | | | | | | | | 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
* lib/util: add a test for tfork()Ralph Boehme2017-04-202-0/+2
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib/util: Add functions to escape log lines but not break all non-asciiGary Lockyer2017-03-292-1/+3
| | | | | | | | | We do not want to turn every non-ascii username into a pile of hex, so we instead focus on avoding newline insertion attacks and other low control chars Pair-programmed-by: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* Correct "ommited" typos.Chris Lamb2017-03-131-1/+1
| | | | | | | Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk> Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* waf: disable-python - don't build torture bitsIan Stakenvicius2017-03-101-1/+2
| | | | | | | | | | samba-net being disabled causes a chain of dependency or proto.h-based missing code issues that require a number of modules or subsystems to be disabled in samba4/torture. Signed-off-by: Ian Stakenvicius <axs@gentoo.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* Correct "heirarchy" typos.Chris Lamb2017-02-221-2/+2
| | | | | | 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>
* torture: Add tests for trim_string()Martin Schwenke2016-06-202-0/+2
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Ralph Boehme <slow@samba.org>
* util/binsearch: macro for greater than or equal searchDouglas Bagnall2016-03-092-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes you want to find the place where an item would be in a sorted list, whether or not it is actually there. The BINARY_ARRAY_SEARCH_GTE macro takes an extra 'next' pointer argument over the other binsearch macros. This will end up pointing to the next element in the case where there is not an exact match, or NULL when there is. That is, searching the list { 2, 3, 4, 4, 9} with a standard integer compare should give the following results: search term *result *next 1 - 2 3 3 - 4 4 [1] - 7 - 9 9 9 - 10 - - [2] Notes [1] There are two fours, but you will always get the first one. [2] The both NULL case means the search term is beyond the last list item. You can safely use the same pointer for both 'result' and 'next', if you don't care to distinguish between the 'greater-than' and 'equals' cases. There is a torture test for this. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* lib/util: Add strv_util.[ch] containing new function strv_split()Martin Schwenke2016-03-012-0/+2
| | | | | | | | | strv_split() adds to a strv by splitting a string on separators. Tests included. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Volker Lendecke <vl@samba.org>
* lib/util: Add tests for strvMartin Schwenke2016-02-262-0/+2
| | | | | | | | | | These are blackbox tests against most of the API. It would be possible to write tests that check the internals of the strv are as expected but that probably doesn't add much value. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Jeremy Allison <jra@samba.org>
* dlist: remove unneeded type argument from DLIST_ADD_END()Michael Adam2016-02-061-10/+10
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4: fix linking smbtorture on Solaris.Tom Schulz2015-10-061-0/+4
| | | | | | | | | | | | | Don't test getgrouplist if we do not have it. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11512 Signed-off-by: Tom Schulz <schulz@adi.com> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Tue Oct 6 19:15:22 CEST 2015 on sn-devel-104
* s4: tests: Fix nss_tests build on Solaris.Tom Schulz2015-09-171-0/+8
| | | | | | | | | | | | | Too many arguments for Solaris getpwent_r() and getgrent_r(). BUG: https://bugzilla.samba.org/show_bug.cgi?id=11508 Signed-off-by: Tom Schulz <schulz@adi.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <rb@sernet.de> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Sep 17 05:01:07 CEST 2015 on sn-devel-104
* lib/crypto: add aes_ccm_128 testsStefan Metzmacher2015-08-271-0/+2
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=11451 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Remove unused parmlist codeVolker Lendecke2015-08-212-2/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* torture: include config.h before any glibc headersUri Simchoni2015-07-172-6/+2
| | | | | | | | | | | | | | | | | | | config.h may have some flags which affect glibc behavior, e.g. _FILE_OFFSET_BITS=64. To make sure these flags have the desired effect, config.h must be included before any glibc header files. Also remove inclusion of some system files, relying on replace/system/*.h instead. This commit does not fix a specific known bug. It changes the code to comply with coding conventions. Signed-off-by: Uri Simchoni <urisimchoni@gmail.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: "Stefan Metzmacher" <metze@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Jul 17 04:41:14 CEST 2015 on sn-devel-104
* s4:torture/local: add more torture_assert() checksStefan Metzmacher2015-04-091-110/+145
| | | | | | | | | | We need to make sure we return when torture_assert_passwd_equal() or torture_assert_group_equal() fails. Bug: https://bugzilla.samba.org/show_bug.cgi?id=11183 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* torture: add local FSRVP server state testsDavid Disseldorp2015-03-313-2/+498
| | | | | | | | Test the storage and retrieval of FSRVP server state, with varying shadow-copy set, shadow copy and share map hierarchies. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Remove tdb_compatVolker Lendecke2015-03-171-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* lib: Remove tdb_fetch_compatVolker Lendecke2015-03-171-2/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s4-torture: cleanup nsswrapper test a little by removing nwrap references.Günther Deschner2015-03-022-121/+121
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s4-torture: re-add nss-wrapper torture testsuite.Günther Deschner2015-03-023-1/+957
| | | | | | | | | | | | | | (The testsuite got removed with 5bb410f85312196bb24e62a6a0b8350576433dc6). Although nss_wrapper now also has an upstream testsuite, it is still important to run the older torture testsuite within Samba so we have some testing on nss_winbind correctnes and consistency. Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* lib/crypto: add aes_gcm_128 support.Stefan Metzmacher2014-10-161-0/+2
| | | | | | | | Pair-Programmed-With: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4-torture: Remove socket_wrapper testsuite.Andreas Schneider2014-04-172-7/+0
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4-torture: Remove nss_wrapper testsuite.Andreas Schneider2014-04-172-7/+0
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* torture: add local verification trailer parsing testDavid Disseldorp2014-04-093-1/+104
| | | | | | | | 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): Wed Apr 9 03:44:15 CEST 2014 on sn-devel-104
* s4:torture/local: only pass prefix strings to tdb_add_record() in dbspeed.cStefan Metzmacher2014-04-021-8/+8
| | | | | | | This way the compiler has a chance to check the format string. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:torture/local: add missing #include "torture/local/proto.h"Stefan Metzmacher2014-04-022-0/+2
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* tdb_wrap: Remove tdb_wrap_open_ againVolker Lendecke2014-03-311-3/+3
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture: Avoid passing lp_ctx to tdb_wrap_open in test_tdb_speedVolker Lendecke2014-03-311-2/+3
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib/replace: Try to fix build on HP-UX for os2_delete testAndrew Bartlett2012-09-231-1/+1
| | | | | | | | | | | | The issue is that this file is both used in an autoconf test, and later in a smbtorture test. Because os2_delete.c does not include replace.h, bool may not be defined. So, instead we shift the need for bool to a different header. (The readdir tests in repdir.m4 are not yet in the waf configure). Andrew Bartlett
* s4-provision: pass use_ntvfs from C wrappers and set to true in tests/vampireAndrew Bartlett2012-08-221-0/+1
| | | | | | None of these cases need the complexity of the s3fs backend. Andrew Bartlett
* tdb_wrap: Move to specific directory.Jelmer Vernooij2012-03-101-1/+1
| | | | | | | | | | It's a bit confusing to mix low-level and high-level libraries. We had multiple libraries in one directory, and there were have circular dependencies with other libraries outside that directory (in this case, samba-hostconfig). Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sat Mar 10 23:13:01 CET 2012 on sn-devel-104
* lib/crypto: add aes_cmac_128_test.c as local.crypto.aes_cmac_128 testStefan Metzmacher2012-02-291-0/+2
| | | | metze
* lib/util: Add back control of mmap and hash size in tdb for top level buildAndrew Bartlett2011-10-131-1/+1
| | | | | | | | This passes down a struct loadparm_context to allow these parameters to be checked. This may be s3 or s4 context, allowing the #if _SAMBA_BUILD_ macro to go away safely. Andrew Bartlett
* auth: move credentials layer to the top levelAndrew Bartlett2011-10-111-1/+1
| | | | | | | | This will allow gensec_start.c to move to the top level. This does not change what code uses the cli_credentials code, but allows the gensec code to be more broadly. Andrew Bartlett
* tdb_fetch_compat: use instead of tdb_fetch.Rusty Russell2011-06-201-2/+2
| | | | | | | This is a noop for tdb1. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* tdb_compat.h: divert every tdb build and includes to tdb_compatRusty Russell2011-06-201-1/+1
| | | | | | | | We change all the headers and wscript files to use tdb_compat; this means we have one place to decide whether to use TDB1 or TDB2. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lib/util Move source3 tdb_wrap_open() into the common code.Andrew Bartlett2011-05-061-1/+1
| | | | | | | | | This #if _SAMBA_BUILD == 3 is very unfortunate, as it means that in the top level build, these options are not available for these databases. However, having two different tdb_wrap lists is a worse fate, so this will do for now. Andrew Bartlett
* s4-test: added a test for E_deshash()Andrew Tridgell2011-04-131-0/+1
| | | | | | | | | | this particularly checks the boundary conditions near passwords of length 14 characters Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Wed Apr 13 07:31:55 CEST 2011 on sn-devel-104
* lib/util/charset Add many more charset testsAndrew Bartlett2011-04-131-0/+2
| | | | | | | | | This confirms that the behaviour of the convert_string() API (with the process-wide iconv handle). Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* lib/util/charset Rename convert_string test to allow a 'non_handle' testAndrew Bartlett2011-04-131-1/+1
| | | | | | | | | A future commit will test (with a subset of tests) the varient of this function without _handle. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* lib/util/charset Add tests for strcasecmp_m(), talloc_strupper() et alAndrew Bartlett2011-03-311-0/+1
| | | | | | | | | | | | | | | | | | This adds tests for: strncasecmp_m strcasecmp_m strupper_talloc_n strlower_talloc strhaslower strhasupper The tests can certainly be improved with pre-calculated upper and lower case text, but this at least puts them though their paces. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Thu Mar 31 14:24:22 CEST 2011 on sn-devel-104
* lib/util/charset Add tests for convert_string_talloc_handle()Andrew Bartlett2011-03-302-0/+2
| | | | | | | Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Wed Mar 30 13:02:47 CEST 2011 on sn-devel-104
* Use <tdb.h> to include tdb, so the system include file gets used when ↵Jelmer Vernooij2011-02-281-1/+1
| | | | | | building against system tdb.
* ldb: use #include <ldb.h> for ldbAndrew Tridgell2011-02-101-2/+2
| | | | | | | | thi ensures we are using the header corresponding to the version of ldb we're linking against. Otherwise we could use the system ldb for link and the in-tree one for include Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* lib/util: add tests for anonymous_shared_allocate/free()Stefan Metzmacher2011-01-202-1/+17
| | | | | | | metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Thu Jan 20 06:25:03 CET 2011 on sn-devel-104
* s4-smbtorture: Make test names lowercase and dot-separated.Jelmer Vernooij2010-12-113-10/+8
| | | | | | | | 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
* torture: Only add in tests for socket_wrapper/nss_wrapper when they have ↵Jelmer Vernooij2010-11-122-2/+18
| | | | been enabled.