1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-05 21:57:51 +03:00

33 Commits

Author SHA1 Message Date
Jelmer Vernooij
b28860978f r19392: Use torture_setting_* rather than lp_parm_* where possible. 2007-10-10 14:21:24 -05:00
Rafal Szczesniak
f57a8ace6f r15939: Add tests for userinfo call with username argument provided
which enables optional stage resolving username to a rid.

rafal
2007-10-10 14:08:42 -05:00
Rafal Szczesniak
a528b64054 r15921: Include new headers.
rafal
2007-10-10 14:08:40 -05:00
Jelmer Vernooij
c19c2b51d3 r15328: Move some functions around, remove dependencies.
Remove some autogenerated headers (which had prototypes now autogenerated by pidl)
Remove ndr_security.h from a few places - it's no longer necessary
2007-10-10 14:05:17 -05:00
Stefan Metzmacher
9ec706238c r14860: create libcli/security/security.h
metze
2007-10-10 13:59:44 -05:00
Jelmer Vernooij
3c7a5ce291 r14720: Add torture_context argument to all torture tests 2007-10-10 13:59:13 -05:00
Jelmer Vernooij
f7312dab3b r14470: Remove some unnecessary headers. 2007-10-10 13:57:29 -05:00
Jelmer Vernooij
3dd477ca51 r14464: Don't include ndr_BASENAME.h files unless strictly required, instead
try to include just the BASENAME.h files (containing only structs)
2007-10-10 13:57:27 -05:00
Jelmer Vernooij
7054ebf024 r14402: Generate seperate headers for RPC client functions. 2007-10-10 13:57:19 -05:00
Jelmer Vernooij
1d2d970f3b r14379: Build torture/rpc/ as a seperate smbtorture module. Move helper
functions for rpc out of torture/torture.c
2007-10-10 13:57:16 -05:00
Jelmer Vernooij
1228358767 r13924: Split more prototypes out of include/proto.h + initial work on header
file dependencies
2007-10-10 13:52:24 -05:00
Jelmer Vernooij
6391761601 r12696: Reduce the size of include/structs.h 2007-10-10 13:49:40 -05:00
Jelmer Vernooij
73610639b2 r12693: Move core data structures out of smb.h into core.h
torture prototypes in seperate header
2007-10-10 13:49:39 -05:00
Jelmer Vernooij
70e7449318 r12608: Remove some unused #include lines. 2007-10-10 13:49:03 -05:00
Jelmer Vernooij
0aca5fd513 r12542: Move some more prototypes out to seperate headers 2007-10-10 13:47:55 -05:00
Jelmer Vernooij
8aae0f168e r12510: Change the DCE/RPC interfaces to take a pointer to a
dcerpc_interface_table struct rather then a tuple of interface
name, UUID and version.

This removes the requirement for having a global list of DCE/RPC interfaces,
except for these parts of the code that use that list explicitly
(ndrdump and the scanner torture test).

This should also allow us to remove the hack that put the authservice parameter
in the dcerpc_binding struct as it can now be read directly from
dcerpc_interface_table.

I will now modify some of these functions to take a dcerpc_syntax_id
structure rather then a full dcerpc_interface_table.
2007-10-10 13:47:48 -05:00
Stefan Metzmacher
4527815a0a r10504: - seperate implementation specific stuff, from the generic composite
stuff.
- don't use SMBCLI_REQUEST_* state's in the genreic composite stuff
- move monitor_fn to libnet.

NOTE: I have maybe found some bugs, in code that is dirrectly in DONE or ERROR
      state in the _send() function. I haven't fixed this bugs in this
      commit! We may need some composite_trigger_*() functions or so.
      And maybe some other generic helper functions...

metze
2007-10-10 13:38:57 -05:00
Rafal Szczesniak
5be8479d5c r8761: Propagate changes in monitor messaging code.
rafal
2007-10-10 13:30:03 -05:00
Stefan Metzmacher
e601042c07 r8232: remove samr_String and netr_String as they are the same as lsa_String
metze
2007-10-10 13:19:22 -05:00
Rafal Szczesniak
d54bf09701 r7491: libnet functions used in tests have different names now.
rafal
2007-10-10 13:17:59 -05:00
Tim Potter
448795607f r6847: Fix some unused variable warnings in the libnet torture test. 2007-10-10 13:16:50 -05:00
Rafal Szczesniak
96446e5e1e r6717: - torture test of async useradd function and monitor messages.
- make message handling functions static.

rafal
2007-10-10 13:16:37 -05:00
Rafal Szczesniak
4ac3c145fc r6637: Test for asynchronous function and monitor messages.
rafal
2007-10-10 13:16:32 -05:00
Rafal Szczesniak
400f6d5f87 r6432: Restorin previous construction of conditions after a little discussion
with Richard and Andrew.

rafal
2007-10-10 13:11:36 -05:00
Rafal Szczesniak
ea251d4f79 r6426: DCE/RPC bind string parsing is not needed anymore, as we use
lp_workgroup parameter as domain name to operate on.

rafal
2007-10-10 13:11:36 -05:00
Andrew Tridgell
01ea1e7762 r6165: fixed up the userinfo composite code. Fixes include:
- talloc should always be done in the right context. For example, when creating
  the userinfo_state structure, place it inside the composite
  structure, not directly on the pipe. If this isn't done then
  correct cleanup can't happen on errors (as cleanup destroys the top
  level composite context only)

- define private structures like userinfo_state in the userinfo.c
  code, not in the public header

- only keep the parameters we need in the state structure. For
  example, the domain_handle is only needed in the first call, so we
  don't need to keep it around in the state structure, but the level is
  needed in later calls, so we need to keep it

- always initialise [out,ref] parameters in RPC calls. The [ref] part
  means that the call assumes the pointer it has been given is
  valid. If you don't initialise it then you will get a segv on
  recv. This is why the code was dying.

- don't use internal strucrure elements like the pipe
  pipe->conn->pending outside of the internal rpc implementation. That
  is an internal list, trying to use it from external code will cause crashes.

- rpc calls assume that rpc call strucrures remain valid for the
  duration of the call. This means you need to keep the structures
  (such as "struct samr_Close") in the userinfo_state strucrure,
  otherwise it will go out of scope during the async processing

- need to remember to change c->state to SMBCLI_REQUEST_DONE when the
  request has finished in the close handler, otherwise it will loop
  forever trying to close

Mimir, please look at the diff carefully for more detailed info on the fixes
2007-10-10 13:11:23 -05:00
Andrew Bartlett
0453f9d05d 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
2007-10-10 13:11:11 -05:00
Andrew Bartlett
824289dcc2 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.
2007-10-10 13:11:07 -05:00
Stefan Metzmacher
bb2622a0c9 r5681: fix the build and compiler wanings
metze
2007-10-10 13:11:00 -05:00
Rafal Szczesniak
7278c7d837 r5679: Complete basic test of rpc_composite_userinfo function (which
btw proves the function is completely broken but that's what
tests are for)

rafal
2007-10-10 13:10:59 -05:00
Jelmer Vernooij
a416de5825 r5661: Be a little stricter on syntax regarding arrays. A pointer to an
array can now only be :

 type *name[];

rather then :

 type *name;

which was supported in the past. Warnings will be given when the first
syntax is used. Reasons for this change in behaviour include improved
readability and the fact that the second format makes dealing with multiple
levels of pointers harder.
2007-10-10 13:10:57 -05:00
Rafal Szczesniak
94955e5325 r5651: A bit more code in userinfo test and hook up test function to
main torture binary.

rafal
2007-10-10 13:10:56 -05:00
Rafal Szczesniak
eb13c1bcfc r5610: Starting libnet test of userinfo call. Unfinished yet, though
doesn't break anything at the moment.

rafal
2007-10-10 13:10:56 -05:00