1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-10 01:18:15 +03:00
Commit Graph

97 Commits

Author SHA1 Message Date
Andrew Tridgell
04eaae59cd r2854: added a RPC-COUNTCALLS torture test - a useful varient on the full scanner in RPC-SCANNER 2007-10-10 12:59:39 -05:00
Andrew Tridgell
6c46e4622a r2785: call init_iconv() in smbtorture to ensure we have no memory allocated
when a test started, thus making leak detection easier
2007-10-10 12:59:33 -05:00
Jelmer Vernooij
1bb4718328 r2735: More DCOM updates:
- 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
2007-10-10 12:59:27 -05:00
Andrew Tridgell
e14ee428ec r2710: continue with the new style of providing a parent context whenever
possible to a structure creation routine. This makes for much easier
global cleanup.
2007-10-10 12:59:25 -05:00
Andrew Tridgell
911a8d590c r2709: finally solved the talloc reference problem.
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.
2007-10-10 12:59:24 -05:00
Andrew Tridgell
770aa7e01e r2659: removed some extraneous debug msgs 2007-10-10 12:59:17 -05:00
Andrew Tridgell
7b23624a0f r2589: a simple test to help find security related memory leaks. Run valgrind on smbd with
--show-leak=yes and --show-reachable=yes to track them down.
2007-10-10 12:59:09 -05:00
Andrew Tridgell
b7db909e8e r2274: fixed some popt option clashes between smbtorture and the standard options 2007-10-10 12:58:37 -05:00
Andrew Tridgell
0f3b01beba r2271: fixed the popt argument array for smbtorture, getting rid of some
clashes

metze, please note that the 'val' field in popt is not the default
value, its the integer to switch on in the argument loop.
2007-10-10 12:58:36 -05:00
Andrew Tridgell
05fd38f3cf r2200: solved another piece of the lsakey puzzle - the session key for lsa
encryption on ncacn_ip_tcp is a fixed buffer! I don't yet know what
the buffer is, but this code proves its the same buffer for different
w2k3 servers and different user passwords, plus it is independent of
the negotiated NTLMSSP session key.
2007-10-10 12:58:30 -05:00
Andrew Tridgell
ad8d54fd7d r2182: force the torture test domain join to happen on SMB to prevent the
LSAKEY problem holding up other tests
2007-10-10 12:58:29 -05:00
Andrew Tridgell
756f28ac95 r2159: converted samba4 over to UTF-16.
I had previously thought this was unnecessary, as windows doesn't use
standards compliant UTF-16, and for filesystem operations treats bytes
as UCS-2, but Bjoern Jacke has pointed out to me that this means we
don't correctly store extended UTF-16 characters as UTF-8 on
disk. This can be seen with (for example) the gothic characters with
codepoints above 64k.

This commit also adds a LOCAL-ICONV torture test that tests the first
1 million codepoints against the system iconv library, and tests 5
million random UTF-16LE buffers for identical error handling to the
system iconv library.

the lib/iconv.c changes need backporting to samba3
2007-10-10 12:58:27 -05:00
Stefan Metzmacher
4733dcbf5f r2071: - change smbtorture to use the popt_common stuff
this means -U DOM\\user is know allowed

- torture:userdomain is a new smb.conf parameter
  because lp_workgroup is not the domain of the user

- we use torture:userdomain now in the tests instad of lp_workgroup

- for backward compat the userdomain is lp_workgroup() by default and
  not lp_netbios_name(), which my change later to match 'net' and 'smbclient'..

- we now have dublicate options e.g. -N -s ...
  tridge: can we change this?

metze
2007-10-10 12:58:23 -05:00
Andrew Bartlett
7e18ca7285 r2056: Allow the compiler to check this format string.
Andrew Bartlett
2007-10-10 12:58:22 -05:00
Andrew Tridgell
2ce4028842 r1897: added a choose_called_name() function that allows us to more sanely
handle connections using the IP as the server name, while not trying
for NBT name resolution on names like "192" and "192.168.1.2".

also removed the ip address argument to smbcli_socket_connect() as it
isn't used and doesn't really make sense.
2007-10-10 12:58:09 -05:00
Simo Sorce
0eaec28f5c r1793: try to bind multiple times as anonimous and user
added -D parameter to torture to be able to specify:
- user dn
- base dn
- user secret
2007-10-10 12:57:57 -05:00
Simo Sorce
e6a6c0737a r1771: OK Let's add tests for ldap.
Thanks to Metze and Volker for their unvaluable support :)
2007-10-10 12:57:56 -05:00
Stefan Metzmacher
8441750fd9 r1654: rename cli_ -> smbcli_
rename CLI_ -> SMBCLI_

metze
2007-10-10 12:57:47 -05:00
Andrew Tridgell
19c22760c6 r1636: improved the negnowait test so it is standalone (taking advantage of the async APIs) 2007-10-10 12:57:46 -05:00
Andrew Tridgell
2e297be5c3 r1628: - fixed the comment on run_deferopen. (I also think that the
deferopen test should probably be ripped out and redone, as it
   tests the wrong thing.)

 - removed some unused code

 - add progress printing to the pipe_number test

 - fixed the dir1 test to use deltree rather than trying to re-invent it itself (in a broken manner)

 - renamed all of the tests into catagories, so you can now run
   BASE-* for the base tests, and BENCH-* for the benchmarks.
2007-10-10 12:57:44 -05:00
Jelmer Vernooij
518ff5f505 r1617: Start working on the svcctl pipe 2007-10-10 12:57:44 -05:00
Andrew Bartlett
b97d3cb2ef r1498: (merge from 3.0)
Rework our random number generation system.

On systems with /dev/urandom, this avoids a change to secrets.tdb for every fork().

For other systems, we now only re-seed after a fork, and on startup.
No need to do it per-operation.  This removes the 'need_reseed'
parameter from generate_random_buffer().

This also requires that we start the secrets subsystem, as that is
where the reseed value is stored, for systems without /dev/urandom.

In order to aviod identical streams in forked children, the random
state is re-initialised after the fork(), at the same point were we do
that to the tdbs.

Andrew Bartlett
2007-10-10 12:57:35 -05:00
Stefan Metzmacher
3fc9abcad7 r1481: add idl file and torture test dummies
for DRSUapi (the Active Directory Replication Protocol)

I'll try to fill the idl file as part of a study project
together with some other students...

metze
2007-10-10 12:57:34 -05:00
Volker Lendecke
08140cc1a8 r1470: Get the smb_trans2 structure out of the rap_cli_call struct.
Initial attempt at RAP server infrastructure. Look at rap_server.c for the
dummy functions that are supposed to implement the core functionality.

ipc_rap.c contains all the data shuffling. _rap_shareenum and _rap_serverenum2
in ipc_rap.c are (I think) regular enough to be auto-generated.

I did not test all the corner cases yet, but nevertheless I would like some
comments on the general style.

Volker

P.S: samba-3 smbclient now doesn't freak out anymore, although the results are
not entirely correct :-)
2007-10-10 12:57:33 -05:00
Stefan Metzmacher
f1bbde6bb4 r1403: commit volkers initial RAP torture test
we'll try to autogenerate the specific calls in future by pidl
and create a new subsystem for the rap lib

after that the server side will be added

metze
2007-10-10 12:56:54 -05:00
Stefan Metzmacher
acde1358c9 r1402: we should prompt for a password if it's not given by -U
metze
2007-10-10 12:56:54 -05:00
Stefan Metzmacher
626bb153c4 r1228: use int64_t instead of long long
(jra: please use: void, char int, uint_t, [u]int<8|16|32|64>_t types in new code)

metze
2007-10-10 12:56:45 -05:00
Andrew Bartlett
e12ad47c69 r1173: A quick little test to show that we cannot bind twice to a single endpoint.
Andrew Bartlett
2007-10-10 12:56:43 -05:00
Andrew Bartlett
5d39d7497f r1123: Make all lp_ string functions return 'const char *'.
Fix other 'const' warnings in the torture code.

Andrew Bartlett
2007-10-10 12:56:38 -05:00
Jeremy Allison
5c3a2417cf r1091: Added in timing tests for deferred opens. Added extra debug info to signing
mistakes.
Jeremy.
2007-10-10 12:56:37 -05:00
Jeremy Allison
0068cb12ef r1086: Add defer open test to check timeout on sharing violation open.
This has found some signing errors in the Samba3.0 implementation
of the deferred open code. Still working on these...
Jeremy
2007-10-10 12:56:37 -05:00
Andrew Tridgell
36f05e4d57 r1041: - pulled the domain join code out of the netlogon test and made it a separate utility function, to allow
multiple torture tests to temporarily join a domain

- fixed a session key size problem

- added a schannel test suite

- allow schannel to work with ncacn_ip_tcp
2007-10-10 12:56:33 -05:00
Jelmer Vernooij
c085b1f94e r1039: Remove description of unexisting option. 2007-10-10 12:56:33 -05:00
Stefan Metzmacher
57151e80eb r962: convert 'unsigned' and 'unsigned int' to uint_t
metze
2007-10-10 12:56:23 -05:00
Stefan Metzmacher
9f914e4af9 r961: convert 'uchar' to 'uint8_t'
metze
2007-10-10 12:56:23 -05:00
Stefan Metzmacher
18062d2ed9 r960: convert 'unsigned int' to uint_t in the most places
metze
2007-10-10 12:56:23 -05:00
Andrew Bartlett
9df5cbbd76 r892: Actually add the NTLMSSP self-check torture code this time...
Andrew Bartlett
2007-10-10 12:56:18 -05:00
Stefan Metzmacher
2986c5f08c r890: convert samba4 to use [u]int8_t instead of [u]int8
metze
2007-10-10 12:56:16 -05:00
Stefan Metzmacher
af6f1f8a01 r889: convert samba4 to use [u]int16_t instead of [u]int16
metze
2007-10-10 12:56:16 -05:00
Stefan Metzmacher
0e5517d937 r884: convert samba4 to use [u]int32_t instead of [u]int32
metze
2007-10-10 12:56:15 -05:00
Stefan Metzmacher
ad662fddcd r882: - create TORTURE_AUTH SUBSYSTEM
- fix the build because of the missing torture/ntlmssp.c
- this file should go into torture/auth/ !

metze
2007-10-10 12:56:15 -05:00
Andrew Bartlett
399e2e2b11 r874: This patch is a pile of work on NTLMSSP:
Samba's NTLMSSP code is now fully talloc based, which should go a long
way to cleaning up the memory leaks in this code.  This also avoids a
lot of extra copies of data, as we now allocate the 'return' blobs on
a caller-supplied context.

I have also been doing a lot of work towards NTLM2 signing and
sealing.  I have this working for sealing, but not for the verifier
(MD5 integrity check on the stream) which is still incorrect.

(I can aim a rpcecho sinkdata from a Win2k3 box to my server, and the
data arrives intact, but the signature check fails.  It does however
match the test values I have...).

The new torture test is cludged in - when we get a unit test suite
back, I'll happliy put it in the 'right' place....

Andrew Bartlett
2007-10-10 12:56:14 -05:00
Jeremy Allison
2cb4ed271b r863: Added test to ensure an open and locked file can be truncated by a second open.
This was something the Samba3 server previously got wrong.
Jeremy.
2007-10-10 12:56:13 -05:00
Stefan Metzmacher
9de377a914 r821: prompt user for password if not given by -U user%pass
and not as torture:password in smb.conf

metze
2007-10-10 12:53:52 -05:00
Jeremy Allison
6cb21ccda3 r741: Test from Volker in RAW-OPEN for truncating a file containing locks.
Also added the same ad-hoc test is LOCK7.
Jeremy.
2007-10-10 12:53:46 -05:00
Volker Lendecke
37221b81f1 r386: Another torture test to survive.
Believe it or not, w2k3 returns ERRSRV:ERRbaduid DOS error code if you pass in
a wrong vuid. We (Samba 3) currently return NT_STATUS_NETWORK_ACCESS_DENIED.

Volker
2007-10-10 12:51:36 -05:00
Andrew Tridgell
84de0b7e58 r336: added a -X command line option to smbtorture to enable dangerous or
possibly destructive tests. Use with care!

Added IDL and test code for samr_Shutdown() and samr_SetDsrmPassword()
2007-10-10 12:51:33 -05:00
Andrew Tridgell
c8497a4236 - moved some of the base tests into torture/basic/
- added a CHARSET set of tests, which determines how the server deals
with some specific charset issues related to UTF-16
support. Interestingly, Samba3 already passes all but one of these
tests, because our incorrect UCS-2 and UTF-8 implementations where we
don't check the validity of characters actually matches what Windows
does! This means that adding UTF-16 support to Samba is going to be
_much_ easier than we expected.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
e0d9502aa2 added the -C option to smbtorture
this option takes a filename containing a list of UNC names. When
supplied to a torture test that uses multiple client connections the
test will distribute the load across the listed UNC names. This allows
you to use NBENCH effectively against a server that has multiple IP
addresses, and spread the load among them.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
a46c009c04 greatly improved NBENCH netbench simulator
- more accurate request simulation using Samba4 raw client library
 - now checks for correct status on all requests
 - timelimit based benchmarking, default of 600 seconds
0001-01-01 00:00:00 +00:00