1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-28 07:21:54 +03:00
Commit Graph

271 Commits

Author SHA1 Message Date
Andrew Bartlett
645711c602 r5941: Commit this patch much earlier than I would normally prefer, but metze needs a working tree...
The main volume of this patch was what I started working on today:
 - Cleans up memory handling around DCE/RPC pipes, to have a parent talloc context.
 - Uses sepereate inner loops for some of the DCE/RPC tests

The other and more important part of this patch fixes issues
surrounding the new credentials framwork:

This makes the struct cli_credentials always a talloc() structure,
rather than on the stack.  Parts of the cli_credentials code already
assumed this.

There were other issues, particularly in the DCERPC over SMB handling,
as well as little things that had to be tidied up before test_w2k3.sh
would start to pass.

Andrew Bartlett
(This used to be commit 0453f9d05d)
2007-10-10 13:11:11 -05:00
Jelmer Vernooij
13b0776f60 r5929: Use cli_credentials for the SMB functions as well.
Fix a couple of bugs in the new cli_credentials code
(This used to be commit 4ad481cfe5)
2007-10-10 13:11:09 -05:00
Jelmer Vernooij
05bc2d7b2c r5928: Use cli_credentials in:
- gtk+ (returned by GtkHostBindingDialog as well now)
 - torture/
 - librpc/
 - lib/com/dcom/
(This used to be commit ccefd78233)
2007-10-10 13:11:08 -05:00
Jelmer Vernooij
02075be0bb r5917: First step in using the new cli_credentials structure. This patch
puts support for it into popt_common, adds a few utility functions
(in lib/credentials.c) and the callback functions for the command-line
(lib/cmdline/credentials.c). Comments are welcome :-)
(This used to be commit 1d49b57c50)
2007-10-10 13:11:08 -05:00
Andrew Bartlett
df64302213 r5902: A rather large change...
I wanted to add a simple 'workstation' argument to the DCERPC
authenticated binding calls, but this patch kind of grew from there.

With SCHANNEL, the 'workstation' name (the netbios name of the client)
matters, as this is what ties the session between the NETLOGON ops and
the SCHANNEL bind.  This changes a lot of files, and these will again
be changed when jelmer does the credentials work.

I also correct some schannel IDL to distinguish between workstation
names and account names.  The distinction matters for domain trust
accounts.

Issues in handling this (issues with lifetime of talloc pointers)
caused me to change the 'creds_CredentialsState' and 'struct
dcerpc_binding' pointers to always be talloc()ed pointers.

In the schannel DB, we now store both the domain and computername, and
query on both.  This should ensure we fault correctly when the domain
is specified incorrectly in the SCHANNEL bind.

In the RPC-SCHANNEL test, I finally fixed a bug that vl pointed out,
where the comment claimed we re-used a connection, but in fact we made
a new connection.

This was achived by breaking apart some of the
dcerpc_secondary_connection() logic.

The addition of workstation handling was also propogated to NTLMSSP
and GENSEC, for completeness.

The RPC-SAMSYNC test has been cleaned up a little, using a loop over
usernames/passwords rather than manually expanded tests.  This will be
expanded further (the code in #if 0 in this patch) to use a newly
created user account for testing.

In making this test pass test_rpc.sh, I found a bug in the RPC-ECHO
server, caused by the removal of [ref] and the assoicated pointer from
the IDL.  This has been re-added, until the underlying pidl issues are
solved.
(This used to be commit 824289dcc2)
2007-10-10 13:11:07 -05:00
Jelmer Vernooij
ef213b0248 r5866: Add InitShutdown IDL and torture test.
Implement push side of NDR_LEN4|NDR_NOTERM strings (pull side was already present)
(This used to be commit ea61ec1122)
2007-10-10 13:11:05 -05:00
Rafal Szczesniak
b55b885f1b r5651: A bit more code in userinfo test and hook up test function to
main torture binary.

rafal
(This used to be commit 94955e5325)
2007-10-10 13:10:56 -05:00
Jelmer Vernooij
80d3047333 r5490: The big (D)COM commit! :-) Contains most of the changes described in the
DCOM paper in lorikeet. This is the result of 1.5 months work (mainly
figuring out how things *really* work) at the end of 2004.

In general:
- Clearer distinction between COM and DCOM. DCOM is now merely
  the glue between DCE/RPC+ORPC and COM. COM can also work without
  DCOM now. This makes the code a lot clearer.
- Clearer distinction between NDR and DCOM. Before, NDR had a couple of
  "if"s to cope with DCOM, which are now gone.
- Use "real" arguments rather then structures for function arguments in
  COM, mainly because most of these calls are local so packing/unpacking
  data for every call is too much overhead (both speed- and code-wise)
- Support several mechanisms to load class objects:
  - from memory (e.g. part of the current executable, registered at start-up)
  - from shared object files
  - remotely
- Most things are now also named COM rather then DCOM because that's what it
  really is. After an object is created, it no longer matters whether it
  was created locally or remotely.

There is a very simple example class that contains
both a class factory and a class that implements the IStream interface.
It can be tested (locally only, remotely is broken at the moment)
by running the COM-SIMPLE smbtorture test.

Still to-do:
 - Autogenerate parts of the class implementation code (using the coclass definitions in IDL)
 - Test server-side
 - Implement some of the common classes, add definitions for common interfaces.
(This used to be commit 71fd3e5c3a)
2007-10-10 13:10:50 -05:00
Jelmer Vernooij
a62ade362f r5487: - Allow disabling modules
- Disable all current DCOM functionality (I hope to commit
	a large bunch of COM and DCOM changes later today)
- Make remact and oxidresolver depend on orpc rather then dcom
(This used to be commit f298f2a547)
2007-10-10 13:10:50 -05:00
Andrew Tridgell
14bd4b8184 r5415: added a NBT-WINSREPLICATION torture test. It asks the server for the
list of partners, and for each partner dumps the complete list of
names
(This used to be commit dacf5f166a)
2007-10-10 13:10:44 -05:00
Andrew Tridgell
82e6a6e46b r5403: a simple WINS benchmarking program
(This used to be commit d0f8b5bc6d)
2007-10-10 13:10:42 -05:00
Andrew Tridgell
75ddf59ea1 r5308: trimmed back a lot of the old macros from smb_macros.h
(This used to be commit bf43c9bdcf)
2007-10-10 13:09:40 -05:00
Andrew Tridgell
e82aad1ce3 r5298: - got rid of pstring.h from includes.h. This at least makes it a bit
less likely that anyone will use pstring for new code

 - got rid of winbind_client.h from includes.h. This one triggered a
   huge change, as winbind_client.h was including system/filesys.h and
   defining the old uint32 and uint16 types, as well as its own
   pstring and fstring.
(This used to be commit 9db6c79e90)
2007-10-10 13:09:38 -05:00
Andrew Tridgell
b9bb7f596d r5294: - added a separate NBT-WINS test for WINS operations (register, refresh, release and query)
- change the iface_n_*() functions to return a "const char *" instead of a "struct ipv4_addr"
  I think that in general we should move towards "const char *" for
  all IP addresses, as this makes IPv6 much easier, and is also easier
  to debug. Andrew, when you get a chance, could you fix some of the
  auth code to use strings for IPs ?

- return a NTSTATUS error on bad name queries and node status instead
  of using rcode. This makes the calling code simpler.

- added low level name release code in libcli/nbt/

- use a real IP in the register and wins nbt torture tests, as w2k3
  WINS server silently rejects some operations that don't come from the
  IP being used (eg. it says "yes" to a release, but does not in fact
  release the name)
(This used to be commit bb1ab11d8e)
2007-10-10 13:09:37 -05:00
Andrew Tridgell
831e06810a r5156: started on test driven development of the nbt server. This adds a
NBT-REGISTER test that tests that a server correctly defends its name
against broadcast name registrations.

Jeremy, you might like to look at this. Samba3 nmbd fails to respond.
(This used to be commit bb1298a2eb)
2007-10-10 13:09:28 -05:00
Andrew Tridgell
75049fb66f r5130: added a single NBT name query benchmark. It keeps 10 queries in flight at a time.
(This used to be commit 2d23c665ff)
2007-10-10 13:09:25 -05:00
Andrew Tridgell
759da3b915 r5037: got rid of all of the TALLOC_DEPRECATED stuff. My apologies for the
large commit. I thought this was worthwhile to get done for
consistency.
(This used to be commit ec32b22ed5)
2007-10-10 13:09:15 -05:00
Tim Potter
8bf94dc7f7 r4973: Add a RAP scanner to smbtorture. win2k has call numbers 0-215 although
the cifs tr lists 250-318 also.
(This used to be commit 37b4d1a676)
2007-10-10 13:09:10 -05:00
Andrew Tridgell
913006fa2e r4899: fixed build
(This used to be commit 852f1e73b4)
2007-10-10 13:09:04 -05:00
Andrew Tridgell
2383787f19 r4891: - added a generic resolve_name() async interface in libcli/resolve/,
which will eventually try all resolution methods setup in smb.conf

 - only resolution backend at the moment is bcast, which does a
   parallel broadcast to all configured network interfaces, and takes
   the first reply that comes in (this nicely demonstrates how to do
   parallel requests using the async APIs)

 - converted all the existing code to use the new resolve_name() api

 - removed all the old nmb code (yay!)
(This used to be commit 239c310f25)
2007-10-10 13:09:03 -05:00
Andrew Tridgell
8783aa8ea5 r4831: added udp support to our generic sockets library.
I decided to incorporate the udp support into the socket_ipv4.c
backend (and later in socket_ipv6.c) rather than doing a separate
backend, as so much of the code is shareable. Basically this adds a
socket_sendto() and a socket_recvfrom() call and not much all.

For udp servers, I decided to keep the call as socket_listen(), even
though dgram servers don't actually call listen(). This keeps the API
consistent.

I also added a simple local sockets testsuite in smbtorture,
LOCAL-SOCKET
(This used to be commit 9f12a45a05)
2007-10-10 13:08:59 -05:00
Andrew Tridgell
61a3d370b9 r4758: - added async support to the session request code
- added async support to the negprot client code

- removed two unused parameters from smbcli_full_connection() code

- converted smbclient to use smbcli_full_connection() rather than
  reinventing everything itself
(This used to be commit 71cbe28734)
2007-10-10 13:08:50 -05:00
Andrew Tridgell
e89fd49df7 r4757: added the ability of the clisocket level of libcli to handle async
socket connections. This was complicated by a few factors:

 - it meant moving the event context from clitransport to clisocket,
   so lots of structures changed

 - we need to asynchronously handle connection to lists of port
   numbers, not just one port number. The code internally tries each
   port in the list in turn, without ever blocking

 - the man page on how connect() is supposed to work asynchronously
   doesn't work in practice (now why doesn't this surprise me?). The
   getsockopt() for SOL_ERROR is supposed to retrieve the error, but
   in fact the next (unrelated) connect() call on the same socket also
   gets an error, though not the right error. To work around this I
   need to tear down the whole socket between each attempted port. I
   hate posix.

Note that clisocket.c still does a blocking name resolution call in
smbcli_sock_connect_byname(). That will be fixed when we add the async
NBT resolution code.

Also note that I arranged things so that every SMB connection is now
async internally, so using plain smbclient or smbtorture tests all the
async features of this new code.
(This used to be commit 468f8ebbfd)
2007-10-10 13:08:50 -05:00
Andrew Tridgell
1d795fa57b r4700: first attempt at a composite async function, smb_composite_loadfile(),
which combineds ntcreatex, readx and close into a single call that
behaves just like a normal libcli async call.
(This used to be commit 516f68fb05)
2007-10-10 13:08:45 -05:00
Andrew Tridgell
ab9ca55926 r4617: basic alter_context requests now work in our client library. The test
just does a simple LSA/DSSETUP combo, which is what w2k does in the
ACL editor rpc calls that triggered this work
(This used to be commit 0129ec947a)
2007-10-10 13:08:34 -05:00
Andrew Tridgell
500d5523d2 r4475: fixed smbd to work with the small changes in the ldb API (the most important
change was in the ldb_msg_add_*() routines, which now use the msg as a context,
and thus it needs to be a talloc ptr)
(This used to be commit 1a4713bfd0)
2007-10-10 13:07:55 -05:00
Andrew Tridgell
dda32aa5ba r4451: added initial RPC-DSSETUP torture test. It works for level1 of
ds_RolerGetPrimaryDomainInformation()
(This used to be commit 7aec3dac6f)
2007-10-10 13:07:52 -05:00
Stefan Metzmacher
00c7f9eed8 r4422: make lp_set_cmdline("torture:dangerous", "Yes") a bool parameter
metze
(This used to be commit 19482a2245)
2007-10-10 13:07:47 -05:00
Stefan Metzmacher
6acf7a782c r4169: add descriptions about binding and unc strings to the
smbtorture --usage --help output

metze
(This used to be commit 26a7f4cf5e)
2007-10-10 13:07:22 -05:00
Stefan Metzmacher
9112a632f6 r4063: - change char * -> uint8_t in struct request_buffer
- change smbcli_read/write to take void * for the buffers to match read(2)/write(2)

all this fixes a lot of gcc-4 warnings

metze
(This used to be commit b94f92bc66)
2007-10-10 13:06:21 -05:00
Andrew Tridgell
58c326809a r4052: fixed a bunch of code to use the type safe _p allocation macros
(This used to be commit 80d15fa340)
2007-10-10 13:06:18 -05:00
Andrew Tridgell
cc8f4358cc r4035: more effort on consistent naming of the access mask bits.
This removes the duplicate named SEC_RIGHTS_MAXIMUM_ALLOWED and
SEC_RIGHTS_FULL_CONTROL, which are just other names for
SEC_FLAG_MAXIMUM_ALLOWED and SEC_RIGHTS_FILE_ALL. The latter names
match the new naming conventions in security.idl

Also added names for the generic->specific mappings for files are
directories
(This used to be commit 17a4e0b3ac)
2007-10-10 13:06:16 -05:00
Andrew Tridgell
607e302238 r4013: got rid of a bunch of unused or unmaintained code
- removed the clitar code. It is unmaintained, and a horribly badly done hack

 - removed client.h as it contained mostly unused definitions

 - removed the unused clidfs.c code
(This used to be commit 31a7bddbb3)
2007-10-10 13:06:15 -05:00
Andrew Tridgell
fdc9f417d8 r4011: get rid of rpc_secdes.h and replace it with a single sane set of
definitions for security access masks, in security.idl

The previous definitions were inconsistently named, and contained many
duplicate and misleading entries. I kept finding myself tripping up
while using them.
(This used to be commit 01c0fa722f)
2007-10-10 13:06:13 -05:00
Andrew Tridgell
9e5bee246f r3945: expanded the BASE-PROPERTIES test to print a nicely formatted list of
the capabilities and filesystem attribute bits of the server.
(This used to be commit 9debe29381)
2007-10-10 13:06:07 -05:00
Jelmer Vernooij
cc368fa69e r3898: Work towards local/server DCOM support, start working
on Simple example server side implementation
(This used to be commit 98afb504d9)
2007-10-10 13:06:02 -05:00
Jelmer Vernooij
d53fd3d8d5 r3891: Add rot (Running Object Table) interface
(This used to be commit 4840eaeed3)
2007-10-10 13:06:02 -05:00
Andrew Tridgell
bbf009b46f r3829: added a RAW-ACLS test suite that tests query/set of ACLs on a file
(This used to be commit 2ff9816ae0)
2007-10-10 13:05:57 -05:00
Andrew Tridgell
4719461a07 r3746: added RAW-STREAMS and RAW-EAS tests to smbtorture
(This used to be commit 5ed3d68d20)
2007-10-10 13:05:50 -05:00
Andrew Tridgell
0e255bb542 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.
(This used to be commit f7fb34715b)
2007-10-10 13:05:45 -05:00
Andrew Bartlett
fd5135a63b 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
(This used to be commit 6e6cc6fb98)
2007-10-10 13:05:43 -05:00
Andrew Bartlett
a8db4dcf03 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
(This used to be commit 3a140a3691)
2007-10-10 13:05:43 -05:00
Volker Lendecke
f847f3a3e1 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
(This used to be commit 02f5205872)
2007-10-10 13:05:42 -05:00
Andrew Tridgell
4815480bb6 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
(This used to be commit 5205f598b8)
2007-10-10 13:05:41 -05:00
Andrew Tridgell
d8565f89b7 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.
(This used to be commit eeec57d4f6)
2007-10-10 13:05:38 -05:00
Jelmer Vernooij
71db46ea66 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
(This used to be commit 7a8244761b)
2007-10-10 13:05:36 -05:00
Andrew Tridgell
a9158e0d47 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)
(This used to be commit 09b4652b40)
2007-10-10 13:05:33 -05:00
Jelmer Vernooij
6d3c74a67b 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
(This used to be commit c052f2e1ed)
2007-10-10 13:05:23 -05:00
Andrew Tridgell
dde0705807 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.
(This used to be commit 0d51511d40)
2007-10-10 13:05:23 -05:00
Andrew Tridgell
6f214cc510 r3494: got rid of include/rewrite.h, and split out the dynconfig.h header
(This used to be commit 558de54ec6)
2007-10-10 13:05:22 -05:00
Andrew Tridgell
a99b6219a8 r3481: split out client.h and events.h
(This used to be commit c6f4865744)
2007-10-10 13:05:20 -05:00
Andrew Tridgell
3643fb1109 r3463: separated out some more headers (asn_1.h, messages.h, dlinklist.h and ioctl.h)
(This used to be commit b97e395c81)
2007-10-10 13:05:17 -05:00
Andrew Tridgell
2df2d1b67f r3461: another place where "open" was used as a structure element
(This used to be commit 1087ea830e)
2007-10-10 13:05:16 -05:00
Andrew Tridgell
edbfc0f6e7 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
(This used to be commit 7b7477ac42)
2007-10-10 13:05:13 -05:00
Andrew Tridgell
ead3508ac8 r3447: more include/system/XXX.h include files
(This used to be commit 264ce91810)
2007-10-10 13:05:12 -05:00
Andrew Tridgell
f20f1f994a 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
(This used to be commit 8ebd20cf55)
2007-10-10 13:05:12 -05:00
Andrew Tridgell
9f1210a243 r3419: moved the libcli/raw structures into libcli/raw/libcliraw.h
and made them private
(This used to be commit 386ac565c4)
2007-10-10 13:05:07 -05:00
Jelmer Vernooij
ad4c40b927 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...
(This used to be commit cabec03422)
2007-10-10 13:05:07 -05:00
Andrew Bartlett
cf97155ab4 r3394: Give the user a clue why we are blasting them with the usage brick.
Andrew Bartlett
(This used to be commit d967569c56)
2007-10-10 13:05:05 -05:00
Andrew Tridgell
cb1cff90f1 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)
(This used to be commit b95493d3d1)
2007-10-10 13:05:03 -05:00
Andrew Tridgell
ba6d5fcb97 r3324: made the smbtorture code completely warning free
(This used to be commit 7067bb9b52)
2007-10-10 13:04:55 -05:00
Andrew Tridgell
a6ae640313 r3323: more warning reductions
(This used to be commit 5921587ec2)
2007-10-10 13:04:55 -05:00
Andrew Tridgell
d16b621ca9 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
(This used to be commit d4042c4364)
2007-10-10 13:04:46 -05:00
Andrew Tridgell
d200f9385f 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
(This used to be commit eca85d26ed)
2007-10-10 13:04:40 -05:00
Andrew Tridgell
35a11f0e61 r3182: separate out the BASE-RENAME test into torture/basic/rename.c
(This used to be commit c5e72b05d7)
2007-10-10 13:04:37 -05:00
Jelmer Vernooij
f1dd80e74e r3156: Couple of fixes in the conversion functions between binding structs and
protocol towers
(This used to be commit f41dfc6c5a)
2007-10-10 13:02:26 -05:00
Andrew Tridgell
86457e659c r3149: separate the delete on close test into torture/basic/delete.c
(This used to be commit 50379a0a58)
2007-10-10 13:02:26 -05:00
Andrew Tridgell
517238f0aa 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)
(This used to be commit f8d12d4b4a)
2007-10-10 13:02:24 -05:00
Jelmer Vernooij
a8d4d3c9f6 r3123: Add dcerpc_binding_build_tower()
Add local test for testing the functions dcerpc_parse_binding(),
	dcerpc_binding_string() and dcerpc_binding_build_tower()
(This used to be commit 7a07c2c769)
2007-10-10 13:02:23 -05:00
Andrew Tridgell
c5465ae50f 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.
(This used to be commit 6dea60e3b9)
2007-10-10 13:01:54 -05:00
Jelmer Vernooij
80a30263aa r3045: Allow object-uuid@... binding strings
(This used to be commit 38e9290bcf)
2007-10-10 13:01:53 -05:00
Andrew Tridgell
6591a22614 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
(This used to be commit 3af06478da)
2007-10-10 12:59:57 -05:00
Andrew Tridgell
f6da6a10de r3011: separated the locktest code into a separate module in smbtorture
(This used to be commit f4a91be635)
2007-10-10 12:59:57 -05:00
Jeremy Allison
04767ce906 r2997: Added delete on close tests for readonly files.
Jeremy.
(This used to be commit 93efa87040)
2007-10-10 12:59:56 -05:00
Andrew Tridgell
03341ec5bb r2854: added a RPC-COUNTCALLS torture test - a useful varient on the full scanner in RPC-SCANNER
(This used to be commit 04eaae59cd)
2007-10-10 12:59:39 -05:00
Andrew Tridgell
c62a988c39 r2785: call init_iconv() in smbtorture to ensure we have no memory allocated
when a test started, thus making leak detection easier
(This used to be commit 6c46e4622a)
2007-10-10 12:59:33 -05:00
Jelmer Vernooij
b79602fab5 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
(This used to be commit 1bb4718328)
2007-10-10 12:59:27 -05:00
Andrew Tridgell
b2f1a29e43 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.
(This used to be commit e14ee428ec)
2007-10-10 12:59:25 -05:00
Andrew Tridgell
a675b09e8d 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.
(This used to be commit 911a8d590c)
2007-10-10 12:59:24 -05:00
Andrew Tridgell
ad053090b8 r2659: removed some extraneous debug msgs
(This used to be commit 770aa7e01e)
2007-10-10 12:59:17 -05:00
Andrew Tridgell
8e5acb6df0 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.
(This used to be commit 7b23624a0f)
2007-10-10 12:59:09 -05:00
Andrew Tridgell
68fbed64d5 r2274: fixed some popt option clashes between smbtorture and the standard options
(This used to be commit b7db909e8e)
2007-10-10 12:58:37 -05:00
Andrew Tridgell
1c3bfc270a 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.
(This used to be commit 0f3b01beba)
2007-10-10 12:58:36 -05:00
Andrew Tridgell
a67ec52fde 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.
(This used to be commit 05fd38f3cf)
2007-10-10 12:58:30 -05:00
Andrew Tridgell
3a899d9a92 r2182: force the torture test domain join to happen on SMB to prevent the
LSAKEY problem holding up other tests
(This used to be commit ad8d54fd7d)
2007-10-10 12:58:29 -05:00
Andrew Tridgell
31c1c7846f 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
(This used to be commit 756f28ac95)
2007-10-10 12:58:27 -05:00
Stefan Metzmacher
8aa051c7b2 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
(This used to be commit 4733dcbf5f)
2007-10-10 12:58:23 -05:00
Andrew Bartlett
235a71fa3e r2056: Allow the compiler to check this format string.
Andrew Bartlett
(This used to be commit 7e18ca7285)
2007-10-10 12:58:22 -05:00
Andrew Tridgell
1129c78083 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.
(This used to be commit 2ce4028842)
2007-10-10 12:58:09 -05:00
Simo Sorce
9dc1e17c35 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
(This used to be commit 0eaec28f5c)
2007-10-10 12:57:57 -05:00
Simo Sorce
2e28edd233 r1771: OK Let's add tests for ldap.
Thanks to Metze and Volker for their unvaluable support :)
(This used to be commit e6a6c0737a)
2007-10-10 12:57:56 -05:00
Stefan Metzmacher
c5fbb6f23c r1654: rename cli_ -> smbcli_
rename CLI_ -> SMBCLI_

metze
(This used to be commit 8441750fd9)
2007-10-10 12:57:47 -05:00
Andrew Tridgell
d4ceaff6a5 r1636: improved the negnowait test so it is standalone (taking advantage of the async APIs)
(This used to be commit 19c22760c6)
2007-10-10 12:57:46 -05:00
Andrew Tridgell
16e452ddf8 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.
(This used to be commit 2e297be5c3)
2007-10-10 12:57:44 -05:00
Jelmer Vernooij
0c55b8d8c2 r1617: Start working on the svcctl pipe
(This used to be commit 518ff5f505)
2007-10-10 12:57:44 -05:00
Andrew Bartlett
f607197054 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
(This used to be commit b97d3cb2ef)
2007-10-10 12:57:35 -05:00
Stefan Metzmacher
bfd8bded8e 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
(This used to be commit 3fc9abcad7)
2007-10-10 12:57:34 -05:00
Volker Lendecke
3a6f761eb0 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 :-)
(This used to be commit 08140cc1a8)
2007-10-10 12:57:33 -05:00
Stefan Metzmacher
4b3b32a2f1 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
(This used to be commit f1bbde6bb4)
2007-10-10 12:56:54 -05:00
Stefan Metzmacher
25cae4dc0c r1402: we should prompt for a password if it's not given by -U
metze
(This used to be commit acde1358c9)
2007-10-10 12:56:54 -05:00
Stefan Metzmacher
121e074232 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
(This used to be commit 626bb153c4)
2007-10-10 12:56:45 -05:00
Andrew Bartlett
1f31eccdad r1173: A quick little test to show that we cannot bind twice to a single endpoint.
Andrew Bartlett
(This used to be commit e12ad47c69)
2007-10-10 12:56:43 -05:00
Andrew Bartlett
b1268fc445 r1123: Make all lp_ string functions return 'const char *'.
Fix other 'const' warnings in the torture code.

Andrew Bartlett
(This used to be commit 5d39d7497f)
2007-10-10 12:56:38 -05:00
Jeremy Allison
73c077d37b r1091: Added in timing tests for deferred opens. Added extra debug info to signing
mistakes.
Jeremy.
(This used to be commit 5c3a2417cf)
2007-10-10 12:56:37 -05:00
Jeremy Allison
a125e49d67 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
(This used to be commit 0068cb12ef)
2007-10-10 12:56:37 -05:00
Andrew Tridgell
a1318baa55 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
(This used to be commit 36f05e4d57)
2007-10-10 12:56:33 -05:00
Jelmer Vernooij
79b0409198 r1039: Remove description of unexisting option.
(This used to be commit c085b1f94e)
2007-10-10 12:56:33 -05:00
Stefan Metzmacher
770e3307ce r962: convert 'unsigned' and 'unsigned int' to uint_t
metze
(This used to be commit 57151e80eb)
2007-10-10 12:56:23 -05:00
Stefan Metzmacher
98d291423f r961: convert 'uchar' to 'uint8_t'
metze
(This used to be commit 9f914e4af9)
2007-10-10 12:56:23 -05:00
Stefan Metzmacher
fa2e9ec311 r960: convert 'unsigned int' to uint_t in the most places
metze
(This used to be commit 18062d2ed9)
2007-10-10 12:56:23 -05:00
Andrew Bartlett
e754760d23 r892: Actually add the NTLMSSP self-check torture code this time...
Andrew Bartlett
(This used to be commit 9df5cbbd76)
2007-10-10 12:56:18 -05:00
Stefan Metzmacher
fcd718c7d8 r890: convert samba4 to use [u]int8_t instead of [u]int8
metze
(This used to be commit 2986c5f08c)
2007-10-10 12:56:16 -05:00
Stefan Metzmacher
f88bf54c7f r889: convert samba4 to use [u]int16_t instead of [u]int16
metze
(This used to be commit af6f1f8a01)
2007-10-10 12:56:16 -05:00
Stefan Metzmacher
f9d8f8843d r884: convert samba4 to use [u]int32_t instead of [u]int32
metze
(This used to be commit 0e5517d937)
2007-10-10 12:56:15 -05:00
Stefan Metzmacher
59e739a2f9 r882: - create TORTURE_AUTH SUBSYSTEM
- fix the build because of the missing torture/ntlmssp.c
- this file should go into torture/auth/ !

metze
(This used to be commit ad662fddcd)
2007-10-10 12:56:15 -05:00
Andrew Bartlett
5b0ab386cb 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
(This used to be commit 399e2e2b11)
2007-10-10 12:56:14 -05:00
Jeremy Allison
a96ccb7022 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.
(This used to be commit 2cb4ed271b)
2007-10-10 12:56:13 -05:00
Stefan Metzmacher
2941d3233c r821: prompt user for password if not given by -U user%pass
and not as torture:password in smb.conf

metze
(This used to be commit 9de377a914)
2007-10-10 12:53:52 -05:00
Jeremy Allison
31b9470996 r741: Test from Volker in RAW-OPEN for truncating a file containing locks.
Also added the same ad-hoc test is LOCK7.
Jeremy.
(This used to be commit 6cb21ccda3)
2007-10-10 12:53:46 -05:00
Volker Lendecke
b82b555b83 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
(This used to be commit 37221b81f1)
2007-10-10 12:51:36 -05:00
Andrew Tridgell
b394a4c2ff 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()
(This used to be commit 84de0b7e58)
2007-10-10 12:51:33 -05:00
Andrew Tridgell
47dfe299c8 - 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.
(This used to be commit c8497a4236)
2004-03-26 02:39:48 +00:00
Andrew Tridgell
3da4329db4 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.
(This used to be commit e0d9502aa2)
2004-03-09 09:04:06 +00:00
Andrew Tridgell
2d9a8bf0c9 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
(This used to be commit a46c009c04)
2004-03-09 02:13:13 +00:00
Andrew Tridgell
420c7b4c5d added the simple HOLDCON torture test. This is used to establish
hundreds of idle connections to the server, which can be used to
simulate environments with large numbers of idle connections.
(This used to be commit cfce9458a2)
2004-02-21 04:02:55 +00:00
Tim Potter
9a6388179b Convert libcli routines to return NTSTATUS instead of BOOL. Again, the
only users are smbclient and smbtorture.
(This used to be commit 54cb508c78)
2004-02-10 11:33:35 +00:00
Tim Potter
4639eb5a58 Convert libcli routines to use cli_tree instead of cli_state. Port
smbtorture to use the new interface.

Part 2 will be to eliminate cli_state from smbtorture as this is now
the only place where it is used.
(This used to be commit db1cc96af6)
2004-02-08 00:51:07 +00:00
Andrew Bartlett
2853e62248 This would appear to restore smbtorture to be able to use the syntax
documented in it's self-help for RPC tests.

Andrew Bartlett
(This used to be commit 49b52cdbfe)
2004-02-03 21:53:51 +00:00
Andrew Tridgell
71f81d1d3e allow the specification of full dcerpc endpoint binding strings on the
command line. This allows you to (for example) control signing/sealing
of smbtorture RPC sessions
(This used to be commit a73825eb49)
2003-12-15 03:29:55 +00:00
Andrew Tridgell
f1ceef6c84 switch off the default of ntlmssp on rpc on smb as some windows pipes
can't handle it (I'd switched it on while experimenting, and forgot to
switch it off before committing)
(This used to be commit 837d8f73a9)
2003-12-15 01:09:45 +00:00
Andrew Tridgell
f6eb8342cb added auto-generation of the server side boilerplate code for each
pipe.

The server side code gets generated as librpc/gen_ndr/ndr_NAME_s.c and
gets included in the pipe module
(This used to be commit bd3dcfe582)
2003-12-14 13:22:12 +00:00
Andrew Tridgell
346a4af6f0 add the ntlmssp calls back into smbtorture on rpc over tcp. The samba4
rpc server doesn't do ntlmssp yet, so this breaks the tests, but that
is the next step.
(This used to be commit ebe29305af)
2003-12-13 23:30:43 +00:00
Andrew Tridgell
d262b8c3c7 completed the linkage between the endpoint mapper and the dcerpc
server endpoints. We can now successfully setup listening endpoints on
high ports, then use our endpoint mapper redirect incoming clients to
the right port.

also greatly cleanup the rpc over tcp session handling.
(This used to be commit 593bc29bbe)
2003-12-13 23:25:15 +00:00
Andrew Tridgell
926240428c * patch based on work by Jim Myers to unify the ioctl handling to be
more like the other major SMB functions

* added SMBntrename code
(This used to be commit f2d3dc9893)
2003-12-04 02:03:06 +00:00
Andrew Tridgell
b0531a38cc started adding netlogon IDL and test suite
(This used to be commit 3d64eefb46)
2003-12-01 01:41:38 +00:00
Andrew Tridgell
7ec0ead48a the beginnings of an automated tool for working out IDL properties of
a pipe. I'm not sure how possible this will be without lots of human
intervention, but its an interesting thing to try.
(This used to be commit d5afe7c6a8)
2003-11-28 08:51:09 +00:00
Andrew Tridgell
df5949efb4 added auto-generation of the IDL interface tables. This makes two less
places that need to be edited when someone adds a new IDL file.
(This used to be commit ccd9ddeed6)
2003-11-28 00:48:05 +00:00
Andrew Tridgell
ab3d728b7e added an rpc scanner. This prints messages like this:
uuid 82273fdc-e32a-18c3-3f78-827929dc23ea  version 0x0000:0x0000  'eventlog'
        24 calls available
        WARNING: local IDL defines 4 calls

when all the WARNINGs are gone then we know we have all the calls :)
(This used to be commit f5821b2468)
2003-11-27 05:34:28 +00:00
Andrew Tridgell
1ca1b85c4c by default sign RPC over TCP but not RPC over SMB. I will add command line control soon
(This used to be commit 215852116c)
2003-11-26 12:29:08 +00:00
Andrew Tridgell
d49d528618 show an error when the epmapper fails to find an interface
(This used to be commit 448dead14d)
2003-11-26 04:32:04 +00:00
Andrew Tridgell
fffd741a7a added auto-determination of the DCERPC over TCP port number by asking
the servers endpoint mapper
(This used to be commit 4abf5376b0)
2003-11-26 03:36:17 +00:00
Andrew Tridgell
e0ac659917 signed DCERPC over TCP now works !
* moved ntlmssp code into libcli/auth/, and updated to latest ntlmssp
   code from samba3 (thanks Andrew! the new interface is great)

 * added signing/ntlmssp support in the dcerpc code

 * added a dcerpc_auth.c module for the various dcerpc auth mechanisms
(This used to be commit c18c9b5585)
2003-11-26 01:16:41 +00:00
Andrew Tridgell
f4e485117a * fixed byte order in epmapper parsing
* allow rpc transport to be specified on command line in smbtorture
(This used to be commit 8a82050fd6)
2003-11-24 13:19:00 +00:00
Andrew Tridgell
7befc0648e initial implementation of dcerpc over tcp. RPC-EPMAPPER works, now to
add epm_Map calls and support the rest of the pipes
(This used to be commit 39add48158)
2003-11-24 12:40:47 +00:00
Andrew Tridgell
bbb11d4a0d * prepared the dcerpc subsystem for adding the RPC over TCP transport
* fixed a uninitialised variable bug in pidl (found by valgrind)
(This used to be commit 8bce61b8af)
2003-11-24 11:45:33 +00:00
Andrew Tridgell
c7fd83d0b2 added the dcerpc remote management interfaces as mgmt.idl, and wrote a
test suite. The test suite dumps all of the interfaces available on
all pipes. There sure are a lot more interfaces on w2k3 than w2k !
(This used to be commit f94bc07990)
2003-11-24 01:24:29 +00:00
Andrew Tridgell
175e947579 * enable RPC/NDR validation in all smbtorture code
* allow us to distinguish between null arrays and zero length arrays,
   by making the allocation size a minimum of 1 on array pull
(This used to be commit 11c0fe548e)
2003-11-22 08:41:40 +00:00
Andrew Tridgell
32831d5af9 fix a smbtorture memory leak
(This used to be commit 0eff7c519b)
2003-11-21 22:00:38 +00:00
Andrew Tridgell
a465add90f * changed the way strings are handled in pidl to a much more general
interface. We now support an arbitrary set of flags to each parser,
  and these can be used to control the string types. I have provided
  some common IDL string types in librpc/idl/idl_types.h which needs to
  be included in every IDL file.

* added IDL for the endpoint mapper. Added a test suite that enumerates
  all endpoints on the server.
(This used to be commit d2665f36a7)
2003-11-21 13:14:17 +00:00
Tim Potter
49c02c6634 Start of winreg idl. Implement OpenHKLM, GetVersion and CloseKey.
(This used to be commit c8b87f5feb)
2003-11-21 05:28:36 +00:00