summaryrefslogtreecommitdiffstats
path: root/source4/winbind/wb_server.h
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2013-06-27 11:28:03 +1000
committerStefan Metzmacher <metze@samba.org>2013-07-10 06:57:06 +0200
commit2505d48e4fbcd8a805a88ad0b05fb1a16a588197 (patch)
treef396d19aceddb99a195d9f23142e6afbe36af57e /source4/winbind/wb_server.h
parentdf929d6feb857668ad9da277213e9fae1480ff63 (diff)
downloadsamba-2505d48e4fbcd8a805a88ad0b05fb1a16a588197.tar.gz
samba-2505d48e4fbcd8a805a88ad0b05fb1a16a588197.tar.xz
samba-2505d48e4fbcd8a805a88ad0b05fb1a16a588197.zip
s4-winbindd: Do not terminate a connection that is still pending (bug #9820)
Instead, wait until the call attempts to reply, and let it terminate then (often this happens in the attempt to then write to the broken pipe). Andrew Bartlett Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source4/winbind/wb_server.h')
-rw-r--r--source4/winbind/wb_server.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/source4/winbind/wb_server.h b/source4/winbind/wb_server.h
index 9b03004b285..26c404d12bd 100644
--- a/source4/winbind/wb_server.h
+++ b/source4/winbind/wb_server.h
@@ -34,6 +34,8 @@ struct wbsrv_service {
struct idmap_context *idmap_ctx;
const char *priv_pipe_dir;
const char *pipe_dir;
+
+ struct wbsrv_connection *broken_connections;
};
struct wbsrv_samconn {
@@ -85,6 +87,9 @@ struct wbsrv_listen_socket {
state of an open winbind connection
*/
struct wbsrv_connection {
+ /* for the broken_connections DLIST */
+ struct wbsrv_connection *prev, *next;
+
/* stream connection we belong to */
struct stream_connection *conn;
@@ -94,9 +99,12 @@ struct wbsrv_connection {
/* storage for protocol specific data */
void *protocol_private_data;
- /* how many calls are pending */
+ /* how many calls are pending (do not terminate the connection with calls pending a reply) */
uint32_t pending_calls;
+ /* is this connection pending termination? If so, why? */
+ const char *terminate;
+
struct tstream_context *tstream;
struct tevent_queue *send_queue;