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

82 Commits

Author SHA1 Message Date
Jelmer Vernooij
ffd7cee150 torture: Link against rpc server itself, not service module. (against which we can't link). 2010-10-11 01:06:36 +02:00
Stefan Metzmacher
7bbaab8dff s4:rpc_server: remove 'socket_address' based functions
metze
2010-04-27 13:00:25 +02:00
Stefan Metzmacher
c42bb8e49c s4:rpc_server: remember the local and remote address
metze
2010-04-27 13:00:25 +02:00
Andrew Bartlett
f74ce57cb5 s4:rpc_server Add a 'if_version' parameter to the bind operation.
This allows the interface version to be forwarded to the remote server
in the RPC proxy, both in the endpoint lookup and the subsequent bind.

Andrew Bartlett
2010-02-20 02:55:29 +11:00
Andrew Bartlett
10fed057cd s4:rpc_server Record the remote connections association group ID
By recording the association group the remote server assigned to our
proxied RPC connection, we can ensure we use the same value when the
client wishes to use it.

This isn't stored in a private pointer, as mapiproxy will want to use
this feature too.

Andrew Bartlett
2010-02-19 16:32:49 +11:00
Andrew Tridgell
8a090265b7 s4-rpcserver: added support for shared handles
This supports shared RPC handles across connections on all RPC
interfaces.

It turns out that w2k3 and w2k8 don't actually support this on all
pipes. We need to test which pipes we should enable this on.
2009-09-22 17:10:05 -07:00
Andrew Tridgell
69cb91a2eb s4-rpcserver: added shared association groups
This patch allows us to share association groups and their rpc handles
between connections. This is needed for some DRSUAPI behaviour when
recent windows clients connect.
2009-09-22 17:10:05 -07:00
Stefan Metzmacher
900a8d435d s4:rpc_server: remove some now unused code
metze
2009-09-18 20:34:44 +02:00
Stefan Metzmacher
30038534f4 s4:rpc_server: convert the socket based part to use the tstream interface
metze
2009-05-01 17:42:12 +02:00
Stefan Metzmacher
5bca70a0c2 s4:rpc_server: s/private/private_data
metze
2009-02-02 13:08:49 +01:00
Stefan Metzmacher
183c379fe5 s4:lib/tevent: rename structs
list=""
list="$list event_context:tevent_context"
list="$list fd_event:tevent_fd"
list="$list timed_event:tevent_timer"

for s in $list; do
	o=`echo $s | cut -d ':' -f1`
	n=`echo $s | cut -d ':' -f2`
	r=`git grep "struct $o" |cut -d ':' -f1 |sort -u`
	files=`echo "$r" | grep -v source3 | grep -v nsswitch | grep -v packaging4`
	for f in $files; do
		cat $f | sed -e "s/struct $o/struct $n/g" > $f.tmp
		mv $f.tmp $f
	done
done

metze
2008-12-29 20:46:40 +01:00
Jelmer Vernooij
0f04beff33 Rename dom_sid.idl -> server_id.idl (since it no longer actually contains the dom_sid). No longer include it from security.idl. 2008-12-16 15:36:18 +01:00
Stefan Metzmacher
26200f4fb1 s4:rpc_server: make it possible for iface->bind() to specify the assoc_group_id
This helps the openchange mapiproxy plugin to work correctly.

metze
2008-12-08 15:25:25 +01:00
Jelmer Vernooij
c537f7a914 Fix the build. 2008-11-02 05:49:36 +01:00
Jelmer Vernooij
aaa3e0425d Fix includes. 2008-10-15 02:52:10 +02:00
Stefan Metzmacher
746d3c8ff9 rpc_server: add support for DCERPC_PFC_FLAG_SUPPORT_HEADER_SIGN
you need "dcesrv:header signing=yes" to enable it.

metze
(This used to be commit bde2496e6b)
2008-08-07 15:40:20 +02:00
Jelmer Vernooij
1cf8130e11 Move handle utility functions to public header, remove more public headers.
(This used to be commit 92e71c19f4)
2008-04-02 14:18:31 +02:00
Jelmer Vernooij
afe3e8172d Install public header files again and include required prototypes.
(This used to be commit 47ffbbf674)
2008-04-02 04:53:27 +02:00
Jelmer Vernooij
57f20ccd24 r26296: Store loadparm context in DCE/RPC server context.
(This used to be commit fc1f4d2d65)
2007-12-21 05:48:13 +01:00
Jelmer Vernooij
82037a75ea r24814: Fix headers, trim core.h even more.
(This used to be commit 9647f860bd)
2007-10-10 15:03:14 -05:00
Jelmer Vernooij
61ffa08f4c r24712: No longer expose the 'BOOL' data type in any interfaces.
(This used to be commit 1ce32673d9)
2007-10-10 15:02:54 -05:00
Stefan Metzmacher
ce84ab9a83 r24532: rename struct dcerpc_syntax_id into struct ndr_syntax_id
and move it into misc.idl

The goal is to get rid a all dcerpc specific stuff in the
generated ndr layer.

metze
(This used to be commit 2ed014cfb8)
2007-10-10 15:02:11 -05:00
Andrew Tridgell
0479a2f1cb r23792: convert Samba4 to GPLv3
There are still a few tidyups of old FSF addresses to come (in both s3
and s4). More commits soon.
(This used to be commit fcf38a38ac)
2007-10-10 14:59:12 -05:00
Andrew Tridgell
dfb04271eb r21835: fixed a rpc server bug where we failed to remove a call from one
linked list when moving it to another. This could cause a valgrind
error under the RPC-SCANNER test.
(This used to be commit 9ba8c00851)
2007-10-10 14:49:34 -05:00
Andrew Tridgell
1cd4339b9a r20646: first preparations for cluster enablement. This changes "
uint32_t server_id
to
  struct server_id server_id;

which allows a server ID to have an node number. The node number will
be zero in non-clustered case. This is the most basic hook needed for
clustering, and ctdb.
(This used to be commit 2365abaa99)
2007-10-10 14:37:23 -05:00
Andrew Bartlett
72c5be634c r18363: Found a rather nasty bug in our fragment handling.
We were adding packet fragments onto the *reply* queue, not the
recieve queue.  This worked, as long as we got a whole packet before
we did any reply work, but failed once the backend called a remote
LDAP server (and I presume something invoked the event loop).

Andrew Bartlett
(This used to be commit a0162e0ace)
2007-10-10 14:18:19 -05:00
Stefan Metzmacher
63aaa6b782 r17340: initialize elements od dcesrc_call_state in one central place
and pass the messaging context to the call

metze
(This used to be commit 0d7f16d7be)
2007-10-10 14:15:16 -05:00
Stefan Metzmacher
e941cc3003 r15772: pass the messaging context and server_id to the dcerpc server subsystem
metze
(This used to be commit fb1debf219)
2007-10-10 14:08:17 -05:00
Jelmer Vernooij
42da534d66 r14735: Use dcerpc_syntax_id rather then seperate GUID + if_version everywhere
(This used to be commit a316b33057)
2007-10-10 13:59:17 -05:00
Jelmer Vernooij
35349a58df r14542: Remove librpc, libndr and libnbt from includes.h
(This used to be commit 51b4270513)
2007-10-10 13:58:42 -05:00
Stefan Metzmacher
a949db7c6d r14486: remove the need of a stream_connection on a dcesrv_connection,
and let the transport set callbacks for getting the own and peer
socket_address

metze
(This used to be commit 56fac3ddbb)
2007-10-10 13:57:32 -05:00
Jelmer Vernooij
83d8fd3dcf r14484: Install more headers
(This used to be commit 430c6516d3)
2007-10-10 13:57:31 -05:00
Jelmer Vernooij
e3f2414cf9 r14380: Reduce the size of structs.h
(This used to be commit 1a16a6f1df)
2007-10-10 13:57:16 -05:00
Stefan Metzmacher
45c92c9cf0 r13923: make the state_flags per dcesrv_connection
this will may help with a generic named pipe solution

metze
(This used to be commit c6fa9bd15c)
2007-10-10 13:52:24 -05:00
Jelmer Vernooij
63d718e243 r12696: Reduce the size of include/structs.h
(This used to be commit 6391761601)
2007-10-10 13:49:40 -05:00
Jelmer Vernooij
2cd5ca7d25 r12542: Move some more prototypes out to seperate headers
(This used to be commit 0aca5fd513)
2007-10-10 13:47:55 -05:00
Jelmer Vernooij
d658de65d3 r12512: Use GUID structs in API functions everywhere rather then converting back and
forth between GUID structs and strings in several places.
(This used to be commit 3564e2f967)
2007-10-10 13:47:48 -05:00
Stefan Metzmacher
a8ec371a61 r10078: - add a 'struct data_blob_list_item'
- use this for the send_queue's of the different stream_servers
  to not redefine the same struct so often, and it maybe will be used
  in other places too

metze
(This used to be commit b6694f067a)
2007-10-10 13:37:51 -05:00
Stefan Metzmacher
8ab3f59a10 r8036: revert rev 8023/8024 as they have a bugs.
metze
(This used to be commit 66d6b1d578)
2007-10-10 13:19:01 -05:00
Stefan Metzmacher
5afa0a2d62 r8023: use a pointer to a DATA_BLOB for each reply,
that will allow the write_fn callback of dcesrv_output()
to reference the memory with a valid TALLOC pointer

metze
(This used to be commit d0574d407f)
2007-10-10 13:19:00 -05:00
Andrew Tridgell
152a6a00c3 r7865: changed pidl to take a "const void *" instead of a "void *" for the
structure in ndr_push_*() and ndr_print_*(). The push and print
functions really should not modify the structure.

metze, to make this work I had to change your spoolss hand
marshaller. Can you please check it is OK? I think that the IN and OUT
sides of that function are not ever called on the same structure, so I
think that attempt at remembering the value by assigning to
r->in._offered was not doing anything anyway, but please correct me if
I have misunderstood it.

If you really do need to remember something on those structures I'd
suggest the ndr_token_store() and ndr_token_retrieve() functions,
which are used by pidl for just this sort of thing.
(This used to be commit eee528be97)
2007-10-10 13:18:44 -05:00
Andrew Tridgell
f0420c0292 r7800: added the same request serialisation logic to our socket based rpc
servers as I added to the smb server yesterday. This means rpc server
code can assume it runs serially unless it explicitly sets the async
flag on the request and returns
(This used to be commit 8546adb56a)
2007-10-10 13:18:37 -05:00
Jelmer Vernooij
430dc36c1a r7312: Add IDL for ncadg packets.
(This used to be commit 2009a430b0)
2007-10-10 13:17:40 -05:00
Stefan Metzmacher
32e6cf5e3f r6192: remove handle->destroy function pointer, this should be done by talloc destructors now
metze
(This used to be commit 862226f557)
2007-10-10 13:11:25 -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
c52fb55903 r5437: Allow Samba4 to be compiled by tcc (www.tinycc.org). It still crashes when linking though.
(This used to be commit 2e1e8db6dc)
2007-10-10 13:10:45 -05:00
Andrew Tridgell
55d4d36993 r5102: This is a major simplification of the logic for controlling top level
servers in smbd. The old code still contained a fairly bit of legacy
from the time when smbd was only handling SMB connection. The new code
gets rid of all of the smb_server specific code in smbd/, and creates
a much simpler infrastructures for new server code.

Major changes include:

 - simplified the process model code a lot.

 - got rid of the top level server and service structures
   completely. The top level context is now the event_context. This
   got rid of service.h and server.h completely (they were the most
   confusing parts of the old code)

 - added service_stream.[ch] for the helper functions that are
   specific to stream type services (services that handle streams, and
   use a logically separate process per connection)

 - got rid of the builtin idle_handler code in the service logic, as
   none of the servers were using it, and it can easily be handled by
   a server in future by adding its own timed_event to the event
   context.

 - fixed some major memory leaks in the rpc server code.

 - added registration of servers, rather than hard coding our list of
   possible servers. This allows for servers as modules in the future.

 - temporarily disabled the winbind code until I add the helper
   functions for that type of server

 - added error checking on service startup. If a configured server
   fails to startup then smbd doesn't startup.

 - cleaned up the command line handling in smbd, removing unused options
(This used to be commit cf6a46c3cb)
2007-10-10 13:09:22 -05:00
Stefan Metzmacher
fae215266b r4690: - add support for async rpc server replies
the backend should check for
(dce_call->state_flags & DCESRV_CALL_STATE_FLAG_MAY_ASYNC)
then it's allowed to reply async

then the backend should mark that call as async with
dce_call->state_flags |= DCESRV_CALL_STATE_FLAG_ASYNC;

later it has to manualy set r->out.result
and then send the reply by calling

status = dcesrv_reply(p->dce_call);

NOTE: that ncacn_np doesn't support async replies yet

- implement an async version of echo_TestSleep

- reenable the echo_TestSleep torture test
  (this need to be more strict when we have support for async ncacn_np)

metze
(This used to be commit f0a0dbeb25)
2007-10-10 13:08:43 -05:00
Andrew Tridgell
577218b2ad r4640: first stage in the server side support for multiple context_ids on one pipe
this stage does the following:

 - simplifies the dcerpc_handle handling, and all the callers of it

 - split out the context_id depenent state into a linked list of established contexts

 - fixed some talloc handling in several rpc servers that i noticed while doing the above
(This used to be commit fde042b3fc)
2007-10-10 13:08:38 -05:00
Stefan Metzmacher
bb072199b1 r4288: don't use struct dcerpc_interface_table anymore in the
main rpc server code. let the backends specify a ndr_push/ndr_pull function
like we already do with the dispatch() function.

this allows an interface implmentation to work as real proxy
without needing to know the idl for an interface that means
just the plain decrypted payload can be forwarded

If someone want to write such a backend, patches are wellcome

metze
(This used to be commit a150bdf140)
2007-10-10 13:07:32 -05:00