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

850 Commits

Author SHA1 Message Date
Andrew Bartlett
c1d3794cad r3716: Improvements in the RPC-SAMSYNC tests:
We now (for the first time) start to parse the 'user sensitive info'
 field, which reveals the user's NT and LM passwords from Win2k3.

 Using this, the 'validate samsync against netlogon' portion of the
 tests works for accounts.

 Trusted domains and secrets are now retreived, but like users,
 require further cross-validation work.

Andrew Bartlett
2007-10-10 13:05:46 -05:00
Andrew Tridgell
f7fb34715b r3699: - split the delayed write testing out of RAW-WRITE, as it is not yet
clear what the correct behaviour is for delayed stat info update.

- use a common torture_setup_dir() function for setting up a test
  directory in torture tests.
2007-10-10 13:05:45 -05:00
Jelmer Vernooij
7466947a23 r3689: Large number of COM updates:
- Work on server side and local COM support (should work, just no
	  example classes yet)
 - Use vtables so that local and remote calls can be used transparently
 - Generate 'proxies and stubs' rather then heavily modified code in client.pm and server.pm. proxies (client side code) are generated in proxy.pm, stubs (server side dispatchers) are generated in stubs.pm
 - Support registering classes and interfaces
 - DCOM interfaces no longer have to be in the same IDL file as their
    base interface, which will allow us to split up dcom.idl
2007-10-10 13:05:44 -05:00
Andrew Bartlett
ab12134286 r3687: Gaah - I forgot to add the new file for the RPC-SAMSYNC test...
See -r 3686

Andrew Bartlett
2007-10-10 13:05:44 -05:00
Andrew Bartlett
6e6cc6fb98 r3686: The results of some work on the NETLOGON pipe:
Break out the samsync tests from RPC-NETLOGON into a new RPC-SAMSYNC,
that will cross-verify all the values.

Add support for the way netlogon credentials are shared between the
pipe that sets up schannel and the pipe that is encrypted with it.

Test this support, by calling both NETLOGON and SAMR operations in the
RPC-SCHANNEL test.

Move some of the Netlogon NEG flags into the .idl, now we have an idea
what a few of them really are.

Rename the sam_pwd_hash into a name that has meaning (all other crypto
functions were renamed in Samba4 ages ago).

Break out NTLMv2 functionality for operation on the NT hash - I intend
to do NTLMv2 logins in the samsync test in future, and naturally I
only have the hash.

Andrew Bartlett
2007-10-10 13:05:43 -05:00
Andrew Bartlett
68dd173dc0 r3680: Move the multiple runs of this test into a loop. Also check that no
flags individually have an impact (above what we already expect).

Andrew Bartlett
2007-10-10 13:05:43 -05:00
Andrew Bartlett
295e09fa3e r3679: We now know a few more of the Netlogon negotiate flags.
Interestingly, all the interesting flags are a '4' (as hex digits in
the flag).

Andrew Bartlett
2007-10-10 13:05:43 -05:00
Andrew Bartlett
cd23ddd0a7 r3678: Remove testing code accidentily commited.
Andrew Bartlett
2007-10-10 13:05:43 -05:00
Andrew Bartlett
3a140a3691 r3677: Seperate the SamLogon tests from the main RPC-NETLOGON test into a
RPC-SAMLOGON of their own.

I have expanded the tests to validate the use of various flags, which
change some of the crypto behaviour.

Andrew Bartlett
2007-10-10 13:05:43 -05:00
Andrew Bartlett
49c335bcd8 r3676: Add a negitive test for NTLM2 session security (which should not
appear in netlogon, despite what the LM response may look like).

Make the logon tests less verbose - only print test names on failure.

Andrew Bartlett
2007-10-10 13:05:43 -05:00
Volker Lendecke
02f5205872 r3660: This simulates the logon sequence of a XP login session I'm currently tuning
Samba3/OpenLDAP for. For a concrete situation you have to adapt the domain,
pdcname and usernames/passwords. Sorry, not parametrized yet, but this should
be doable if necessary.

Volker
2007-10-10 13:05:42 -05:00
Andrew Bartlett
7937503849 r3657: More netlogon torture. We now test both function calls (SamLogon and SamLogonWithFlags).
Andrew Bartlett
2007-10-10 13:05:42 -05:00
Andrew Bartlett
be99ee4719 r3653: Move Interactive login tests up with the rest of the logon tests.
(Hmm, this whole section should be broken out into a new file, I
think).

Add new tests, particularly of the LM key for NTLMv2 responses, and
the (changed, apparently) session key for LMv2 only logins.

Next is to add SAMR modification and cross-validation.

Andrew Bartlett
2007-10-10 13:05:42 -05:00
Andrew Tridgell
25e0138464 r3634: - fixed BASE-DISCONNECT test to force the async packets to be sent by
waiting for a chkpath response

- fixed open async send in BASE-DISCONNECT

with these changes BASE-DISCONNECT crashes Samba4, as it was designed
to do. I'll work on a fix :)
2007-10-10 13:05:41 -05:00
Andrew Tridgell
5205f598b8 r3633: - moved module init functions to after smb.conf and command line
parsing, so that module init can take account of lp_ parms (thats
  why gensec:krb5=no wasn't working)

- added a BASE-DISCONNECT torture test that tests server response to
  clients disconnecting with open lock and open requests pending
2007-10-10 13:05:41 -05:00
Jelmer Vernooij
709f279b19 r3626: More minor DCOM fixes 2007-10-10 13:05:40 -05:00
Jelmer Vernooij
8693344772 r3611: DCOM client support works!!
The torture test DCOM-SIMPLE now successfully does an
IStream_Read and a IStream_Write call.

This test can now be run successfully against the "Simple DCOM" Visual
Studio example.

(You have to quote out line 337 in pidl. pidl complains if the variable
 that contains the array size follows the array. I still need to fix this
 properly)

Next goals:
 - Clean up code
 - Server side support
 - Support custom marshalling
 - Support DCOM interfaces in files other then dcom.idl
2007-10-10 13:05:39 -05:00
Andrew Tridgell
eeec57d4f6 r3608: added BASE-DENYDOS test
this test demonstrates how w2k3 handles the special semantics of
DENY_DOS when 2 opens happen on the same connection. The 2nd open
doesn't actually do a NTFS open, it happens as a secondary reference
to the same internal file handle in the CIFS layer. The evidence is
that the 2nd open shares the same POSITION_INFORMATION field as the
first open, but only for the special DENY_DOS cases that would
normally be refused.
2007-10-10 13:05:38 -05:00
Jelmer Vernooij
93eb3cd99c r3601: Lots of smaller DCOM updates and fixes. Adds oxid tables, proper
use of contexts.
2007-10-10 13:05:38 -05:00
Andrew Tridgell
425e36ca4d r3594: continue conversion to __location__ from __LINE__ for error reporting 2007-10-10 13:05:37 -05:00
Jelmer Vernooij
7a8244761b r3586: Fix some of the issues with the module init functions.
Both subsystems and modules can now have init functions, which can be
specified in .mk files (INIT_FUNCTION = ...)

The build system will define :
 - SUBSYSTEM_init_static_modules that calls the init functions of all statically compiled modules. Failing to load will generate an error which is not fatal
 - BINARY_init_subsystems that calls the init functions (if defined) for the subsystems the binary depends on

This removes the hack with the "static bool Initialised = " and the
"lazy_init" functions
2007-10-10 13:05:36 -05:00
Stefan Metzmacher
1e9c0b68ca r3583: - seperate the ldap client code and the ldap parsing code
(vl: we should only sync the parsing code with trunk)

- use hierachical talloc in the ldap client code

metze
2007-10-10 13:05:35 -05:00
Andrew Tridgell
cb76bd218e r3580: - on file overwrite in ntcreatex we need to replace the file permissions.
- pvfs now passes BASE-OPENATTR

- pvfs also passes the BASE-DEFER_OPEN test, but it is not a well
  formed test for regular running so I am removing it from the list of
  tests to run in test_posix.sh (the test is covered better by RAW-MUX
  anyway)
2007-10-10 13:05:35 -05:00
Stefan Metzmacher
29cd3d20e3 r3577: add a torture_join_domain_ads_dc() function,
which will join as a w2k dc joins a ads domain

(this is currently not fully implmented,
 I just have listed the steps we need to do)

metze
2007-10-10 13:05:33 -05:00
Andrew Tridgell
64a6db5b02 r3576: don't consider short share delay timeouts to be an error, so we can
run test_posix.sh in a reaonable time by using posix:sharedelay=100000

this still tests correct multiplex behaviour
2007-10-10 13:05:33 -05:00
Andrew Tridgell
09b4652b40 r3574: the RAW-OPEN test changes broke a couple of the other tests. This
fixes most of them, although RAW-SEARCH still fails (due to an
interaction with the new xattr code)
2007-10-10 13:05:33 -05:00
Andrew Tridgell
ed844192d7 r3573: added trans2open support to smbd and pvfs, and fine-tuned the open->generic ntvfs mapping code. 2007-10-10 13:05:33 -05:00
Andrew Bartlett
fb7bc73f58 r3557: Use a switch, not a series of if/else if statements.
Andrew Bartlett
2007-10-10 13:05:32 -05:00
Andrew Bartlett
59757c7f9d r3553: Allow talloc_reference to take a NULL pointer for the "ptr" argument.
This allows potentially NULL pointers to be referenced, without an if ()
for every use.  (previously, it would segfault).

Update doco, and allow talloc_unlink to match.

Andrew Bartlett
2007-10-10 13:05:31 -05:00
Andrew Tridgell
f23d6a2800 r3540: added testing of SMBntcancel in the open/open/close mux
testing. Interestingly, w2k3 does not allow the cancel of an
outstanding async open request, whereas it does allow the cancel of an
outstanding async lock request. To support this I have changed the
pvfs_wait interface to provide a enum on why the event is happening,
so the callback can decide what to do.
2007-10-10 13:05:30 -05:00
Andrew Tridgell
eded2ad9c9 r3539: much nicer async open delay code.
The previous code didn't handle the case where the file got renamed or
deleted while waiting for the sharing violation delay. To handle this
we need to make the 2nd open a full open call, including the name
resolve call etc. Luckily this simplifies the logic.

I also expanded the RAW-MUX test to include the case where we do
open/open/open/close/close, with the 3rd open async, and that open
gets retried after both the first close and the 2nd close, with the
first retry failing and the 2nd retry working. The tests the "async
reply after a async reply" logic in pvfs_open().
2007-10-10 13:05:29 -05:00
Andrew Tridgell
3423e2f414 r3528: added support for the SMBntcancel() operation, which cancels any
outstanding async operation (triggering an immediate timeout).

pvfs now passes the RAW-MUX test
2007-10-10 13:05:28 -05:00
Andrew Bartlett
a9f57319b8 r3524: Remove unused variable.
Andrew Bartlett
2007-10-10 13:05:28 -05:00
Jelmer Vernooij
a5c9e0a185 r3517: Fix the build - Sorry! 2007-10-10 13:05:27 -05:00
Jelmer Vernooij
8076db7a1f r3514: Allow specification of username, password and domain and try to set up connection. 2007-10-10 13:05:24 -05:00
Jelmer Vernooij
c052f2e1ed r3513: Add (the infrastructure for) DCOM support. Contents:
- Support for sending over the object UUID in DCERPC calls
 - Simple torture test for the DCOM "Simple" object
 - Generate extra argument for "object" interfaces in pidl
 - Some stubs for common DCOM functions
2007-10-10 13:05:23 -05:00
Stefan Metzmacher
f631069582 r3512: - support DsCrackName GUID strings ('{faedf4f9-0de8-4582-b8b6-c475efefbe5a}')
- resolve the GUID's we got in DsGetDomainControllerInfo in the DsCrackNames test

metze
2007-10-10 13:05:23 -05:00
Stefan Metzmacher
8e3f87b9e0 r3509: - comment out a unused var
- fix a scalar vs pointer bug

metze
2007-10-10 13:05:23 -05:00
Andrew Tridgell
0d51511d40 r3507: - added deferred replies on sharing violation in pvfs open. The
deferred reply is short-circuited immediately when the file is
  closed by another user, allowing it to be opened by the waiting user.

- added a sane set of timeval manipulation routines

- converted all the events code and code that uses it to use struct
  timeval instead of time_t, which allows for microsecond resolution
  instead of 1 second resolution. This was needed for doing the pvfs
  deferred open code, and is why the patch is so big.
2007-10-10 13:05:23 -05:00
Andrew Tridgell
ba81a48c9d r3499: setting an out param for a non-pointer doesn't do anything (and
generated a warning as it was being set to a ptr)
2007-10-10 13:05:22 -05:00
Andrew Tridgell
7dd3a5a6da r3497: removed some include cruft, and split out librpc/gen_ndr/tables.h 2007-10-10 13:05:22 -05:00
Andrew Tridgell
558de54ec6 r3494: got rid of include/rewrite.h, and split out the dynconfig.h header 2007-10-10 13:05:22 -05:00
Jelmer Vernooij
640e3a8ce8 r3490: All tests work against NT4 now 2007-10-10 13:05:21 -05:00
Jelmer Vernooij
06048d0dac r3489: Add a couple more DCOM tests (Both OxidResolver and RemoteActivation are
completely covered now)
2007-10-10 13:05:21 -05:00
Jelmer Vernooij
f6f3d312bf r3487: RemoteActivation works! The only odd bit is that I get either a
NT_STATUS_BUFFER_TOO_SMALL or a NT_STATUS_NET_WRITE_FAULT if I try other user accounts. Must've got something to do with the auth padding...
2007-10-10 13:05:21 -05:00
Andrew Tridgell
c6f4865744 r3481: split out client.h and events.h 2007-10-10 13:05:20 -05:00
Andrew Tridgell
7c4e6ebf05 r3466: split out request.h, signing.h, and smb_server.h 2007-10-10 13:05:17 -05:00
Andrew Tridgell
70d2090f6b r3464: split out registry.h, rap.h and ldap_server.h 2007-10-10 13:05:17 -05:00
Andrew Tridgell
b97e395c81 r3463: separated out some more headers (asn_1.h, messages.h, dlinklist.h and ioctl.h) 2007-10-10 13:05:17 -05:00
Andrew Tridgell
3f75117db9 r3462: separate out the crypto includes 2007-10-10 13:05:16 -05:00
Andrew Tridgell
1087ea830e r3461: another place where "open" was used as a structure element 2007-10-10 13:05:16 -05:00
Andrew Tridgell
4e92e15c4e r3458: more solaris portability fixes, the main one being that we can't use a
structure element called "open" as its a macro on solaris.
2007-10-10 13:05:16 -05:00
Andrew Tridgell
7842b23d01 r3457: s_addr is a macro on solaris, so we can't use it in structure names. arrgh. 2007-10-10 13:05:15 -05:00
Andrew Tridgell
10188869ef r3454: moved a few more things out if includes.h into the include/system/ include files.
this brings us down to about 11k lines of headers included with
includes.h, while still retaining the speed of building with pch
2007-10-10 13:05:13 -05:00
Andrew Tridgell
7b7477ac42 r3453: - split out the auth and popt includes
- tidied up some of the system includes

- moved a few more structures back from misc.idl to netlogon.idl and samr.idl now that pidl
  knows about inter-IDL dependencies
2007-10-10 13:05:13 -05:00
Andrew Tridgell
6b1f86aea8 r3449: more include file reduction
the ldb part isn't ideal, I will have to think of a better solution
2007-10-10 13:05:13 -05:00
Andrew Tridgell
264ce91810 r3447: more include/system/XXX.h include files 2007-10-10 13:05:12 -05:00
Andrew Tridgell
70055fb1f4 r3446: created include/system/iconv.h and include/system/shmem.h 2007-10-10 13:05:12 -05:00
Andrew Tridgell
8ebd20cf55 r3445: made the gtk tooks use minimal includes. This approximately halves the
total include lines in compiling C files in Samba (the .gch file is
now 5M instead of 12M)

This also gets rid of the silly gtk compile warning for non-gtk code
2007-10-10 13:05:12 -05:00
Andrew Tridgell
2e25c71853 r3443: the next stage in the include files re-organisation.
I have created the include/system/ directory, which will contain the
wrappers for the system includes for logical subsystems. So far I have
created include/system/kerberos.h and include/system/network.h, which
contain all the system includes for kerberos code and networking code.
These are the included in subsystems that need kerberos or networking
respectively.

Note that this method avoids the mess of #ifdef HAVE_XXX_H in every C
file, instead each C module includes the include/system/XXX.h file for
the logical system support it needs, and the details are kept isolated
in include/system/

This patch also creates a "struct ipv4_addr" which replaces "struct
in_addr" in our code. That avoids every C file needing to import all
the system networking headers.
2007-10-10 13:05:11 -05:00
Andrew Tridgell
73ea8ee6c2 r3441: some include file cleanups and general housekeeping 2007-10-10 13:05:11 -05:00
Jelmer Vernooij
0873bf2cbe r3432: Support WERROR's in arguments (not just as return type). Some of
the DCOM calls are wrappers around several local calls, so you get things like:

WERROR foobar ( [in] int num_ifaces,
			   [in,size_is(num_ifaces)] IID *ifaces,
			   [out,size_is(num_ifaces)] WERROR *results);
2007-10-10 13:05:10 -05:00
Andrew Tridgell
b8f5fa8ac8 r3428: switched to using minimal includes for the auto-generated RPC code.
The thing that finally convinced me that minimal includes was worth
pursuing for rpc was a compiler (tcc) that failed to build Samba due
to reaching internal limits of the size of include files. Also the
fact that includes.h.gch was 16MB, which really seems excessive. This
patch brings it back to 12M, which is still too large, but
better. Note that this patch speeds up compile times for both the pch
and non-pch case.

This change also includes the addition iof a "depends()" option in our
IDL files, allowing you to specify that one IDL file depends on
another. This capability was needed for the auto-includes generation.
2007-10-10 13:05:09 -05:00
Andrew Tridgell
dd0618d595 r3426: removed 2 unused files, and some unused variables 2007-10-10 13:05:08 -05:00
Andrew Tridgell
386ac565c4 r3419: moved the libcli/raw structures into libcli/raw/libcliraw.h
and made them private
2007-10-10 13:05:07 -05:00
Jelmer Vernooij
52d924501a r3416: Typos 2007-10-10 13:05:07 -05:00
Jelmer Vernooij
bcb89806fe r3414: RemoteActivation torture test 2007-10-10 13:05:07 -05:00
Jelmer Vernooij
cabec03422 r3413: RemoteActivation updates and fixes
Add torture test for RemoteActivation
The request is now send correctly and we get back a valid response
from Windows but r->in.Interfaces is set to 0 somewhere while parsing
the response...
2007-10-10 13:05:07 -05:00
Andrew Tridgell
adf4a68270 r3400: - allow callers to control the flags2 field in raw packets
- added testing of the FLAGS2_READ_PERMIT_EXECUTE bit in the ntdeny tests
2007-10-10 13:05:05 -05:00
Jelmer Vernooij
cf976a6feb r3397: Fix IDL for ComplexPing and SimplePing, including tests 2007-10-10 13:05:05 -05:00
Tim Potter
c776232d01 r3396: Rename form_name -> formname. This time, check smbtorture builds before
committing.  (-:
2007-10-10 13:05:05 -05:00
Andrew Bartlett
d967569c56 r3394: Give the user a clue why we are blasting them with the usage brick.
Andrew Bartlett
2007-10-10 13:05:05 -05:00
Andrew Tridgell
eb3366d366 r3391: fixed some memory leaks in the schannel code 2007-10-10 13:05:04 -05:00
Andrew Tridgell
c36851d230 r3387: fixed pvfs to pass the NTDENY tests. The tricky bit was
SA_RIGHT_FILE_EXECUTE, which depends on a flags2 bit
2007-10-10 13:05:04 -05:00
Andrew Tridgell
b95493d3d1 r3386: - fixed --seed option in smbtorture
- added new tests BASE-NTDENY1 and BASE-NTDENY2. These are the
  ntcreatex equivalents of the BASE-DENY1 and BASE-DENY2
  tests. Unfortunately, with ntcreatex there are 4 million combination
  and trying each one takes 1 second, so randomised testing is the
  only choice. The BASE-DENY1 test can operate in parallel with
  hundreds of connections, speeding things up a bit (as most time is
  spent waiting 1 second for a sharing violation to come back)
2007-10-10 13:05:03 -05:00
Andrew Tridgell
e23edf762c r3383: avoid multi-part SMBtrans and SMBtrans2 replies until our client library can handle
them properly (they are difficult to do in an async fashion).

By choosing trans.in.max_data to fix in the negotiated buffer size a
server won't send us multi-part replies.

I notice that windows seems to avoid them too :)
2007-10-10 13:05:03 -05:00
Jelmer Vernooij
a71d51dd3b r3348: More registry fixes and additions. The following functions work right now against samba 4, at least with a ldb backend:
winreg_Open*
winreg_OpenKey
winreg_EnumKey
winreg_DeleteKey
winreg_CreateKey
2007-10-10 13:04:58 -05:00
Jelmer Vernooij
da65a248c2 r3340: Various fixes in the registry code. Implement the EnumKey call
in the server.
2007-10-10 13:04:57 -05:00
Jelmer Vernooij
87833cc758 r3332: Check result codes in some more places... 2007-10-10 13:04:56 -05:00
Andrew Tridgell
1629b593c6 r3325: missed one of the torture changes ... 2007-10-10 13:04:55 -05:00
Andrew Tridgell
7067bb9b52 r3324: made the smbtorture code completely warning free 2007-10-10 13:04:55 -05:00
Andrew Tridgell
5921587ec2 r3323: more warning reductions 2007-10-10 13:04:55 -05:00
Volker Lendecke
5e8fd27d6e r3317: Fix the build 2007-10-10 13:04:53 -05:00
Andrew Tridgell
32dccf91cf r3288: - updated the path processing in pvfs to pass the RAW-CHKPATH test. This
rather extensive test reveals some really bizarre error code
  handling in w2k3.

- extended and simplified the RAW-CHKPATH test, making it easier to
  read (note that Samba3 fails the new tests - jra may wish to look)

- marked RAW-CHKPATH as pass for pvfs
2007-10-10 13:04:50 -05:00
Andrew Tridgell
7f2c771b0e r3278: - rewrote the client side rpc connection code to use lib/socket/
rather than doing everything itself. This greatly simplifies the
  code, although I really don't like the socket_recv() interface (it
  always allocates memory for you, which means an extra memcpy in this
  code)

- fixed several bugs in the socket_ipv4.c code, in particular client
  side code used a non-blocking connect but didn't handle EINPROGRESS,
  so it had no chance of working. Also fixed the error codes, using
  map_nt_error_from_unix()

- cleaned up and expanded map_nt_error_from_unix()

- changed interpret_addr2() to not take a mem_ctx. It makes absolutely
  no sense to allocate a fixed size 4 byte structure like this. Dozens
  of places in the code were also using interpret_addr2() incorrectly
  (precisely because the allocation made no sense)
2007-10-10 13:04:49 -05:00
Andrew Tridgell
bc83d823b2 r3276: - allow for more than 256 open old style searches (limit currently set at an arbitrary 5000)
- auto-cleanup old searches that the client forgot to close (common with old searches)

- expanded the RAW-SEARCH test to test more than 256 old searches, and
  old search rewind (w2k3 fails this - it appears to not support rewind
  on old style searches)
2007-10-10 13:04:48 -05:00
Andrew Tridgell
cc93813e4a r3271: use "struct messaging_context *" instead of "void *" in messaging API 2007-10-10 13:04:48 -05:00
Andrew Tridgell
8ba10229c3 r3270: - added another unlink test
- removed BASE-TRANS2 from the list of tests to be worked on (its
  already in the "passes" list)
2007-10-10 13:04:48 -05:00
Andrew Tridgell
05530bfb99 r3261: added seek to RAW-SEARCH test 2007-10-10 13:04:47 -05:00
Andrew Tridgell
cc58d249f9 r3259: expanded the RAW-SEARCH test some more 2007-10-10 13:04:47 -05:00
Andrew Tridgell
097823bbde r3257: make the RAW-SEARCH test less sensitive to the servers directory ordering 2007-10-10 13:04:47 -05:00
Andrew Tridgell
98f6dbdba4 r3254: - expanded the RAW-IOCTL test
- fixed the old ioctl interface to not check handle before failing

- pvs now passes RAW-IOCTL
2007-10-10 13:04:46 -05:00
Andrew Tridgell
d4042c4364 r3251: - move the openattr test code into basic/attr.c
- cleaned up the RAW-WRITE test so it passes against w2k3, and gives
  more useful error messages
2007-10-10 13:04:46 -05:00
Andrew Tridgell
3d5f7f4ac4 r3245: use __location__ in RAW-SEARCH 2007-10-10 13:04:45 -05:00
Andrew Tridgell
ecd4e315b9 r3242: make the RAW-READ test not exercise the 0-0 lock, which is not deterministic 2007-10-10 13:04:45 -05:00
Andrew Tridgell
5b239ad57b r3236: test a few more combinations in RAW-UNLINK 2007-10-10 13:04:43 -05:00
Andrew Tridgell
e07c557eca r3235: try readx beyond 64k in RAW-READ 2007-10-10 13:04:43 -05:00
Volker Lendecke
478ba62915 r3218: Fix the build 2007-10-10 13:04:42 -05:00
Andrew Tridgell
efaa0eaec4 r3207: - reformat error msgs in BASE-DIR* tests
- added support for mandatory attributes in old style directory search

- we now pass BASE-DIR1 and BASE-DIR2
2007-10-10 13:04:41 -05:00
Andrew Tridgell
3f247ec21c r3206: - added the reverse map for ERRbaduid to NT_STATUS_INVALID_HANDLE
- force disable spnego in the RAW-CONTEXT test (it breaks the test)
2007-10-10 13:04:41 -05:00
Andrew Tridgell
eca85d26ed r3203: moved more test functions into torture/basic/*.c
the idea is that torture/torture.c should eventually be just the
harness code, which will make it easier to read
2007-10-10 13:04:40 -05:00
Andrew Tridgell
17f10a39c8 r3199: added a couple more test paths to RAW-CHKPATH 2007-10-10 13:04:40 -05:00
Andrew Tridgell
41adb385f1 r3198: check for too many .. components in filenames
pvfs now passes RAW-MKDIR
2007-10-10 13:04:40 -05:00
Andrew Tridgell
fb1929743a r3191: use __location__ in RAW-UNLINK test 2007-10-10 13:04:38 -05:00
Andrew Tridgell
3f60775916 r3188: tidy up the rename test a bit more 2007-10-10 13:04:38 -05:00
Andrew Tridgell
c5e72b05d7 r3182: separate out the BASE-RENAME test into torture/basic/rename.c 2007-10-10 13:04:37 -05:00
Andrew Tridgell
0dae9fef09 r3180: - basic support for SEC_RIGHT_MAXIMUM_ALLOWED in pvfs
- RAW-CONTEXT test now passes
2007-10-10 13:04:37 -05:00
Andrew Tridgell
a10fca41de r3173: make the RAW-QFILEINFO test cope better with null strings from the server 2007-10-10 13:04:36 -05:00
Jelmer Vernooij
45a3e2a981 r3168: Use generic function for looking up endpoints 2007-10-10 13:02:29 -05:00
Jelmer Vernooij
18582083af r3167: Add a member 'endpoint' to the dcerpc_binding struct to use instead of
options[0].
2007-10-10 13:02:28 -05:00
Jelmer Vernooij
b15cfbe251 r3162: Add client-side support for the ncalrpc: and ncacn_unix_stream: transports.
ncalrpc uses the new config option "ncalrpc dir" for creating unix sockets.
2007-10-10 13:02:27 -05:00
Jelmer Vernooij
a0c4138edf r3157: Add ncacn_http 2007-10-10 13:02:27 -05:00
Jelmer Vernooij
f41dfc6c5a r3156: Couple of fixes in the conversion functions between binding structs and
protocol towers
2007-10-10 13:02:26 -05:00
Andrew Tridgell
739c9e401c r3155: reformat a delete test 2007-10-10 13:02:26 -05:00
Andrew Tridgell
d7b0dece6f r3152: reformatted some of the delete test code 2007-10-10 13:02:26 -05:00
Andrew Tridgell
022b21460a r3150: printing __location__ is more useful than a operation number 2007-10-10 13:02:26 -05:00
Andrew Tridgell
50379a0a58 r3149: separate the delete on close test into torture/basic/delete.c 2007-10-10 13:02:26 -05:00
Andrew Tridgell
6e87feb89c r3148: make --failures work for the BASE-DENY1 and BASE-DENY2 tests 2007-10-10 13:02:25 -05:00
Jelmer Vernooij
d560dcbdb8 r3136: - Allow specifying socket type when adding smbd service
- Make sure a epm_tower struct is completely initialized
- Some more minor fixes
2007-10-10 13:02:25 -05:00
Andrew Tridgell
f8d12d4b4a r3130: - added a LOCAL-IDTREE test suite
- made idtree return a "struct idr_context *" instead of a void*

- more efficient idr_remove for ids that are not present (patch from Jim Houston)
2007-10-10 13:02:24 -05:00
Jelmer Vernooij
0609f410ef r3125: Store object UUID directly instead of using a pointer (struct dcerpc_binding)
Let test fail if messaging_init() fails instead of generating segfault in the LOCAL-MESSAGING test
2007-10-10 13:02:23 -05:00
Jelmer Vernooij
88c6d34bba r3124: Add dcerpc_binding_from_tower()
Add tests for dcerpc_binding_from_tower()
2007-10-10 13:02:23 -05:00
Jelmer Vernooij
7a07c2c769 r3123: Add dcerpc_binding_build_tower()
Add local test for testing the functions dcerpc_parse_binding(),
	dcerpc_binding_string() and dcerpc_binding_build_tower()
2007-10-10 13:02:23 -05:00
Jelmer Vernooij
7baf493966 r3112: Fix two more instances of epm_towers (sorry, metze!) 2007-10-10 13:02:22 -05:00
Jelmer Vernooij
53567a83cb r3111: Add a few more protocol identifiers, rhs for ncalrpc 2007-10-10 13:02:22 -05:00
Andrew Tridgell
bed7d12f26 r3108: try to cope with servers that put FILE_ATTRIBUTE_NONINDEXED on files in the RAW-OPEN test 2007-10-10 13:02:22 -05:00
Andrew Tridgell
80dd22a1f1 r3105: using __location__ instead of __LINE__ to give info on error locations is more useful 2007-10-10 13:02:21 -05:00
Andrew Bartlett
3f0f6b38f2 r3104: My Win2k3 server, with current updates, still sends the LM key for level 6.
I'm not quite sure what's going on here, but adjust expected values
till I can find out how to reproduce this the other way...

Andrew Bartlett
2007-10-10 13:02:21 -05:00
Andrew Tridgell
6ea815b6d4 r3085: make the RAW-WRITE tests more robust to errors in previous parts of the test 2007-10-10 13:01:57 -05:00
Andrew Bartlett
9c911b361c r3079: make code more pretty :-)
Andrew Bartlett
2007-10-10 13:01:56 -05:00
Andrew Bartlett
3759128bd3 r3074: Add in a new 'field present' flag samr.idl for the Account Flags
field.  Add torture test for setting this feild - including all the
odd cases (not all the flags 'stick', and not others cannot be
removed).

Seperate the two 'password change' flags, and test them both in the
torture code.

Check that the password did change after every password set call.

Andrew Bartlett
2007-10-10 13:01:56 -05:00
Andrew Tridgell
4220914179 r3057: - moved the idtree.c code into lib/
- converted the tid handling to use a idtree instead of bitmaps
2007-10-10 13:01:54 -05:00
Andrew Tridgell
6dea60e3b9 r3053: make the maxfid test use subdirectories, so it doesn't create 64k
files in one directory (running the test was very slow) and can clean
up after itself easily.
2007-10-10 13:01:54 -05:00
Jelmer Vernooij
38e9290bcf r3045: Allow object-uuid@... binding strings 2007-10-10 13:01:53 -05:00
Jim McDonough
b1bbf0a431 r3040: Add sleeps between operations to nbench. Submitted by aliguori@us.ibm.com. 2007-10-10 13:00:01 -05:00
Andrew Tridgell
5ef80f034d r3034: - fixed a bug in message dispatch, when the dispatch function called messaging_deregister()
- added a pvfs_lock_close_pending() hook to remove pending locks on file close

 - fixed the private ptr argument to messaging_deregister() in pvfs_wait

 - fixed a bug in continuing lock requests after a lock that is blocking a pending lock is removed

 - removed bogus brl_unlock() call in lock continue

 - corrected error code for LOCKING_ANDX_CHANGE_LOCKTYPE

 - expanded the lock cancel test suite to test lock cancel by unlock and by close

 - added a testsuite for LOCKING_ANDX_CHANGE_LOCKTYPE
2007-10-10 13:00:00 -05:00
Andrew Tridgell
f732a983d4 r3030: added testing of lock cancel, and some more special offsets (locks
with the top bit set are special)
2007-10-10 13:00:00 -05:00
Andrew Tridgell
4395c0557a r3029: implemented byte range lock timeouts.
This adds a pvfs_wait_message() routine which uses the new messaging
system, event timers and talloc destructors to give a nice generic
async event handling system with a easy to use interface. The
extensions to pvfs_lock.c are based on calls to pvfs_wait_message()
routines.

We now pass all of our smbtorture locking tests, although while
writing this code I have thought of some additonal tests that should
be added, particularly for lock cancel operations. I'll work on that
soon.

This commit also extends the smbtorture lock tests to test the rather
weird 0xEEFFFFFF locking semantics that I have discovered in
win2003. Win2003 treats the 0xEEFFFFFF boundary as special, and will
give different error codes on either side of it. Locks on both sides
are allowed, the only difference is which error code is given when a
lock is denied. Anyone like to hazard a guess as to why? It has
me stumped.
2007-10-10 13:00:00 -05:00
Andrew Tridgell
8cddc610a2 r3026: - added automatic retry to messages when the servers listen queue is
full. This means callers can just "send and forget" rather than
  having to check for a temporary failure. The mechanism takes nice
  advantage of the timed events handling is our events code. A message
  will only fail now if we completely run out of some resource (such
  as memory).

- changed the test code not to do retries itself, but only to warn on real failures
2007-10-10 12:59:59 -05:00
Andrew Tridgell
8380225d32 r3023: added immediate send of messages when they are first queued. This makes things a bit more efficient 2007-10-10 12:59:59 -05:00
Andrew Tridgell
2c568d4dc2 r3021: under heavy load the listen queue for messaging unix domain socket can fill up, leading to refused
connections. The caller needs to retry. This adds testing of the retry in LOCAL-MESSAGING
2007-10-10 12:59:58 -05:00
Andrew Tridgell
68890247c1 r3019: make the LOCAL-MESSAGING test a 2 process test 2007-10-10 12:59:58 -05:00
Andrew Tridgell
3af06478da r3016: - converted the events code to talloc
- added the new messaging system, based on unix domain sockets. It
  gets over 10k messages/second on my laptop without any socket
  cacheing, which is better than I expected.

- added a LOCAL-MESSAGING torture test
2007-10-10 12:59:57 -05:00
Andrew Tridgell
f4a91be635 r3011: separated the locktest code into a separate module in smbtorture 2007-10-10 12:59:57 -05:00
Jeremy Allison
93efa87040 r2997: Added delete on close tests for readonly files.
Jeremy.
2007-10-10 12:59:56 -05:00
Stefan Metzmacher
757f67c08b r2992: drsuapi uses WERROR not NTSTATUS
metze
2007-10-10 12:59:55 -05:00
Stefan Metzmacher
98ca7640c5 r2991: add drsuapi_DsGetDomainControllerInfo() idl and torture test
metze
2007-10-10 12:59:55 -05:00
Andrew Tridgell
b2298a1c5f r2983: report a failure if a server doesn't update the write time at all
after 2 minutes
2007-10-10 12:59:54 -05:00
Andrew Tridgell
efee3c90f9 r2982: added a test that shows the amount of time a server takes to update
the write time on a file after a write.
2007-10-10 12:59:54 -05:00
Stefan Metzmacher
9e50b3214b r2971: fix DsBind idl
metze
2007-10-10 12:59:53 -05:00
Stefan Metzmacher
18050ea603 r2970: - give somefields names and typdef enums for the possible values
- do more crackname tests in the torture test

- move server code for cracknames to a different file

metze
2007-10-10 12:59:53 -05:00
Andrew Tridgell
45508b85da r2969: inet_ntoa() takes an address in network byte order, so now that we
parse the RHS as IDL, we need to use htonl() to convert back to
network byte order before we can display the IP
2007-10-10 12:59:53 -05:00
Stefan Metzmacher
eff51fc623 r2952: add idl and torture test for DsCrackNames
(I need to find out what the fields mean but it works)

metze
2007-10-10 12:59:51 -05:00
Jelmer Vernooij
273d0049b5 r2938: Use IDL to dissect the RHS of floors in protocol towers 2007-10-10 12:59:50 -05:00
Andrew Tridgell
1d21c9a9d1 r2929: longhorn does not produce sorted directory listings! This is
excellent, as it means we don't lose any compatibility by also not
giving sorted listings. I was very much afraid that applications had
begun to rely on this (as its guaranteed by w2k NTFS).

no longer mark a non-sorting server as an error
2007-10-10 12:59:49 -05:00
Jelmer Vernooij
f355cd4264 r2921: Add a few more protocols and fix the numbers associated with some of
the current ones. It took me three hours to realise that the DCOM standard
contains false protocol numbers (apparently someone converted the protocol
numbers to hex twice, i.e. 13 -> 0c and 14 to 0d). There are no longer
duplicates in the list with protocol numbers now.
2007-10-10 12:59:48 -05:00
Volker Lendecke
ab52ebfdcc r2912: Test for the sort-of weird file stamp semantics. The last_write seems to be
updated only by an arbitrary close() after the file was actually written to.

Volker
2007-10-10 12:59:47 -05:00
Andrew Tridgell
aad0e7e9d8 r2910: I noticed that the samr torture test was doing its own DOS->UNIX
string conversion. For RPC, all string conversions are supposed to be
done by the NDR layer, using string flags set in the IDL. The reason
this wasn't working is that I had been too lazy to do the STR_ASCII
string types properly at the NDR layer when initially writing
ndr_basic.c.

This commit fixes the ndr_basic code properly to do all ASCII
varients, by re-using the non-ascii code and a "byte_mul" local
variable. I have also removed the manual string conversion in the SAMR
torture test code.
2007-10-10 12:59:47 -05:00
Andrew Tridgell
75ca5ba509 r2909: fix some RAW-SEARCH torture mem leaks 2007-10-10 12:59:47 -05:00
Jelmer Vernooij
e9a7f729b3 r2896: Add torture test for EnumValue() 2007-10-10 12:59:45 -05:00
Volker Lendecke
8e26775134 r2895: Another nut to crack, not sure how hard: The statinfo on a file does obviously
not change during a write. The nasty thing: Excel 2003 obviosly does depend on
this.

Volker
2007-10-10 12:59:45 -05:00
Stefan Metzmacher
de73676342 r2888: - add 'Ds' prefix to Bind and Unbind call on drsuapi
- rename handle -> bind_handle

- change function types to NTSTATUS

metze
2007-10-10 12:59:42 -05:00
Andrew Tridgell
814881f0e5 r2857: this commit gets rid of smb_ucs2_t, wpstring and fpstring, plus lots 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;
}
2007-10-10 12:59:39 -05:00
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
Stefan Metzmacher
1dabd04e26 r2853: add torture test to find the defaultNamingContext on the RootDSE
try a sasl sealed CompareRequest

abartlet: we need to check how SINGING only can work,
          it failed for me:-(

metze
2007-10-10 12:59:38 -05:00
Andrew Tridgell
db1ed5675a r2833: - added a call to SamrQueryGroupMember for every group, and fix the
IDL so this works (the previous IDL was bogus)

- changed a hyper to uint64 after looking at output on cascade on sparc
2007-10-10 12:59:37 -05:00
Andrew Tridgell
5045482b14 r2799: removed one last occurance of torture_ldb_alloc() 2007-10-10 12:59:35 -05:00
Andrew Tridgell
6c563887f1 r2791: got rid of talloc_unreference() and instead created talloc_unlink(),
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.
2007-10-10 12:59:34 -05:00
Andrew Tridgell
ad5a5ea08d r2787: force masktest to use RAW_SEARCH_BOTH_DIRECTORY_INFO so it can obtain the short name 2007-10-10 12:59:33 -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
Andrew Tridgell
630fefb24a r2774: get rid of the lanman specific code in masktest, and add a -l option 2007-10-10 12:59:31 -05:00
Andrew Tridgell
8d4dc99b82 r2744: ben elliston taught me about gcov today, which allows you to measure
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
2007-10-10 12:59:29 -05:00
Andrew Tridgell
18d3e2647f r2742: - fixed a bug in talloc_unreference()
- made the LOCAL-TALLOC smbtorture test much stricter, checking that
  block counts for every pointer are correct after every operation
2007-10-10 12:59:29 -05:00
Andrew Tridgell
f4a7a3282a r2738: free up the session information as soon as it is invalidated in the
RAW-CONTEXT test case
2007-10-10 12:59:28 -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
a87584c8e3 r2718: - added a talloc_unreference() function as requested by metze.
- added documentation for talloc_unreference()

- made the abandoned child logic in talloc_free() clearer and more consistent
2007-10-10 12:59:26 -05:00
Andrew Tridgell
91669ea830 r2711: added a simple talloc speed tester. I get the following on my laptop:
MEASURING TALLOC VS MALLOC SPEED
  talloc: 279154 ops/sec
  malloc: 318758 ops/sec

which I think is an acceptable overhead for the increased functionality
2007-10-10 12:59:25 -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
Jelmer Vernooij
9e74144aa8 r2699: Correct handle ServerAlive() and ServerAlive2() + add torture tests 2007-10-10 12:59:24 -05:00
Andrew Tridgell
c82a9cf750 r2680: switched the libcli/raw/ code over to use talloc_reference(), which simplifies things quite a bit 2007-10-10 12:59:21 -05:00
Andrew Tridgell
f31e5d56e3 r2676: add a test of the reference counting logic in the SAMR server into the
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.
2007-10-10 12:59:20 -05:00
Andrew Tridgell
8dc23821c9 r2671: we're getting too many errors caused by the talloc_realloc() API not
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.
2007-10-10 12:59:20 -05:00
Andrew Tridgell
c315d6ac1c r2660: - converted the libcli/raw/ library to use talloc_increase_ref_count()
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
2007-10-10 12:59:18 -05:00
Andrew Tridgell
770aa7e01e r2659: removed some extraneous debug msgs 2007-10-10 12:59:17 -05:00
Andrew Tridgell
6e721393d0 r2649: - used some cpp tricks to make users of talloc() and talloc_realloc()
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
2007-10-10 12:59:16 -05:00
Andrew Tridgell
b378aae95d r2645: converted the NTLMSSP code to the new style of talloc 2007-10-10 12:59:16 -05:00
Andrew Tridgell
26da45a801 r2628: got rid of some warnings and converted a few more places to use hierarchical memory allocation 2007-10-10 12:59:14 -05:00
Andrew Tridgell
640ced4530 r2593: don't crash if the server doesn't know that 0 count searches mean 1 2007-10-10 12:59:11 -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 Bartlett
dfecb01506 r2552: Character set conversion and string handling updates.
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).
2007-10-10 12:59:05 -05:00
Andrew Bartlett
066789a479 r2551: Add const.
Andrew Bartlett
2007-10-10 12:59:05 -05:00
Andrew Bartlett
4904d814c0 r2547: Another place to use convert_string_talloc().
Andrew Bartlett
2007-10-10 12:59:05 -05:00
Andrew Bartlett
79776006b3 r2536: This is a classic case for the use of our new talloc code, and
convert_string_talloc().

Andrew Bartlett
2007-10-10 12:59:03 -05:00
Jelmer Vernooij
c98fbfe250 r2532: Don't run EnumValue torture test for now (idl needs fixing, doesn't compile) 2007-10-10 12:59:02 -05:00
Andrew Tridgell
4e4859c06b r2520: - finished implementing the server side of the old style search requests 2007-10-10 12:59:01 -05:00
Tim Potter
90a9e754db r2501: The AddMemberToAlias test doesn't need a domain_handle. 2007-10-10 12:58:59 -05:00
Andrew Tridgell
050dcd9b95 r2500: disable the sleep test in echo until we have a win32 echo server that
does Microsoft style async rpc serving
2007-10-10 12:58:59 -05:00
Tim Potter
a0e571a9dd r2489: Rename account_flags in EnumDomainAliases() to acct_flags. 2007-10-10 12:58:57 -05:00
Andrew Tridgell
71480271ad r2469: complete overhaul of the old-style RAW_SEARCH_ calls (the OS/2 and
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
2007-10-10 12:58:56 -05:00
Stefan Metzmacher
a0c2a3a5d4 r2468: print out the names of the fault codes#
metze
2007-10-10 12:58:56 -05:00
Andrew Tridgell
59b3d68bd0 r2465: modify the autoidl hack to work for DRSUAPI 2007-10-10 12:58:56 -05:00
Andrew Tridgell
7bfbbc38ed r2462: added a test for the error code for no matching filename 2007-10-10 12:58:55 -05:00
Tim Potter
32f0f3154a r2458: Rename policy handle parameters for the SAMR pipe. Parameters now
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.
2007-10-10 12:58:55 -05:00
Andrew Tridgell
e23514c78f r2457: expanded the RAW-SEARCH test to test for what happens when a directory
is modified while being searched, and whether the server always
returns sorted directory listings.
2007-10-10 12:58:55 -05:00
Stefan Metzmacher
9c0e50a6f3 r2443: check return code of event_loop_once() to catch thet cases where the server
closes the connetion and we got EBADF from select() and event_loop_once() fails

metze
2007-10-10 12:58:54 -05:00
Stefan Metzmacher
3cd63030b1 r2442: remove unused event_loop_once() call
metze
2007-10-10 12:58:53 -05:00
Stefan Metzmacher
47e613a5a1 r2387: fix segfault
seems that [in,out,ref] vars should be initialize
the [in] and [out] part

metze
2007-10-10 12:58:47 -05:00
Andrew Tridgell
7d3e347422 r2382: considerably improved the Bind and Unbind IDL and test code. We can
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.
2007-10-10 12:58:46 -05:00
Andrew Bartlett
a1fe175eec r2284: Thanks to some great detective work by tridge, NTLM2 signing now works.
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
2007-10-10 12:58:39 -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
bdb49f01b7 r2273: disable the async samr tests unless -X option is used, as windows
fails this and it kills the pipe, so we can't run the rest of the test
2007-10-10 12:58:36 -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
9cc33d9364 r2267: we no longer need to force the domain join to happen on NCACN_NP - it
now works on NCACN_IP_TCP as well.
2007-10-10 12:58:36 -05:00
Andrew Tridgell
f6ea24296a r2266: yay! LSA session keys on TCP now work! 2007-10-10 12:58:35 -05:00
Andrew Bartlett
f7f7c3de23 r2220: Updates to the NETLOGON torture test. This copes with 'long'
passwords - where the LM hash is invalid.

Also, we now drive all the logon levels and validation levels from the
outer loop, so we can check the expected return values (rather than
overwriting them).

Andrew Bartlett
2007-10-10 12:58:32 -05:00
Jeremy Allison
d2d32d8f2b r2217: Ad-hoc tests to allow me to work out the correct error code
for the bad path algorithm.
Jeremy.
2007-10-10 12:58:32 -05:00
Andrew Tridgell
e909bfa708 r2209: patch from volker to add EnumPorts spoolss IDL and test code
the ndr->offset=0; stuff is ugly. We need a better way to handle this.
2007-10-10 12:58:31 -05:00
Andrew Tridgell
60a88595e2 r2207: this bug caued valgrind to consume infinite memory till the kernel killed it :( 2007-10-10 12:58:31 -05:00
Andrew Tridgell
d98ed1fbe5 r2203: delete the key after testing, so as not to clutter the server with random keys 2007-10-10 12:58:31 -05:00
Andrew Tridgell
591ee2308c r2202: don't close the smb pipe after the puzzle test 2007-10-10 12:58:31 -05:00
Andrew Tridgell
e1d13631f0 r2201: removed an exit I accidentially left in 2007-10-10 12:58:30 -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
e99d88915f r2199: the unknown 16 bit number in lsa_LookupPrivDisplayName() is a language
ID, so the client can choose what language they get the privilege
description in.

this is the first time I've seen a language ID on the wire in CIFS.
2007-10-10 12:58:30 -05:00
Andrew Tridgell
2d8f400592 r2186: setting [ref] output pointers in dcerpc calls is pointless. Removed it
for test_LookupPrivDisplayName
2007-10-10 12:58:30 -05:00
Andrew Tridgell
f2a0438c66 r2185: add a callback function to the dcerpc async API
also add a demonstration of its use in the netlogon async example
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
4c370c3c91 r2181: an rpc async test on the netlogon pipe 2007-10-10 12:58:29 -05:00
Andrew Tridgell
25f85efd75 r2179: two more lsa torture tests from Richard Renard. Thanks! 2007-10-10 12:58:29 -05:00
Andrew Tridgell
5cf9333f60 r2170: if we don't have a native iconv library then we can't build this test 2007-10-10 12:58:28 -05:00
Andrew Tridgell
e754d0cbca r2165: generalise the charset torture test to add testing of CP850
potentially we can test any charset
2007-10-10 12:58:28 -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
Jeremy Allison
fe6506e190 r2151: Added some more ad-hoc tests. Found bugs in Samba3 with these :-).
Jeremy.
2007-10-10 12:58:27 -05:00
Andrew Tridgell
306eb84865 r2107: added a SAMR async test - this one seems to work 2007-10-10 12:58:25 -05:00
Andrew Tridgell
a5eb6cad50 r2105: added a TestSleep() operation to the echo pipe and extended the
RPC-ECHO test to use it to test asynchronous rpc operations.
2007-10-10 12:58:25 -05:00
Andrew Tridgell
f5d004d8eb r2100: rework the dcerpc client side library so that it is async. We now
generate a separate *_send() async function for every RPC call, and
there is a single dcerpc_ndr_request_recv() call that processes the
receive side of any rpc call. The caller can use
dcerpc_event_context() to get a pointer to the event context for the
pipe so that events can be waited for asynchronously.

The only part that remains synchronous is the initial bind
calls. These could also be made async if necessary, although I suspect
most applications won't need them to be.
2007-10-10 12:58:24 -05:00
Andrew Bartlett
16ef31a79e r2098: The first 8 bytes of this sig is not used in the 'is it correct' calculation.
Andrew Bartlett
2007-10-10 12:58:24 -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
183622c9f4 r2062: Fix a couple more of the printf warnings (real bugs).
You should never pass a non-constant string as a format for a printf()
function - it could contain printf macros, and these need to be
checked.

Andrew Bartlett
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 Bartlett
4e2c5a5fb3 r2035: Fix spelling.
Andrew Bartlett
2007-10-10 12:58:19 -05:00
Andrew Tridgell
eddb31d196 r2031: add a check for a blank secret return in lsa secret tests 2007-10-10 12:58:18 -05:00
Stefan Metzmacher
eb9de893b8 r1997: fix compiler warning
metze
2007-10-10 12:58:16 -05:00
Stefan Metzmacher
dd8d68f3ec r1996: fix compiler warnings
metze
2007-10-10 12:58:16 -05:00
Stefan Metzmacher
80f27766cb r1995: a ndrdump file from abartlet make it clear that this isn't a pointer
to a uint32, there're two uint32 with 0x00000000

metze
2007-10-10 12:58:16 -05:00
Andrew Bartlett
a8e76085a7 r1992: Make the NTLMSSP torture test show more detail, and return failure etc.
Andrew Bartlett
2007-10-10 12:58:15 -05:00
Andrew Tridgell
6ffdfd7799 r1985: take advantage of the new talloc in a few more places 2007-10-10 12:58:14 -05:00
Andrew Tridgell
e35bb094c5 r1983: a completely new implementation of talloc
This version does the following:

  1) talloc_free(), talloc_realloc() and talloc_steal() lose their
     (redundent) first arguments

  2) you can use _any_ talloc pointer as a talloc context to allocate
     more memory. This allows you to create complex data structures
     where the top level structure is the logical parent of the next
     level down, and those are the parents of the level below
     that. Then destroy either the lot with a single talloc_free() or
     destroy any sub-part with a talloc_free() of that part

  3) you can name any pointer. Use talloc_named() which is just like
     talloc() but takes the printf style name argument as well as the
     parent context and the size.

The whole thing ends up being a very simple piece of code, although
some of the pointer walking gets hairy.

So far, I'm just using the new talloc() like the old one. The next
step is to actually take advantage of the new interface
properly. Expect some new commits soon that simplify some common
coding styles in samba4 by using the new talloc().
2007-10-10 12:58:14 -05:00
Stefan Metzmacher
d965f84f69 r1961: print out the dcerpc fault code, when we got NT_STATUS_NET_WRITE_FAULT
(this need to be done more generic for all dcerpc calls,
 but for now I just need it in this 2 places)

metze
2007-10-10 12:58:13 -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