The Samba-Bugzilla – Attachment 14150 Details for
Bug 13291
Backport tevent 0.9.36 with tevent_queue_entry_untrigger()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patches for v4-7-test
tmp47.diff.txt (text/plain), 29.78 KB, created by
Stefan Metzmacher
on 2018-04-17 06:24:36 UTC
(
hide
)
Description:
Patches for v4-7-test
Filename:
MIME Type:
Creator:
Stefan Metzmacher
Created:
2018-04-17 06:24:36 UTC
Size:
29.78 KB
patch
obsolete
>From 36ecbe5ed79a64fdbadaf5a10b41dd116aac2755 Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Mon, 14 Aug 2017 15:54:39 -0700 >Subject: [PATCH 1/9] lib: tevent: Use system <tevent.h>, not internal header > path (except in self-test). > >Signed-off-by: Jeremy Allison <jra@samba.org> >Reviewed-by: Andreas Schneider <asn@samba.org> > >(similar to commit bee22f187cfca26da13efb4cc980a705ec252a21) >--- > lib/async_req/async_connect_send_test.c | 2 +- > lib/tevent/testsuite.c | 2 +- > source4/librpc/rpc/dcerpc_roh_channel_in.c | 2 +- > source4/librpc/rpc/dcerpc_roh_channel_out.c | 2 +- > source4/torture/smb2/rename.c | 2 +- > 5 files changed, 5 insertions(+), 5 deletions(-) > >diff --git a/lib/async_req/async_connect_send_test.c b/lib/async_req/async_connect_send_test.c >index 34ea6b7..d570c60 100644 >--- a/lib/async_req/async_connect_send_test.c >+++ b/lib/async_req/async_connect_send_test.c >@@ -17,7 +17,7 @@ > */ > > #include "replace.h" >-#include "lib/tevent/tevent.h" >+#include <tevent.h> > #include "lib/async_req/async_sock.h" > #include <stdio.h> > #include <string.h> >diff --git a/lib/tevent/testsuite.c b/lib/tevent/testsuite.c >index ee29e5b..e508452 100644 >--- a/lib/tevent/testsuite.c >+++ b/lib/tevent/testsuite.c >@@ -25,7 +25,7 @@ > */ > > #include "includes.h" >-#include "lib/tevent/tevent.h" >+#include "tevent.h" > #include "system/filesys.h" > #include "system/select.h" > #include "system/network.h" >diff --git a/source4/librpc/rpc/dcerpc_roh_channel_in.c b/source4/librpc/rpc/dcerpc_roh_channel_in.c >index 887a57b..4955f24 100644 >--- a/source4/librpc/rpc/dcerpc_roh_channel_in.c >+++ b/source4/librpc/rpc/dcerpc_roh_channel_in.c >@@ -21,7 +21,7 @@ > */ > > #include "includes.h" >-#include "lib/tevent/tevent.h" >+#include <tevent.h> > #include "lib/talloc/talloc.h" > #include "lib/tsocket/tsocket.h" > #include "lib/tls/tls.h" >diff --git a/source4/librpc/rpc/dcerpc_roh_channel_out.c b/source4/librpc/rpc/dcerpc_roh_channel_out.c >index b370e56..0123ed5 100644 >--- a/source4/librpc/rpc/dcerpc_roh_channel_out.c >+++ b/source4/librpc/rpc/dcerpc_roh_channel_out.c >@@ -21,7 +21,7 @@ > */ > > #include "includes.h" >-#include "lib/tevent/tevent.h" >+#include <tevent.h> > #include "lib/talloc/talloc.h" > #include "lib/tsocket/tsocket.h" > #include "lib/tls/tls.h" >diff --git a/source4/torture/smb2/rename.c b/source4/torture/smb2/rename.c >index 4c41c8b..5055cf2 100644 >--- a/source4/torture/smb2/rename.c >+++ b/source4/torture/smb2/rename.c >@@ -22,7 +22,7 @@ > #include "includes.h" > #include "libcli/smb2/smb2.h" > #include "libcli/smb2/smb2_calls.h" >-#include "lib/tevent/tevent.h" >+#include <tevent.h> > #include "lib/util/tevent_ntstatus.h" > > #include "torture/torture.h" >-- >1.9.1 > > >From 31eeb601761cc6cf66da28ea4f254079879fb9cf Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Fri, 10 Nov 2017 19:26:55 -0800 >Subject: [PATCH 2/9] lib: tevent: Minor cleanup. wakeup_fd can always be > gotten from the event context. >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >We don't need to store it. I prefer this as it shows that we must always >get wakeup_fd from the event context at time of use, rather than possibly >storing an out-of-date variable. > >Signed-off-by: Jeremy Allison <jra@samba.org> >Reviewed-by: Ralph Boehme <slow@samba.org> > >Autobuild-User(master): Ralph Böhme <slow@samba.org> >Autobuild-Date(master): Fri Nov 17 12:43:01 CET 2017 on sn-devel-144 > >(cherry picked from commit 993fa5793fd6a95173eda574562661ab8959c544) >--- > lib/tevent/tevent_internal.h | 1 - > lib/tevent/tevent_threads.c | 4 +--- > 2 files changed, 1 insertion(+), 4 deletions(-) > >diff --git a/lib/tevent/tevent_internal.h b/lib/tevent/tevent_internal.h >index 47ea39b..ec3955e 100644 >--- a/lib/tevent/tevent_internal.h >+++ b/lib/tevent/tevent_internal.h >@@ -235,7 +235,6 @@ struct tevent_threaded_context { > pthread_mutex_t event_ctx_mutex; > #endif > struct tevent_context *event_ctx; >- int wakeup_fd; > }; > > struct tevent_debug_ops { >diff --git a/lib/tevent/tevent_threads.c b/lib/tevent/tevent_threads.c >index 2e83f1b..2c6e66b 100644 >--- a/lib/tevent/tevent_threads.c >+++ b/lib/tevent/tevent_threads.c >@@ -424,7 +424,6 @@ struct tevent_threaded_context *tevent_threaded_context_create( > return NULL; > } > tctx->event_ctx = ev; >- tctx->wakeup_fd = ev->wakeup_fd; > > ret = pthread_mutex_init(&tctx->event_ctx_mutex, NULL); > if (ret != 0) { >@@ -489,14 +488,13 @@ void _tevent_threaded_schedule_immediate(struct tevent_threaded_context *tctx, > } > > DLIST_ADD_END(ev->scheduled_immediates, im); >+ wakeup_fd = ev->wakeup_fd; > > ret = pthread_mutex_unlock(&ev->scheduled_mutex); > if (ret != 0) { > abort(); > } > >- wakeup_fd = tctx->wakeup_fd; >- > ret = pthread_mutex_unlock(&tctx->event_ctx_mutex); > if (ret != 0) { > abort(); >-- >1.9.1 > > >From bc48dc01c38fa0e72af8ee4d81b965ef39f4257b Mon Sep 17 00:00:00 2001 >From: Volker Lendecke <vl@samba.org> >Date: Mon, 30 Oct 2017 13:51:25 +0100 >Subject: [PATCH 3/9] tevent: Fix typos > >While there, fix comment formatting > >Signed-off-by: Volker Lendecke <vl@samba.org> >Reviewed-by: Jeremy Allison <jra@samba.org> >(cherry picked from commit c19b49bad8071bc33089e5b3c053fcb890a8ea11) >--- > lib/tevent/tevent.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/lib/tevent/tevent.h b/lib/tevent/tevent.h >index 728cf62..7284a85 100644 >--- a/lib/tevent/tevent.h >+++ b/lib/tevent/tevent.h >@@ -936,8 +936,8 @@ void tevent_req_set_cancel_fn(struct tevent_req *req, tevent_req_cancel_fn fn); > * > * @param[in] req The request to use. > * >- * @return This function returns true is the request is cancelable, >- * othererwise false is returned. >+ * @return This function returns true if the request is >+ * cancelable, otherwise false is returned. > * > * @note Even if the function returns true, the caller need to wait > * for the function to complete normally. >-- >1.9.1 > > >From 24129d7eab3f1d5272d4469988083c4eec0fa0e1 Mon Sep 17 00:00:00 2001 >From: Gary Lockyer <gary@catalyst.net.nz> >Date: Mon, 11 Dec 2017 09:17:49 +1300 >Subject: [PATCH 4/9] lib/tevent/echo_server.c set socket close on exec > >Set SOCKET_CLOEXEC on the sockets returned by accept. This ensures that >the socket is unavailable to any child process created by system(). >Making it harder for malicious code to set up a command channel, >as seen in the exploit for CVE-2015-0240 > >Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> >Reviewed-by: Andrew Bartlett <abartlet@samba.org> >(cherry picked from commit 954eddd0b8c25424fd44bbd002ba36873fe2c8d4) >--- > lib/tevent/echo_server.c | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/lib/tevent/echo_server.c b/lib/tevent/echo_server.c >index 6e7f181..3b2122d 100644 >--- a/lib/tevent/echo_server.c >+++ b/lib/tevent/echo_server.c >@@ -118,6 +118,7 @@ static void accept_handler(struct tevent_context *ev, struct tevent_fd *fde, > tevent_req_error(req, errno); > return; > } >+ smb_set_close_on_exec(state->listen_sock); > state->sock = ret; > tevent_req_done(req); > } >-- >1.9.1 > > >From 50a1e834709fc96378bab0baab6e2ffbb8f25406 Mon Sep 17 00:00:00 2001 >From: Gary Lockyer <gary@catalyst.net.nz> >Date: Mon, 11 Dec 2017 09:31:33 +1300 >Subject: [PATCH 5/9] lib/async_req/async_sock.c set socket close on exec > >Set SOCKET_CLOEXEC on the sockets returned by accept. This ensures that >the socket is unavailable to any child process created by system(). >Making it harder for malicious code to set up a command channel, >as seen in the exploit for CVE-2015-0240 > >Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> >Reviewed-by: Andrew Bartlett <abartlet@samba.org> >(cherry picked from commit 8b3c58251146d2e982a6c9fdb3828ca65e307a96) >--- > lib/async_req/async_sock.c | 1 + > lib/tevent/echo_server.c | 2 +- > 2 files changed, 2 insertions(+), 1 deletion(-) > >diff --git a/lib/async_req/async_sock.c b/lib/async_req/async_sock.c >index db3916e..0a8a333 100644 >--- a/lib/async_req/async_sock.c >+++ b/lib/async_req/async_sock.c >@@ -738,6 +738,7 @@ static void accept_handler(struct tevent_context *ev, struct tevent_fd *fde, > tevent_req_error(req, errno); > return; > } >+ smb_set_close_on_exec(ret); > state->sock = ret; > tevent_req_done(req); > } >diff --git a/lib/tevent/echo_server.c b/lib/tevent/echo_server.c >index 3b2122d..f93d8bc 100644 >--- a/lib/tevent/echo_server.c >+++ b/lib/tevent/echo_server.c >@@ -118,7 +118,7 @@ static void accept_handler(struct tevent_context *ev, struct tevent_fd *fde, > tevent_req_error(req, errno); > return; > } >- smb_set_close_on_exec(state->listen_sock); >+ smb_set_close_on_exec(ret); > state->sock = ret; > tevent_req_done(req); > } >-- >1.9.1 > > >From 1dca3e7cadd49a994668f25873234181fa0e82f8 Mon Sep 17 00:00:00 2001 >From: Stefan Metzmacher <metze@samba.org> >Date: Fri, 12 Jan 2018 15:08:14 +0100 >Subject: [PATCH 6/9] tevent: version 0.9.35 > >* Minor cleanup. wakeup_fd can always be gotten from the event context. >* Use smb_set_close_on_exec() in example code. > >Signed-off-by: Stefan Metzmacher <metze@samba.org> >Reviewed-by: Ralph Boehme <slow@samba.org> >(cherry picked from commit 6dd0a8c1a67922d1f893d5ef500861ec5e7c5a36) >--- > lib/tevent/ABI/tevent-0.9.35.sigs | 99 +++++++++++++++++++++++++++++++++++++++ > lib/tevent/wscript | 2 +- > 2 files changed, 100 insertions(+), 1 deletion(-) > create mode 100644 lib/tevent/ABI/tevent-0.9.35.sigs > >diff --git a/lib/tevent/ABI/tevent-0.9.35.sigs b/lib/tevent/ABI/tevent-0.9.35.sigs >new file mode 100644 >index 0000000..7a6a236 >--- /dev/null >+++ b/lib/tevent/ABI/tevent-0.9.35.sigs >@@ -0,0 +1,99 @@ >+_tevent_add_fd: struct tevent_fd *(struct tevent_context *, TALLOC_CTX *, int, uint16_t, tevent_fd_handler_t, void *, const char *, const char *) >+_tevent_add_signal: struct tevent_signal *(struct tevent_context *, TALLOC_CTX *, int, int, tevent_signal_handler_t, void *, const char *, const char *) >+_tevent_add_timer: struct tevent_timer *(struct tevent_context *, TALLOC_CTX *, struct timeval, tevent_timer_handler_t, void *, const char *, const char *) >+_tevent_create_immediate: struct tevent_immediate *(TALLOC_CTX *, const char *) >+_tevent_loop_once: int (struct tevent_context *, const char *) >+_tevent_loop_until: int (struct tevent_context *, bool (*)(void *), void *, const char *) >+_tevent_loop_wait: int (struct tevent_context *, const char *) >+_tevent_queue_create: struct tevent_queue *(TALLOC_CTX *, const char *, const char *) >+_tevent_req_callback_data: void *(struct tevent_req *) >+_tevent_req_cancel: bool (struct tevent_req *, const char *) >+_tevent_req_create: struct tevent_req *(TALLOC_CTX *, void *, size_t, const char *, const char *) >+_tevent_req_data: void *(struct tevent_req *) >+_tevent_req_done: void (struct tevent_req *, const char *) >+_tevent_req_error: bool (struct tevent_req *, uint64_t, const char *) >+_tevent_req_nomem: bool (const void *, struct tevent_req *, const char *) >+_tevent_req_notify_callback: void (struct tevent_req *, const char *) >+_tevent_req_oom: void (struct tevent_req *, const char *) >+_tevent_schedule_immediate: void (struct tevent_immediate *, struct tevent_context *, tevent_immediate_handler_t, void *, const char *, const char *) >+_tevent_threaded_schedule_immediate: void (struct tevent_threaded_context *, struct tevent_immediate *, tevent_immediate_handler_t, void *, const char *, const char *) >+tevent_backend_list: const char **(TALLOC_CTX *) >+tevent_cleanup_pending_signal_handlers: void (struct tevent_signal *) >+tevent_common_add_fd: struct tevent_fd *(struct tevent_context *, TALLOC_CTX *, int, uint16_t, tevent_fd_handler_t, void *, const char *, const char *) >+tevent_common_add_signal: struct tevent_signal *(struct tevent_context *, TALLOC_CTX *, int, int, tevent_signal_handler_t, void *, const char *, const char *) >+tevent_common_add_timer: struct tevent_timer *(struct tevent_context *, TALLOC_CTX *, struct timeval, tevent_timer_handler_t, void *, const char *, const char *) >+tevent_common_add_timer_v2: struct tevent_timer *(struct tevent_context *, TALLOC_CTX *, struct timeval, tevent_timer_handler_t, void *, const char *, const char *) >+tevent_common_check_signal: int (struct tevent_context *) >+tevent_common_context_destructor: int (struct tevent_context *) >+tevent_common_fd_destructor: int (struct tevent_fd *) >+tevent_common_fd_get_flags: uint16_t (struct tevent_fd *) >+tevent_common_fd_set_close_fn: void (struct tevent_fd *, tevent_fd_close_fn_t) >+tevent_common_fd_set_flags: void (struct tevent_fd *, uint16_t) >+tevent_common_have_events: bool (struct tevent_context *) >+tevent_common_loop_immediate: bool (struct tevent_context *) >+tevent_common_loop_timer_delay: struct timeval (struct tevent_context *) >+tevent_common_loop_wait: int (struct tevent_context *, const char *) >+tevent_common_schedule_immediate: void (struct tevent_immediate *, struct tevent_context *, tevent_immediate_handler_t, void *, const char *, const char *) >+tevent_common_threaded_activate_immediate: void (struct tevent_context *) >+tevent_common_wakeup: int (struct tevent_context *) >+tevent_common_wakeup_fd: int (int) >+tevent_common_wakeup_init: int (struct tevent_context *) >+tevent_context_init: struct tevent_context *(TALLOC_CTX *) >+tevent_context_init_byname: struct tevent_context *(TALLOC_CTX *, const char *) >+tevent_context_init_ops: struct tevent_context *(TALLOC_CTX *, const struct tevent_ops *, void *) >+tevent_debug: void (struct tevent_context *, enum tevent_debug_level, const char *, ...) >+tevent_fd_get_flags: uint16_t (struct tevent_fd *) >+tevent_fd_set_auto_close: void (struct tevent_fd *) >+tevent_fd_set_close_fn: void (struct tevent_fd *, tevent_fd_close_fn_t) >+tevent_fd_set_flags: void (struct tevent_fd *, uint16_t) >+tevent_get_trace_callback: void (struct tevent_context *, tevent_trace_callback_t *, void *) >+tevent_loop_allow_nesting: void (struct tevent_context *) >+tevent_loop_set_nesting_hook: void (struct tevent_context *, tevent_nesting_hook, void *) >+tevent_num_signals: size_t (void) >+tevent_queue_add: bool (struct tevent_queue *, struct tevent_context *, struct tevent_req *, tevent_queue_trigger_fn_t, void *) >+tevent_queue_add_entry: struct tevent_queue_entry *(struct tevent_queue *, struct tevent_context *, struct tevent_req *, tevent_queue_trigger_fn_t, void *) >+tevent_queue_add_optimize_empty: struct tevent_queue_entry *(struct tevent_queue *, struct tevent_context *, struct tevent_req *, tevent_queue_trigger_fn_t, void *) >+tevent_queue_length: size_t (struct tevent_queue *) >+tevent_queue_running: bool (struct tevent_queue *) >+tevent_queue_start: void (struct tevent_queue *) >+tevent_queue_stop: void (struct tevent_queue *) >+tevent_queue_wait_recv: bool (struct tevent_req *) >+tevent_queue_wait_send: struct tevent_req *(TALLOC_CTX *, struct tevent_context *, struct tevent_queue *) >+tevent_re_initialise: int (struct tevent_context *) >+tevent_register_backend: bool (const char *, const struct tevent_ops *) >+tevent_req_default_print: char *(struct tevent_req *, TALLOC_CTX *) >+tevent_req_defer_callback: void (struct tevent_req *, struct tevent_context *) >+tevent_req_is_error: bool (struct tevent_req *, enum tevent_req_state *, uint64_t *) >+tevent_req_is_in_progress: bool (struct tevent_req *) >+tevent_req_poll: bool (struct tevent_req *, struct tevent_context *) >+tevent_req_post: struct tevent_req *(struct tevent_req *, struct tevent_context *) >+tevent_req_print: char *(TALLOC_CTX *, struct tevent_req *) >+tevent_req_received: void (struct tevent_req *) >+tevent_req_reset_endtime: void (struct tevent_req *) >+tevent_req_set_callback: void (struct tevent_req *, tevent_req_fn, void *) >+tevent_req_set_cancel_fn: void (struct tevent_req *, tevent_req_cancel_fn) >+tevent_req_set_cleanup_fn: void (struct tevent_req *, tevent_req_cleanup_fn) >+tevent_req_set_endtime: bool (struct tevent_req *, struct tevent_context *, struct timeval) >+tevent_req_set_print_fn: void (struct tevent_req *, tevent_req_print_fn) >+tevent_sa_info_queue_count: size_t (void) >+tevent_set_abort_fn: void (void (*)(const char *)) >+tevent_set_debug: int (struct tevent_context *, void (*)(void *, enum tevent_debug_level, const char *, va_list), void *) >+tevent_set_debug_stderr: int (struct tevent_context *) >+tevent_set_default_backend: void (const char *) >+tevent_set_trace_callback: void (struct tevent_context *, tevent_trace_callback_t, void *) >+tevent_signal_support: bool (struct tevent_context *) >+tevent_thread_proxy_create: struct tevent_thread_proxy *(struct tevent_context *) >+tevent_thread_proxy_schedule: void (struct tevent_thread_proxy *, struct tevent_immediate **, tevent_immediate_handler_t, void *) >+tevent_threaded_context_create: struct tevent_threaded_context *(TALLOC_CTX *, struct tevent_context *) >+tevent_timeval_add: struct timeval (const struct timeval *, uint32_t, uint32_t) >+tevent_timeval_compare: int (const struct timeval *, const struct timeval *) >+tevent_timeval_current: struct timeval (void) >+tevent_timeval_current_ofs: struct timeval (uint32_t, uint32_t) >+tevent_timeval_is_zero: bool (const struct timeval *) >+tevent_timeval_set: struct timeval (uint32_t, uint32_t) >+tevent_timeval_until: struct timeval (const struct timeval *, const struct timeval *) >+tevent_timeval_zero: struct timeval (void) >+tevent_trace_point_callback: void (struct tevent_context *, enum tevent_trace_point) >+tevent_update_timer: void (struct tevent_timer *, struct timeval) >+tevent_wakeup_recv: bool (struct tevent_req *) >+tevent_wakeup_send: struct tevent_req *(TALLOC_CTX *, struct tevent_context *, struct timeval) >diff --git a/lib/tevent/wscript b/lib/tevent/wscript >index 31f7ee7..2c67f1f 100644 >--- a/lib/tevent/wscript >+++ b/lib/tevent/wscript >@@ -1,7 +1,7 @@ > #!/usr/bin/env python > > APPNAME = 'tevent' >-VERSION = '0.9.34' >+VERSION = '0.9.35' > > blddir = 'bin' > >-- >1.9.1 > > >From 054ba344c1c1c5f897c61341a1f1098c8d5ee034 Mon Sep 17 00:00:00 2001 >From: Stefan Metzmacher <metze@samba.org> >Date: Fri, 16 Feb 2018 16:47:57 +0100 >Subject: [PATCH 7/9] tevent: improve documentation of > tevent_queue_add_optimize_empty() > >Bug: https://bugzilla.samba.org/show_bug.cgi?id=13291 > >Signed-off-by: Stefan Metzmacher <metze@samba.org> >Reviewed-by: Volker Lendecke <vl@samba.org> >(cherry picked from commit 88d6703b89f9a7f847b6ec47d97569432927dcff) >--- > lib/tevent/tevent.h | 3 +++ > 1 file changed, 3 insertions(+) > >diff --git a/lib/tevent/tevent.h b/lib/tevent/tevent.h >index 7284a85..c17d4e1 100644 >--- a/lib/tevent/tevent.h >+++ b/lib/tevent/tevent.h >@@ -1611,6 +1611,9 @@ struct tevent_queue_entry *tevent_queue_add_entry( > * already called tevent_req_notify_callback(), tevent_req_error(), > * tevent_req_done() or a similar function. > * >+ * The trigger function has no chance to see the returned >+ * queue_entry in the optimized case. >+ * > * The request can be removed from the queue by calling talloc_free() > * (or a similar function) on the returned queue entry. > * >-- >1.9.1 > > >From 81a100b6d73fd47e1726fdbb6c432326c034dc0f Mon Sep 17 00:00:00 2001 >From: Stefan Metzmacher <metze@samba.org> >Date: Thu, 15 Feb 2018 14:47:25 +0100 >Subject: [PATCH 8/9] tevent: add tevent_queue_entry_untrigger() > >Bug: https://bugzilla.samba.org/show_bug.cgi?id=13291 > >Pair-Programmed-With: Volker Lendecke <vl@samba.org> > >Signed-off-by: Stefan Metzmacher <metze@samba.org> >Signed-off-by: Volker Lendecke <vl@samba.org> >(cherry picked from commit 5c6f31697a8edb03d36eece5c79581b952743b5b) >--- > lib/tevent/tevent.h | 22 ++++++++++++++++++++++ > lib/tevent/tevent_queue.c | 13 +++++++++++++ > 2 files changed, 35 insertions(+) > >diff --git a/lib/tevent/tevent.h b/lib/tevent/tevent.h >index c17d4e1..7bb9c61 100644 >--- a/lib/tevent/tevent.h >+++ b/lib/tevent/tevent.h >@@ -1644,6 +1644,28 @@ struct tevent_queue_entry *tevent_queue_add_optimize_empty( > void *private_data); > > /** >+ * @brief Untrigger an already triggered queue entry. >+ * >+ * If a trigger function detects that it needs to remain >+ * in the queue, it needs to call tevent_queue_stop() >+ * followed by tevent_queue_entry_untrigger(). >+ * >+ * @note In order to call tevent_queue_entry_untrigger() >+ * the queue must be already stopped and the given queue_entry >+ * must be the first one in the queue! Otherwise it calls abort(). >+ * >+ * @note You can't use this together with tevent_queue_add_optimize_empty() >+ * because the trigger function don't have access to the quene entry >+ * in the case of an empty queue. >+ * >+ * @param[in] queue_entry The queue entry to rearm. >+ * >+ * @see tevent_queue_add_entry() >+ * @see tevent_queue_stop() >+ */ >+void tevent_queue_entry_untrigger(struct tevent_queue_entry *entry); >+ >+/** > * @brief Start a tevent queue. > * > * The queue is started by default. >diff --git a/lib/tevent/tevent_queue.c b/lib/tevent/tevent_queue.c >index 5516c6c..9c3973b 100644 >--- a/lib/tevent/tevent_queue.c >+++ b/lib/tevent/tevent_queue.c >@@ -266,6 +266,19 @@ struct tevent_queue_entry *tevent_queue_add_optimize_empty( > trigger, private_data, true); > } > >+void tevent_queue_entry_untrigger(struct tevent_queue_entry *entry) >+{ >+ if (entry->queue->running) { >+ abort(); >+ } >+ >+ if (entry->queue->list != entry) { >+ abort(); >+ } >+ >+ entry->triggered = false; >+} >+ > void tevent_queue_start(struct tevent_queue *queue) > { > if (queue->running) { >-- >1.9.1 > > >From c3cb9db1056b5756f610694432330249759ccd45 Mon Sep 17 00:00:00 2001 >From: Stefan Metzmacher <metze@samba.org> >Date: Tue, 20 Feb 2018 13:54:49 +0100 >Subject: [PATCH 9/9] tevent: version 0.9.36 > >* improve documentation of tevent_queue_add_optimize_empty() >* add tevent_queue_entry_untrigger() > >Bug: https://bugzilla.samba.org/show_bug.cgi?id=13291 > >Signed-off-by: Stefan Metzmacher <metze@samba.org> >Reviewed-by: Volker Lendecke <vl@samba.org> >(cherry picked from commit f00c7cf9f5f325de0b754b127fcc0f07bea2d825) >--- > lib/tevent/ABI/tevent-0.9.36.sigs | 100 ++++++++++++++++++++++++++++++++++++++ > lib/tevent/wscript | 2 +- > 2 files changed, 101 insertions(+), 1 deletion(-) > create mode 100644 lib/tevent/ABI/tevent-0.9.36.sigs > >diff --git a/lib/tevent/ABI/tevent-0.9.36.sigs b/lib/tevent/ABI/tevent-0.9.36.sigs >new file mode 100644 >index 0000000..8a579c8 >--- /dev/null >+++ b/lib/tevent/ABI/tevent-0.9.36.sigs >@@ -0,0 +1,100 @@ >+_tevent_add_fd: struct tevent_fd *(struct tevent_context *, TALLOC_CTX *, int, uint16_t, tevent_fd_handler_t, void *, const char *, const char *) >+_tevent_add_signal: struct tevent_signal *(struct tevent_context *, TALLOC_CTX *, int, int, tevent_signal_handler_t, void *, const char *, const char *) >+_tevent_add_timer: struct tevent_timer *(struct tevent_context *, TALLOC_CTX *, struct timeval, tevent_timer_handler_t, void *, const char *, const char *) >+_tevent_create_immediate: struct tevent_immediate *(TALLOC_CTX *, const char *) >+_tevent_loop_once: int (struct tevent_context *, const char *) >+_tevent_loop_until: int (struct tevent_context *, bool (*)(void *), void *, const char *) >+_tevent_loop_wait: int (struct tevent_context *, const char *) >+_tevent_queue_create: struct tevent_queue *(TALLOC_CTX *, const char *, const char *) >+_tevent_req_callback_data: void *(struct tevent_req *) >+_tevent_req_cancel: bool (struct tevent_req *, const char *) >+_tevent_req_create: struct tevent_req *(TALLOC_CTX *, void *, size_t, const char *, const char *) >+_tevent_req_data: void *(struct tevent_req *) >+_tevent_req_done: void (struct tevent_req *, const char *) >+_tevent_req_error: bool (struct tevent_req *, uint64_t, const char *) >+_tevent_req_nomem: bool (const void *, struct tevent_req *, const char *) >+_tevent_req_notify_callback: void (struct tevent_req *, const char *) >+_tevent_req_oom: void (struct tevent_req *, const char *) >+_tevent_schedule_immediate: void (struct tevent_immediate *, struct tevent_context *, tevent_immediate_handler_t, void *, const char *, const char *) >+_tevent_threaded_schedule_immediate: void (struct tevent_threaded_context *, struct tevent_immediate *, tevent_immediate_handler_t, void *, const char *, const char *) >+tevent_backend_list: const char **(TALLOC_CTX *) >+tevent_cleanup_pending_signal_handlers: void (struct tevent_signal *) >+tevent_common_add_fd: struct tevent_fd *(struct tevent_context *, TALLOC_CTX *, int, uint16_t, tevent_fd_handler_t, void *, const char *, const char *) >+tevent_common_add_signal: struct tevent_signal *(struct tevent_context *, TALLOC_CTX *, int, int, tevent_signal_handler_t, void *, const char *, const char *) >+tevent_common_add_timer: struct tevent_timer *(struct tevent_context *, TALLOC_CTX *, struct timeval, tevent_timer_handler_t, void *, const char *, const char *) >+tevent_common_add_timer_v2: struct tevent_timer *(struct tevent_context *, TALLOC_CTX *, struct timeval, tevent_timer_handler_t, void *, const char *, const char *) >+tevent_common_check_signal: int (struct tevent_context *) >+tevent_common_context_destructor: int (struct tevent_context *) >+tevent_common_fd_destructor: int (struct tevent_fd *) >+tevent_common_fd_get_flags: uint16_t (struct tevent_fd *) >+tevent_common_fd_set_close_fn: void (struct tevent_fd *, tevent_fd_close_fn_t) >+tevent_common_fd_set_flags: void (struct tevent_fd *, uint16_t) >+tevent_common_have_events: bool (struct tevent_context *) >+tevent_common_loop_immediate: bool (struct tevent_context *) >+tevent_common_loop_timer_delay: struct timeval (struct tevent_context *) >+tevent_common_loop_wait: int (struct tevent_context *, const char *) >+tevent_common_schedule_immediate: void (struct tevent_immediate *, struct tevent_context *, tevent_immediate_handler_t, void *, const char *, const char *) >+tevent_common_threaded_activate_immediate: void (struct tevent_context *) >+tevent_common_wakeup: int (struct tevent_context *) >+tevent_common_wakeup_fd: int (int) >+tevent_common_wakeup_init: int (struct tevent_context *) >+tevent_context_init: struct tevent_context *(TALLOC_CTX *) >+tevent_context_init_byname: struct tevent_context *(TALLOC_CTX *, const char *) >+tevent_context_init_ops: struct tevent_context *(TALLOC_CTX *, const struct tevent_ops *, void *) >+tevent_debug: void (struct tevent_context *, enum tevent_debug_level, const char *, ...) >+tevent_fd_get_flags: uint16_t (struct tevent_fd *) >+tevent_fd_set_auto_close: void (struct tevent_fd *) >+tevent_fd_set_close_fn: void (struct tevent_fd *, tevent_fd_close_fn_t) >+tevent_fd_set_flags: void (struct tevent_fd *, uint16_t) >+tevent_get_trace_callback: void (struct tevent_context *, tevent_trace_callback_t *, void *) >+tevent_loop_allow_nesting: void (struct tevent_context *) >+tevent_loop_set_nesting_hook: void (struct tevent_context *, tevent_nesting_hook, void *) >+tevent_num_signals: size_t (void) >+tevent_queue_add: bool (struct tevent_queue *, struct tevent_context *, struct tevent_req *, tevent_queue_trigger_fn_t, void *) >+tevent_queue_add_entry: struct tevent_queue_entry *(struct tevent_queue *, struct tevent_context *, struct tevent_req *, tevent_queue_trigger_fn_t, void *) >+tevent_queue_add_optimize_empty: struct tevent_queue_entry *(struct tevent_queue *, struct tevent_context *, struct tevent_req *, tevent_queue_trigger_fn_t, void *) >+tevent_queue_entry_untrigger: void (struct tevent_queue_entry *) >+tevent_queue_length: size_t (struct tevent_queue *) >+tevent_queue_running: bool (struct tevent_queue *) >+tevent_queue_start: void (struct tevent_queue *) >+tevent_queue_stop: void (struct tevent_queue *) >+tevent_queue_wait_recv: bool (struct tevent_req *) >+tevent_queue_wait_send: struct tevent_req *(TALLOC_CTX *, struct tevent_context *, struct tevent_queue *) >+tevent_re_initialise: int (struct tevent_context *) >+tevent_register_backend: bool (const char *, const struct tevent_ops *) >+tevent_req_default_print: char *(struct tevent_req *, TALLOC_CTX *) >+tevent_req_defer_callback: void (struct tevent_req *, struct tevent_context *) >+tevent_req_is_error: bool (struct tevent_req *, enum tevent_req_state *, uint64_t *) >+tevent_req_is_in_progress: bool (struct tevent_req *) >+tevent_req_poll: bool (struct tevent_req *, struct tevent_context *) >+tevent_req_post: struct tevent_req *(struct tevent_req *, struct tevent_context *) >+tevent_req_print: char *(TALLOC_CTX *, struct tevent_req *) >+tevent_req_received: void (struct tevent_req *) >+tevent_req_reset_endtime: void (struct tevent_req *) >+tevent_req_set_callback: void (struct tevent_req *, tevent_req_fn, void *) >+tevent_req_set_cancel_fn: void (struct tevent_req *, tevent_req_cancel_fn) >+tevent_req_set_cleanup_fn: void (struct tevent_req *, tevent_req_cleanup_fn) >+tevent_req_set_endtime: bool (struct tevent_req *, struct tevent_context *, struct timeval) >+tevent_req_set_print_fn: void (struct tevent_req *, tevent_req_print_fn) >+tevent_sa_info_queue_count: size_t (void) >+tevent_set_abort_fn: void (void (*)(const char *)) >+tevent_set_debug: int (struct tevent_context *, void (*)(void *, enum tevent_debug_level, const char *, va_list), void *) >+tevent_set_debug_stderr: int (struct tevent_context *) >+tevent_set_default_backend: void (const char *) >+tevent_set_trace_callback: void (struct tevent_context *, tevent_trace_callback_t, void *) >+tevent_signal_support: bool (struct tevent_context *) >+tevent_thread_proxy_create: struct tevent_thread_proxy *(struct tevent_context *) >+tevent_thread_proxy_schedule: void (struct tevent_thread_proxy *, struct tevent_immediate **, tevent_immediate_handler_t, void *) >+tevent_threaded_context_create: struct tevent_threaded_context *(TALLOC_CTX *, struct tevent_context *) >+tevent_timeval_add: struct timeval (const struct timeval *, uint32_t, uint32_t) >+tevent_timeval_compare: int (const struct timeval *, const struct timeval *) >+tevent_timeval_current: struct timeval (void) >+tevent_timeval_current_ofs: struct timeval (uint32_t, uint32_t) >+tevent_timeval_is_zero: bool (const struct timeval *) >+tevent_timeval_set: struct timeval (uint32_t, uint32_t) >+tevent_timeval_until: struct timeval (const struct timeval *, const struct timeval *) >+tevent_timeval_zero: struct timeval (void) >+tevent_trace_point_callback: void (struct tevent_context *, enum tevent_trace_point) >+tevent_update_timer: void (struct tevent_timer *, struct timeval) >+tevent_wakeup_recv: bool (struct tevent_req *) >+tevent_wakeup_send: struct tevent_req *(TALLOC_CTX *, struct tevent_context *, struct timeval) >diff --git a/lib/tevent/wscript b/lib/tevent/wscript >index 2c67f1f..94d190f 100644 >--- a/lib/tevent/wscript >+++ b/lib/tevent/wscript >@@ -1,7 +1,7 @@ > #!/usr/bin/env python > > APPNAME = 'tevent' >-VERSION = '0.9.35' >+VERSION = '0.9.36' > > blddir = 'bin' > >-- >1.9.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
vl
:
review+
Actions:
View
Attachments on
bug 13291
:
13996
| 14150