diff options
author | Andrew Tridgell <tridge@samba.org> | 2009-09-21 21:36:54 -0700 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2009-09-22 17:10:05 -0700 |
commit | 69cb91a2eb2c3853663a61c2ed8f38e8fdde0964 (patch) | |
tree | 8a2bbcce7e837c5c3e2dda558dabed4306f6b236 /source4/rpc_server/handles.c | |
parent | a30d6130869239a6d6160c50908092e1d1424af5 (diff) | |
download | samba-69cb91a2eb2c3853663a61c2ed8f38e8fdde0964.tar.gz samba-69cb91a2eb2c3853663a61c2ed8f38e8fdde0964.tar.bz2 samba-69cb91a2eb2c3853663a61c2ed8f38e8fdde0964.zip |
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.
Diffstat (limited to 'source4/rpc_server/handles.c')
-rw-r--r-- | source4/rpc_server/handles.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source4/rpc_server/handles.c b/source4/rpc_server/handles.c index 284354feb4..74b0ddc82e 100644 --- a/source4/rpc_server/handles.c +++ b/source4/rpc_server/handles.c @@ -28,7 +28,7 @@ */ static int dcesrv_handle_destructor(struct dcesrv_handle *h) { - DLIST_REMOVE(h->context->handles, h); + DLIST_REMOVE(h->context->assoc_group->handles, h); return 0; } @@ -51,7 +51,7 @@ _PUBLIC_ struct dcesrv_handle *dcesrv_handle_new(struct dcesrv_connection_contex h->wire_handle.handle_type = handle_type; h->wire_handle.uuid = GUID_random(); - DLIST_ADD(context->handles, h); + DLIST_ADD(context->assoc_group->handles, h); talloc_set_destructor(h, dcesrv_handle_destructor); @@ -70,10 +70,11 @@ _PUBLIC_ struct dcesrv_handle *dcesrv_handle_fetch( struct dcesrv_handle *h; if (policy_handle_empty(p)) { + /* TODO: we should probably return a NULL handle here */ return dcesrv_handle_new(context, handle_type); } - for (h=context->handles; h; h=h->next) { + for (h=context->assoc_group->handles; h; h=h->next) { if (h->wire_handle.handle_type == p->handle_type && GUID_equal(&p->uuid, &h->wire_handle.uuid)) { if (handle_type != DCESRV_HANDLE_ANY && |