[SCM] Samba Shared Repository - branch master updated
Jeremy Allison
jra at samba.org
Tue Apr 14 12:40:04 MDT 2015
The branch, master has been updated
via fd90d27 Add DCERPC flag to call unbind hooks without destroying the connection itself upon termination of a connection with outstanding pending calls.
from a97507a spoolss: purge the printer name cache on name change
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit fd90d270c7e97a639f42a96b674a674d1b51aa0d
Author: Julien Kerihuel <j.kerihuel at openchange.org>
Date: Mon Apr 6 11:26:58 2015 +0200
Add DCERPC flag to call unbind hooks without destroying the connection itself upon termination of a connection with outstanding pending calls.
Reviewed-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Jelmer Vernooij <jelmer at samba.org>
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Tue Apr 14 20:39:34 CEST 2015 on sn-devel-104
-----------------------------------------------------------------------
Summary of changes:
source4/rpc_server/dcerpc_server.c | 21 +++++++++++++++++++++
source4/rpc_server/dcerpc_server.h | 1 +
2 files changed, 22 insertions(+)
Changeset truncated at 500 lines:
diff --git a/source4/rpc_server/dcerpc_server.c b/source4/rpc_server/dcerpc_server.c
index a8785b0..dbdc67f 100644
--- a/source4/rpc_server/dcerpc_server.c
+++ b/source4/rpc_server/dcerpc_server.c
@@ -504,6 +504,7 @@ static int dcesrv_connection_context_destructor(struct dcesrv_connection_context
if (c->iface && c->iface->unbind) {
c->iface->unbind(c, c->iface);
+ c->iface = NULL;
}
return 0;
@@ -620,6 +621,10 @@ static NTSTATUS dcesrv_bind(struct dcesrv_call_state *call)
extra_flags |= DCERPC_PFC_FLAG_CONC_MPX;
}
+ if (call->state_flags & DCESRV_CALL_STATE_FLAG_PROCESS_PENDING_CALL) {
+ call->context->conn->state_flags |= DCESRV_CALL_STATE_FLAG_PROCESS_PENDING_CALL;
+ }
+
/* handle any authentication that is being requested */
if (!dcesrv_auth_bind(call)) {
talloc_free(call->context);
@@ -839,6 +844,10 @@ static NTSTATUS dcesrv_alter(struct dcesrv_call_state *call)
}
}
+ if (call->state_flags & DCESRV_CALL_STATE_FLAG_PROCESS_PENDING_CALL) {
+ call->context->conn->state_flags |= DCESRV_CALL_STATE_FLAG_PROCESS_PENDING_CALL;
+ }
+
/* setup a alter_resp */
dcesrv_init_hdr(&pkt, lpcfg_rpc_big_endian(call->conn->dce_ctx->lp_ctx));
pkt.auth_length = 0;
@@ -1378,6 +1387,18 @@ static void dcesrv_cleanup_broken_connections(struct dcesrv_context *dce_ctx)
cur = next;
next = cur->next;
+ if (cur->state_flags & DCESRV_CALL_STATE_FLAG_PROCESS_PENDING_CALL) {
+ struct dcesrv_connection_context *context_cur, *context_next;
+
+ context_next = cur->contexts;
+ while (context_next != NULL) {
+ context_cur = context_next;
+ context_next = context_cur->next;
+
+ dcesrv_connection_context_destructor(context_cur);
+ }
+ }
+
dcesrv_terminate_connection(cur, cur->terminate);
}
}
diff --git a/source4/rpc_server/dcerpc_server.h b/source4/rpc_server/dcerpc_server.h
index 1bf187a..9a697ce 100644
--- a/source4/rpc_server/dcerpc_server.h
+++ b/source4/rpc_server/dcerpc_server.h
@@ -102,6 +102,7 @@ struct dcesrv_call_state {
#define DCESRV_CALL_STATE_FLAG_ASYNC (1<<0)
#define DCESRV_CALL_STATE_FLAG_MAY_ASYNC (1<<1)
#define DCESRV_CALL_STATE_FLAG_MULTIPLEXED (1<<3)
+#define DCESRV_CALL_STATE_FLAG_PROCESS_PENDING_CALL (1<<4)
uint32_t state_flags;
/* the time the request arrived in the server */
--
Samba Shared Repository
More information about the samba-cvs
mailing list