summaryrefslogtreecommitdiff
path: root/source4/torture
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r2888: - add 'Ds' prefix to Bind and Unbind call on drsuapiStefan Metzmacher2-20/+20
- rename handle -> bind_handle - change function types to NTSTATUS metze (This used to be commit de73676342be8dbf39df8d3fe68817932ee71ccb)
2007-10-10r2857: this commit gets rid of smb_ucs2_t, wpstring and fpstring, plus lots ↵Andrew Tridgell4-19/+65
of associated functions. The motivation for this change was to avoid having to convert to/from ucs2 strings for so many operations. Doing that was slow, used many static buffers, and was also incorrect as it didn't cope properly with unicode codepoints above 65536 (which could not be represented correctly as smb_ucs2_t chars) The two core functions that allowed this change are next_codepoint() and push_codepoint(). These functions allow you to correctly walk a arbitrary multi-byte string a character at a time without converting the whole string to ucs2. While doing this cleanup I also fixed several ucs2 string handling bugs. See the commit for details. The following code (which counts the number of occuraces of 'c' in a string) shows how to use the new interface: size_t count_chars(const char *s, char c) { size_t count = 0; while (*s) { size_t size; codepoint_t c2 = next_codepoint(s, &size); if (c2 == c) count++; s += size; } return count; } (This used to be commit 814881f0e50019196b3aa9fbe4aeadbb98172040)
2007-10-10r2854: added a RPC-COUNTCALLS torture test - a useful varient on the full ↵Andrew Tridgell3-0/+76
scanner in RPC-SCANNER (This used to be commit 04eaae59cda8a8d67bcca896a32dec2ad402a4f2)
2007-10-10r2853: add torture test to find the defaultNamingContext on the RootDSEStefan Metzmacher2-0/+198
try a sasl sealed CompareRequest abartlet: we need to check how SINGING only can work, it failed for me:-( metze (This used to be commit 1dabd04e265bbc1e8335f816708c2639746d9afd)
2007-10-10r2833: - added a call to SamrQueryGroupMember for every group, and fix theAndrew Tridgell1-1/+25
IDL so this works (the previous IDL was bogus) - changed a hyper to uint64 after looking at output on cascade on sparc (This used to be commit db1ed5675a5271085ea0b89dd634b037ee710178)
2007-10-10r2799: removed one last occurance of torture_ldb_alloc()Andrew Tridgell1-3/+3
(This used to be commit 5045482b14dfcbb535eab3e5fa63ef1c3b46c40f)
2007-10-10r2791: got rid of talloc_unreference() and instead created talloc_unlink(),Andrew Tridgell1-21/+109
which is much clearer and simpler to use. It removes a specific parent from a pointer, no matter whether that parent is a "reference" or a direct parent. This gives complete control over the free process. (This used to be commit 6c563887f1b9b8c842309a523e88b6f2a32db10f)
2007-10-10r2787: force masktest to use RAW_SEARCH_BOTH_DIRECTORY_INFO so it can obtain ↵Andrew Tridgell1-2/+3
the short name (This used to be commit ad5a5ea08d5be812e0ef662948477add2433bc6f)
2007-10-10r2785: call init_iconv() in smbtorture to ensure we have no memory allocatedAndrew Tridgell1-0/+1
when a test started, thus making leak detection easier (This used to be commit 6c46e4622a9851bdef25ba9d353bdebc25f6ec8d)
2007-10-10r2774: get rid of the lanman specific code in masktest, and add a -l optionAndrew Tridgell1-99/+8
(This used to be commit 630fefb24a2f8d332dfa39f6c4980cd230407142)
2007-10-10r2744: ben elliston taught me about gcov today, which allows you to measureAndrew Tridgell1-20/+300
the % coverage in terms of lines of code of a test suite. I thought a good first place to start with gcov was the talloc test suite. When I started the test suite covered about 60% of all lines of code in talloc.c, and now it covers about 99%. The only lines not covered are talloc corruption errors, as that would cause smb_panic() to fire. It will be interesting to try gcov on the main Samba test suite for smbd. We won't achieve 100% coverage, but it would be nice to get to 90% or more. I also modified the talloc.c sources to be able to be build standalone, using: gcc -c -D_STANDALONE_ -Iinlcude lib/talloc.c that should make it much easier to re-use talloc in other projects (This used to be commit 8d4dc99b82efdf24b6811851c7bdd4af5a4c52c9)
2007-10-10r2742: - fixed a bug in talloc_unreference()Andrew Tridgell1-41/+113
- made the LOCAL-TALLOC smbtorture test much stricter, checking that block counts for every pointer are correct after every operation (This used to be commit 18d3e2647f0bedbba699d1ba2649c0cfe4526ef6)
2007-10-10r2738: free up the session information as soon as it is invalidated in theAndrew Tridgell1-1/+1
RAW-CONTEXT test case (This used to be commit f4a7a3282af6c6ff771547d2efdbba0fe0451b3e)
2007-10-10r2735: More DCOM updates:Jelmer Vernooij2-0/+2
- Several updates to the interface definitions after reading some more of the specs - Add Remote Activation interface - Add body extension uuids - Add oxidresolve torture test to list - Make pidl complain about object interfaces that don't inherit from IUnknown (This used to be commit 1bb471832830d73f0c7290e2ec12878518598379)
2007-10-10r2718: - added a talloc_unreference() function as requested by metze.Andrew Tridgell1-17/+121
- added documentation for talloc_unreference() - made the abandoned child logic in talloc_free() clearer and more consistent (This used to be commit a87584c8e3fb06cd3ff29a918f681b5c6c32b9ff)
2007-10-10r2711: added a simple talloc speed tester. I get the following on my laptop:Andrew Tridgell1-0/+55
MEASURING TALLOC VS MALLOC SPEED talloc: 279154 ops/sec malloc: 318758 ops/sec which I think is an acceptable overhead for the increased functionality (This used to be commit 91669ea830c16db2730c5e43a7cad26d9db5c585)
2007-10-10r2710: continue with the new style of providing a parent context wheneverAndrew Tridgell7-18/+47
possible to a structure creation routine. This makes for much easier global cleanup. (This used to be commit e14ee428ec357fab76a960387a9820a673786e27)
2007-10-10r2709: finally solved the talloc reference problem.Andrew Tridgell3-9/+126
The problem was that the simple "uint_t ref_count;" in a talloc chunk did not give enough information. It told us that a pointer was referenced more than once, but it didn't say who it was referenced by. This means that when the pointer was freed we had no sane way to clean up the reference. I have now replaced ref_count with a "refs" list, which means that references point to the pointer, and the pointer has a linked list of references. So now we can cleanup from either direction without losing track of anything. I've also added a LOCAL-TALLOC smbtorture test that tests talloc behaviour for some common uses. (This used to be commit 911a8d590cb184bcb892810729955c2c4cf02550)
2007-10-10r2699: Correct handle ServerAlive() and ServerAlive2() + add torture testsJelmer Vernooij1-0/+117
(This used to be commit 9e74144aa8e5f9a8b6e3d5293833c4afeebeddb0)
2007-10-10r2680: switched the libcli/raw/ code over to use talloc_reference(), which ↵Andrew Tridgell3-11/+3
simplifies things quite a bit (This used to be commit c82a9cf750829c4f6982ca3133295c8599023c4e)
2007-10-10r2676: add a test of the reference counting logic in the SAMR server into theAndrew Tridgell1-86/+31
RPC-SAMR torture test. This closes the samr connection before working on a open domain handle. The server is supposed to know that the open domain handle still holds a reference to the connection, so the connection remains valid even though it has been closed. (This used to be commit f31e5d56e364ce8ab76fdb20b30e179b458b2ffa)
2007-10-10r2671: we're getting too many errors caused by the talloc_realloc() API notAndrew Tridgell2-3/+6
taking a context (so when you pass a NULL pointer you end up with memory in a top level context). Fixed it by changing the API to take a context. The context is only used if the pointer you are reallocing is NULL. (This used to be commit 8dc23821c9f54b2f13049b5e608a0cafb81aa540)
2007-10-10r2660: - converted the libcli/raw/ library to use talloc_increase_ref_count()Andrew Tridgell2-5/+17
rather than manual reference counts - properly support SMBexit in the cifs and posix backends - added a logoff method to all backends With these changes the RAW-CONTEXT test now passes against the posix backend (This used to be commit c315d6ac1cc40546fde1474702a6d66d07ee13c8)
2007-10-10r2659: removed some extraneous debug msgsAndrew Tridgell1-3/+0
(This used to be commit 770aa7e01e68df1fd8538c5b19b63a8545bb0355)
2007-10-10r2649: - used some cpp tricks to make users of talloc() and talloc_realloc()Andrew Tridgell1-0/+3
to get auto-naming of pointers very cheaply. - fixed a couple of memory leaks found with the new tricks A typical exit report for smbd is now: talloc report on 'null_context' (total 811 bytes in 54 blocks) auth/auth_sam.c:334 contains 20 bytes in 1 blocks struct auth_serversupplied_info contains 498 bytes in 33 blocks UNNAMED contains 8 bytes in 1 blocks lib/data_blob.c:40 contains 16 bytes in 1 blocks iconv(CP850,UTF8) contains 61 bytes in 4 blocks iconv(UTF8,CP850) contains 61 bytes in 4 blocks iconv(UTF8,UTF-16LE) contains 67 bytes in 4 blocks iconv(UTF-16LE,UTF8) contains 67 bytes in 4 blocks UNNAMED contains 13 bytes in 1 blocks which is much better than before (This used to be commit 6e721393d03afd3c2f8ced8422533547a9e33342)
2007-10-10r2645: converted the NTLMSSP code to the new style of tallocAndrew Tridgell1-4/+4
(This used to be commit b378aae95d4001c4cf4e6e59ed80ee1bd55382ee)
2007-10-10r2628: got rid of some warnings and converted a few more places to use ↵Andrew Tridgell1-1/+1
hierarchical memory allocation (This used to be commit 26da45a8019a2d6c9ff2ac2a6739c7d0b42b00de)
2007-10-10r2593: don't crash if the server doesn't know that 0 count searches mean 1Andrew Tridgell1-2/+6
(This used to be commit 640ced453092a5c5f3ffe7ee0fe4be804a4ced14)
2007-10-10r2589: a simple test to help find security related memory leaks. Run ↵Andrew Tridgell3-1/+71
valgrind on smbd with --show-leak=yes and --show-reachable=yes to track them down. (This used to be commit 7b23624a0f50c29346e8b1c4057f1c21f3be6d5a)
2007-10-10r2552: Character set conversion and string handling updates.Andrew Bartlett2-11/+9
The intial motivation for this commit was to merge in some of the bugfixes present in Samba3's chrcnv and string handling code into Samba4. However, along the way I found a lot of unused functions, and decided to do a bit more... The strlen_m code now does not use a fixed buffer, but more work is needed to finish off other functions in str_util.c. These fixed length buffers hav caused very nasty, hard to chase down bugs at some sites. The strupper_m() function has a strupper_talloc() to replace it (we need to go around and fix more uses, but it's a start). Use of these new functions will avoid bugs where the upper or lowercase version of a string is a different length. I have removed the push_*_allocate functions, which are replaced by calls to push_*_talloc. Likewise, pstring and other 'fixed length' wrappers are removed, where possible. I have removed the first ('base pointer') argument, used by push_ucs2, as the Samba4 way of doing things ensures that this is always on an even boundary anyway. (It was used in only one place, in any case). (This used to be commit dfecb0150627b500cb026b8a4932fe87902ca392)
2007-10-10r2551: Add const.Andrew Bartlett1-2/+2
Andrew Bartlett (This used to be commit 066789a479ed7b36041e3455caac01e5c9244dc0)
2007-10-10r2547: Another place to use convert_string_talloc().Andrew Bartlett1-7/+5
Andrew Bartlett (This used to be commit 4904d814c0efd870ac42c790028a8448984e4749)
2007-10-10r2536: This is a classic case for the use of our new talloc code, andAndrew Bartlett1-9/+8
convert_string_talloc(). Andrew Bartlett (This used to be commit 79776006b37fa9df0586711edaba5335467461ac)
2007-10-10r2532: Don't run EnumValue torture test for now (idl needs fixing, doesn't ↵Jelmer Vernooij1-1/+2
compile) (This used to be commit c98fbfe2507ef08cfd2ed5486f1122b6010939f9)
2007-10-10r2520: - finished implementing the server side of the old style search requestsAndrew Tridgell1-7/+7
(This used to be commit 4e4859c06b9de5fe60ebd17cfb09eed480b79ec1)
2007-10-10r2501: The AddMemberToAlias test doesn't need a domain_handle.Tim Potter1-5/+2
(This used to be commit 90a9e754db91647607eef3a2ccb08d3651fca9df)
2007-10-10r2500: disable the sleep test in echo until we have a win32 echo server thatAndrew Tridgell1-6/+5
does Microsoft style async rpc serving (This used to be commit 050dcd9b95576e1a9c0cb2144fc01c690853abc0)
2007-10-10r2489: Rename account_flags in EnumDomainAliases() to acct_flags.Tim Potter1-1/+1
(This used to be commit a0e571a9ddc01b8e90a93d591aec4b10c9926818)
2007-10-10r2469: complete overhaul of the old-style RAW_SEARCH_ calls (the OS/2 andAndrew Tridgell1-3/+18
original core level calls). The old code was completely wrong in many respects. also fixed the EA_SIZE level in the server extended the RAW-SEARCH test suite to test the new code properly (This used to be commit 71480271ad84b57fcdde264a54bb2408cf783255)
2007-10-10r2468: print out the names of the fault codes#Stefan Metzmacher1-4/+4
metze (This used to be commit a0c2a3a5d4fba2a6a78cc3d167cbc19941fb43dc)
2007-10-10r2465: modify the autoidl hack to work for DRSUAPIAndrew Tridgell1-3/+27
(This used to be commit 59b3d68bd047231d72fa3299e7289aef25702e9b)
2007-10-10r2462: added a test for the error code for no matching filenameAndrew Tridgell1-0/+18
(This used to be commit 7bfbbc38ed9aac93d288aba183f7a925f170f81e)
2007-10-10r2458: Rename policy handle parameters for the SAMR pipe. Parameters nowTim Potter4-134/+133
have the handle type implied by the parameter name. There are four types of handle: connect, domain, user and group handles. The various samr_Connect functions return a connect handle, and the samr_OpenFoo functions return a foo handle. There is one exception - the samr_{Get,Set}Security function can take any type of handle. Fix up all C callers. (This used to be commit 32f0f3154a8eb63de83145cbc8806b8906ccdc3e)
2007-10-10r2457: expanded the RAW-SEARCH test to test for what happens when a directoryAndrew Tridgell1-6/+233
is modified while being searched, and whether the server always returns sorted directory listings. (This used to be commit e23514c78f1f15a61dadaa5c4de5de7cd0593ea0)
2007-10-10r2443: check return code of event_loop_once() to catch thet cases where the ↵Stefan Metzmacher2-2/+6
server closes the connetion and we got EBADF from select() and event_loop_once() fails metze (This used to be commit 9c0e50a6f3d628156b4543d5ded89e06be696f64)
2007-10-10r2442: remove unused event_loop_once() callStefan Metzmacher1-2/+0
metze (This used to be commit 3cd63030b1433ddc3ae89e2f45c6f7a27b7d1756)
2007-10-10r2387: fix segfaultStefan Metzmacher1-0/+1
seems that [in,out,ref] vars should be initialize the [in] and [out] part metze (This used to be commit 47e613a5a1063d8e93e831252db03f19cdb08590)
2007-10-10r2382: considerably improved the Bind and Unbind IDL and test code. We canAndrew Tridgell1-178/+30
now do these two calls successfully against w2k3. note that you must use ncacn_ip_tcp, and must enable dcerpc sealing, otherwise w2k3 refuses the first DRSUAPI call. (This used to be commit 7d3e34742277f264e41739721dbf08036eebb598)
2007-10-10r2284: Thanks to some great detective work by tridge, NTLM2 signing now works.Andrew Bartlett1-2/+2
This means that 'require NTLMv2 session security' now works for RPC pipe signing. We don't yet have sealing, but it can't be much further. This is almost all tridge's code, munged into a form that can work with the GENSEC API. This commit also includes more lsakey fixes - that key is used for all DCE-RPC level authenticated connections, even over CIFS/ncacn_np. No doubt I missed something, but I'm going to get some sleep :-) Andrew Bartlett (This used to be commit a1fe175eec884280fb7e9ca8f528134cf4600beb)
2007-10-10r2274: fixed some popt option clashes between smbtorture and the standard ↵Andrew Tridgell1-6/+6
options (This used to be commit b7db909e8e8194366ff93f68adbd68a8f1dcbe9a)