[SCM] Samba Shared Repository - branch v4-18-test updated
Jule Anger
janger at samba.org
Wed Jan 18 17:44:13 UTC 2023
The branch, v4-18-test has been updated
via fbba9a24796 VERSION: Disable GIT_SNAPSHOT for the Samba 4.18.0rc1 release.
via 0c9b310e239 WHATSNEW: Up to Samba 4.18.0rc1.
via f972b1ea061 ldb: version 2.7.0
via 3c6d28ebae2 tevent: version 0.14.0
via c5d5ebb60d4 tevent: Call depth tracking
via 07251f562c6 tevent: expose tevent_find_ops_byname() to callers
via ab49d9ee4ee tevent: allow the "standard" backend to be overloaded
via 147a317b7b9 tevent: remove solaris port backend
via 620ad8af466 tevent: remove unused register_backend() from python bindings
via eb05fe87bf7 tevent: remove unused tevent_liboop.c
via 77c828e1248 tevent: Fix trailing whitespaces in tevent.c
via f6a6d917e10 tevent: use samba_tevent_set_debug() in testsuite.c
via 96e4be0a799 lib/util: install a tevent_abort callback using smb_panic()
via a92150ed0ef s4:lib/events: let s4_event_context_init() use samba_tevent_context_init()
via eab796a4f91 tdb: version 1.4.8
via 5224ed98eeb talloc: version 2.4.0
from 7105554cb05 bootstrap: Update to Ubuntu 22.04 as base default OS
https://git.samba.org/?p=samba.git;a=shortlog;h=v4-18-test
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
VERSION | 6 +-
WHATSNEW.txt | 2 +-
lib/ldb/wscript | 2 +-
...oc-util-2.3.0.sigs => pytalloc-util-2.4.0.sigs} | 0
.../ABI/{talloc-2.3.5.sigs => talloc-2.4.0.sigs} | 0
lib/talloc/talloc.h | 2 +-
lib/talloc/wscript | 2 +-
lib/tdb/ABI/{tdb-1.3.17.sigs => tdb-1.4.8.sigs} | 0
lib/tdb/wscript | 2 +-
.../ABI/{tevent-0.13.0.sigs => tevent-0.14.0.sigs} | 5 +
lib/tevent/pytevent.c | 130 ----
lib/tevent/testsuite.c | 50 +-
lib/tevent/tevent.c | 15 +-
lib/tevent/tevent.h | 164 +++++
lib/tevent/tevent_debug.c | 38 +
lib/tevent/tevent_internal.h | 8 +-
lib/tevent/tevent_liboop.c | 292 --------
lib/tevent/tevent_port.c | 804 ---------------------
lib/tevent/tevent_queue.c | 2 +
lib/tevent/tevent_req.c | 10 +
lib/tevent/tevent_standard.c | 2 +-
lib/tevent/wscript | 2 +-
lib/util/tevent_debug.c | 18 +
source4/lib/events/tevent_s4.c | 2 +-
24 files changed, 294 insertions(+), 1264 deletions(-)
copy lib/talloc/ABI/{pytalloc-util-2.3.0.sigs => pytalloc-util-2.4.0.sigs} (100%)
copy lib/talloc/ABI/{talloc-2.3.5.sigs => talloc-2.4.0.sigs} (100%)
copy lib/tdb/ABI/{tdb-1.3.17.sigs => tdb-1.4.8.sigs} (100%)
copy lib/tevent/ABI/{tevent-0.13.0.sigs => tevent-0.14.0.sigs} (97%)
delete mode 100644 lib/tevent/tevent_liboop.c
delete mode 100644 lib/tevent/tevent_port.c
Changeset truncated at 500 lines:
diff --git a/VERSION b/VERSION
index ba39cbcaacb..97e56c10a35 100644
--- a/VERSION
+++ b/VERSION
@@ -77,7 +77,7 @@ SAMBA_VERSION_BETA_RELEASE=
# e.g. SAMBA_VERSION_PRE_RELEASE=1 #
# -> "2.2.9pre1" #
########################################################
-SAMBA_VERSION_PRE_RELEASE=1
+SAMBA_VERSION_PRE_RELEASE=
########################################################
# For 'rc' releases the version will be #
@@ -87,7 +87,7 @@ SAMBA_VERSION_PRE_RELEASE=1
# e.g. SAMBA_VERSION_RC_RELEASE=1 #
# -> "3.0.0rc1" #
########################################################
-SAMBA_VERSION_RC_RELEASE=
+SAMBA_VERSION_RC_RELEASE=1
########################################################
# To mark SVN snapshots this should be set to 'yes' #
@@ -99,7 +99,7 @@ SAMBA_VERSION_RC_RELEASE=
# e.g. SAMBA_VERSION_IS_SVN_SNAPSHOT=yes #
# -> "3.0.0-SVN-build-199" #
########################################################
-SAMBA_VERSION_IS_GIT_SNAPSHOT=yes
+SAMBA_VERSION_IS_GIT_SNAPSHOT=no
########################################################
# This is for specifying a release nickname #
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 4a40b7147dd..eb71f69fadc 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,7 +1,7 @@
Release Announcements
=====================
-This is the first pre release of Samba 4.18. This is *not*
+This is the first release candidate of Samba 4.18. This is *not*
intended for production environments and is designed for testing
purposes only. Please report any defects via the Samba bug reporting
system at https://bugzilla.samba.org/.
diff --git a/lib/ldb/wscript b/lib/ldb/wscript
index 2dfac46403f..95aee9be6d3 100644
--- a/lib/ldb/wscript
+++ b/lib/ldb/wscript
@@ -1,7 +1,7 @@
#!/usr/bin/env python
APPNAME = 'ldb'
-# For Samba 4.18.x
+# For Samba 4.18.x !
VERSION = '2.7.0'
import sys, os
diff --git a/lib/talloc/ABI/pytalloc-util-2.3.0.sigs b/lib/talloc/ABI/pytalloc-util-2.4.0.sigs
similarity index 100%
copy from lib/talloc/ABI/pytalloc-util-2.3.0.sigs
copy to lib/talloc/ABI/pytalloc-util-2.4.0.sigs
diff --git a/lib/talloc/ABI/talloc-2.3.5.sigs b/lib/talloc/ABI/talloc-2.4.0.sigs
similarity index 100%
copy from lib/talloc/ABI/talloc-2.3.5.sigs
copy to lib/talloc/ABI/talloc-2.4.0.sigs
diff --git a/lib/talloc/talloc.h b/lib/talloc/talloc.h
index dba9a3e9db9..c466c36406b 100644
--- a/lib/talloc/talloc.h
+++ b/lib/talloc/talloc.h
@@ -56,7 +56,7 @@ extern "C" {
*/
#define TALLOC_VERSION_MAJOR 2
-#define TALLOC_VERSION_MINOR 3
+#define TALLOC_VERSION_MINOR 4
_PUBLIC_ int talloc_version_major(void);
_PUBLIC_ int talloc_version_minor(void);
diff --git a/lib/talloc/wscript b/lib/talloc/wscript
index 5a9779cf2d8..1c54a7c653a 100644
--- a/lib/talloc/wscript
+++ b/lib/talloc/wscript
@@ -1,7 +1,7 @@
#!/usr/bin/env python
APPNAME = 'talloc'
-VERSION = '2.3.5'
+VERSION = '2.4.0'
import os
import sys
diff --git a/lib/tdb/ABI/tdb-1.3.17.sigs b/lib/tdb/ABI/tdb-1.4.8.sigs
similarity index 100%
copy from lib/tdb/ABI/tdb-1.3.17.sigs
copy to lib/tdb/ABI/tdb-1.4.8.sigs
diff --git a/lib/tdb/wscript b/lib/tdb/wscript
index 71ada311dc2..9c9bf77f115 100644
--- a/lib/tdb/wscript
+++ b/lib/tdb/wscript
@@ -1,7 +1,7 @@
#!/usr/bin/env python
APPNAME = 'tdb'
-VERSION = '1.4.7'
+VERSION = '1.4.8'
import sys, os
diff --git a/lib/tevent/ABI/tevent-0.13.0.sigs b/lib/tevent/ABI/tevent-0.14.0.sigs
similarity index 97%
copy from lib/tevent/ABI/tevent-0.13.0.sigs
copy to lib/tevent/ABI/tevent-0.14.0.sigs
index 68722a0e62f..f2a11902a80 100644
--- a/lib/tevent/ABI/tevent-0.13.0.sigs
+++ b/lib/tevent/ABI/tevent-0.14.0.sigs
@@ -60,6 +60,7 @@ 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_fd_set_tag: void (struct tevent_fd *, uint64_t)
+tevent_find_ops_byname: const struct tevent_ops *(const char *)
tevent_get_trace_callback: void (struct tevent_context *, tevent_trace_callback_t *, void *)
tevent_get_trace_fd_callback: void (struct tevent_context *, tevent_trace_fd_callback_t *, void *)
tevent_get_trace_immediate_callback: void (struct tevent_context *, tevent_trace_immediate_callback_t *, void *)
@@ -128,6 +129,10 @@ tevent_set_trace_timer_callback: void (struct tevent_context *, tevent_trace_tim
tevent_signal_get_tag: uint64_t (const struct tevent_signal *)
tevent_signal_set_tag: void (struct tevent_signal *, uint64_t)
tevent_signal_support: bool (struct tevent_context *)
+tevent_thread_call_depth_activate: void (size_t *)
+tevent_thread_call_depth_deactivate: void (void)
+tevent_thread_call_depth_reset_from_req: void (struct tevent_req *)
+tevent_thread_call_depth_start: void (struct tevent_req *)
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 *)
diff --git a/lib/tevent/pytevent.c b/lib/tevent/pytevent.c
index 62dfe2419ff..6e8c8b72e1c 100644
--- a/lib/tevent/pytevent.c
+++ b/lib/tevent/pytevent.c
@@ -73,134 +73,6 @@ static PyTypeObject TeventSignal_Type;
static PyTypeObject TeventTimer_Type;
static PyTypeObject TeventFd_Type;
-static int py_context_init(struct tevent_context *ev)
-{
- /* FIXME */
- return 0;
-}
-
-static struct tevent_fd *py_add_fd(struct tevent_context *ev,
- TALLOC_CTX *mem_ctx,
- int fd, uint16_t flags,
- tevent_fd_handler_t handler,
- void *private_data,
- const char *handler_name,
- const char *location)
-{
- /* FIXME */
- return NULL;
-}
-
-static void py_set_fd_close_fn(struct tevent_fd *fde,
- tevent_fd_close_fn_t close_fn)
-{
- /* FIXME */
-}
-
-static uint16_t py_get_fd_flags(struct tevent_fd *fde)
-{
- /* FIXME */
- return 0;
-}
-
-static void py_set_fd_flags(struct tevent_fd *fde, uint16_t flags)
-{
- /* FIXME */
-}
-
-/* timed_event functions */
-static struct tevent_timer *py_add_timer(struct tevent_context *ev,
- TALLOC_CTX *mem_ctx,
- struct timeval next_event,
- tevent_timer_handler_t handler,
- void *private_data,
- const char *handler_name,
- const char *location)
-{
- /* FIXME */
- return NULL;
-}
-
-/* immediate event functions */
-static void py_schedule_immediate(struct tevent_immediate *im,
- struct tevent_context *ev,
- tevent_immediate_handler_t handler,
- void *private_data,
- const char *handler_name,
- const char *location)
-{
- /* FIXME */
-}
-
-/* signal functions */
-static struct tevent_signal *py_add_signal(struct tevent_context *ev,
- TALLOC_CTX *mem_ctx,
- int signum, int sa_flags,
- tevent_signal_handler_t handler,
- void *private_data,
- const char *handler_name,
- const char *location)
-{
- /* FIXME */
- return NULL;
-}
-
-/* loop functions */
-static int py_loop_once(struct tevent_context *ev, const char *location)
-{
- /* FIXME */
- return 0;
-}
-
-static int py_loop_wait(struct tevent_context *ev, const char *location)
-{
- /* FIXME */
- return 0;
-}
-
-const static struct tevent_ops py_tevent_ops = {
- .context_init = py_context_init,
- .add_fd = py_add_fd,
- .set_fd_close_fn = py_set_fd_close_fn,
- .get_fd_flags = py_get_fd_flags,
- .set_fd_flags = py_set_fd_flags,
- .add_timer = py_add_timer,
- .schedule_immediate = py_schedule_immediate,
- .add_signal = py_add_signal,
- .loop_wait = py_loop_wait,
- .loop_once = py_loop_once,
-};
-
-static PyObject *py_register_backend(PyObject *self, PyObject *args)
-{
- PyObject *name, *py_backend;
-
- if (!PyArg_ParseTuple(args, "O", &py_backend))
- return NULL;
-
- name = PyObject_GetAttrString(py_backend, "name");
- if (name == NULL) {
- PyErr_SetNone(PyExc_AttributeError);
- return NULL;
- }
-
- if (!PyUnicode_Check(name)) {
- PyErr_SetNone(PyExc_TypeError);
- Py_DECREF(name);
- return NULL;
- }
-
- if (!tevent_register_backend(PyUnicode_AsUTF8(name), &py_tevent_ops)) { /* FIXME: What to do with backend */
- PyErr_SetNone(PyExc_RuntimeError);
- Py_DECREF(name);
- return NULL;
- }
-
- Py_DECREF(name);
-
- Py_RETURN_NONE;
-}
-
static PyObject *py_tevent_context_reinitialise(TeventContext_Object *self,
PyObject *Py_UNUSED(ignored))
{
@@ -855,8 +727,6 @@ err:
}
static PyMethodDef tevent_methods[] = {
- { "register_backend", (PyCFunction)py_register_backend, METH_VARARGS,
- "register_backend(backend)" },
{ "set_default_backend", (PyCFunction)py_set_default_backend,
METH_VARARGS, "set_default_backend(backend)" },
{ "backend_list", (PyCFunction)py_backend_list,
diff --git a/lib/tevent/testsuite.c b/lib/tevent/testsuite.c
index 8894e445203..492b8807996 100644
--- a/lib/tevent/testsuite.c
+++ b/lib/tevent/testsuite.c
@@ -37,6 +37,32 @@
#include <assert.h>
#endif
+static struct tevent_context *
+test_tevent_context_init(TALLOC_CTX *mem_ctx)
+{
+ struct tevent_context *ev = NULL;
+
+ ev = tevent_context_init(mem_ctx);
+ if (ev != NULL) {
+ samba_tevent_set_debug(ev, "<default>");
+ }
+
+ return ev;
+}
+
+static struct tevent_context *
+test_tevent_context_init_byname(TALLOC_CTX *mem_ctx, const char *name)
+{
+ struct tevent_context *ev = NULL;
+
+ ev = tevent_context_init_byname(mem_ctx, name);
+ if (ev != NULL) {
+ samba_tevent_set_debug(ev, name);
+ }
+
+ return ev;
+}
+
static int fde_count;
static void do_read(int fd, void *buf, size_t count)
@@ -143,7 +169,7 @@ static bool test_event_context(struct torture_context *test,
struct timeval t;
int ret;
- ev_ctx = tevent_context_init_byname(test, backend);
+ ev_ctx = test_tevent_context_init_byname(test, backend);
if (ev_ctx == NULL) {
torture_comment(test, "event backend '%s' not supported\n", backend);
return true;
@@ -383,7 +409,7 @@ static bool test_event_fd1(struct torture_context *tctx,
state.tctx = tctx;
state.backend = (const char *)test_data;
- state.ev = tevent_context_init_byname(tctx, state.backend);
+ state.ev = test_tevent_context_init_byname(tctx, state.backend);
if (state.ev == NULL) {
torture_skip(tctx, talloc_asprintf(tctx,
"event backend '%s' not supported\n",
@@ -391,7 +417,6 @@ static bool test_event_fd1(struct torture_context *tctx,
return true;
}
- tevent_set_debug_stderr(state.ev);
torture_comment(tctx, "backend '%s' - %s\n",
state.backend, __FUNCTION__);
@@ -623,7 +648,7 @@ static bool test_event_fd2(struct torture_context *tctx,
state.tctx = tctx;
state.backend = (const char *)test_data;
- state.ev = tevent_context_init_byname(tctx, state.backend);
+ state.ev = test_tevent_context_init_byname(tctx, state.backend);
if (state.ev == NULL) {
torture_skip(tctx, talloc_asprintf(tctx,
"event backend '%s' not supported\n",
@@ -631,7 +656,6 @@ static bool test_event_fd2(struct torture_context *tctx,
return true;
}
- tevent_set_debug_stderr(state.ev);
torture_comment(tctx, "backend '%s' - %s\n",
state.backend, __FUNCTION__);
@@ -956,7 +980,7 @@ static bool test_wrapper(struct torture_context *tctx,
bool ok = false;
bool ret2;
- ev = tevent_context_init_byname(tctx, backend);
+ ev = test_tevent_context_init_byname(tctx, backend);
if (ev == NULL) {
torture_skip(tctx, talloc_asprintf(tctx,
"event backend '%s' not supported\n",
@@ -964,7 +988,6 @@ static bool test_wrapper(struct torture_context *tctx,
return true;
}
- tevent_set_debug_stderr(ev);
torture_comment(tctx, "tevent backend '%s'\n", backend);
wrap_ev = tevent_context_wrapper_create(
@@ -1130,7 +1153,7 @@ static bool test_free_wrapper(struct torture_context *tctx,
int ret;
bool ok = false;
- ev = tevent_context_init_byname(frame, backend);
+ ev = test_tevent_context_init_byname(frame, backend);
if (ev == NULL) {
torture_skip(tctx, talloc_asprintf(tctx,
"event backend '%s' not supported\n",
@@ -1138,7 +1161,6 @@ static bool test_free_wrapper(struct torture_context *tctx,
return true;
}
- tevent_set_debug_stderr(ev);
torture_comment(tctx, "tevent backend '%s'\n", backend);
wrap_ev = tevent_context_wrapper_create(
@@ -1294,7 +1316,7 @@ static bool test_event_context_threaded(struct torture_context *test,
int ret;
char c = 0;
- ev = tevent_context_init_byname(test, "poll_mt");
+ ev = test_tevent_context_init_byname(test, "poll_mt");
torture_assert(test, ev != NULL, "poll_mt not supported");
tevent_set_trace_callback(ev, test_event_threaded_trace, NULL);
@@ -1411,11 +1433,10 @@ static bool test_multi_tevent_threaded(struct torture_context *test,
thread_test_ctx = test;
thread_counter = 0;
- master_ev = tevent_context_init(NULL);
+ master_ev = test_tevent_context_init(NULL);
if (master_ev == NULL) {
return false;
}
- tevent_set_debug_stderr(master_ev);
tp = tevent_thread_proxy_create(master_ev);
if (tp == NULL) {
@@ -1612,11 +1633,10 @@ static bool test_multi_tevent_threaded_1(struct torture_context *test,
thread_test_ctx = test;
thread_counter = 0;
- master_ev = tevent_context_init(NULL);
+ master_ev = test_tevent_context_init(NULL);
if (master_ev == NULL) {
return false;
}
- tevent_set_debug_stderr(master_ev);
master_tp = tevent_thread_proxy_create(master_ev);
if (master_tp == NULL) {
@@ -1714,7 +1734,7 @@ static bool test_multi_tevent_threaded_2(struct torture_context *test,
thread_test_ctx = test;
thread_counter = 0;
- ev = tevent_context_init(test);
+ ev = test_tevent_context_init(test);
torture_assert(test, ev != NULL, "tevent_context_init failed");
/*
diff --git a/lib/tevent/tevent.c b/lib/tevent/tevent.c
index 262fdaa22ed..698e467c88c 100644
--- a/lib/tevent/tevent.c
+++ b/lib/tevent/tevent.c
@@ -1,4 +1,4 @@
-/*
+/*
Unix SMB/CIFS implementation.
main select loop and event handling
Copyright (C) Andrew Tridgell 2003
@@ -130,14 +130,12 @@ static void tevent_backend_init(void)
tevent_poll_mt_init();
#if defined(HAVE_EPOLL)
tevent_epoll_init();
-#elif defined(HAVE_SOLARIS_PORTS)
- tevent_port_init();
#endif
tevent_standard_init();
}
-_PRIVATE_ const struct tevent_ops *tevent_find_ops_byname(const char *name)
+const struct tevent_ops *tevent_find_ops_byname(const char *name)
{
struct tevent_ops_list *e;
@@ -763,7 +761,7 @@ void tevent_loop_set_nesting_hook(struct tevent_context *ev,
tevent_nesting_hook hook,
void *private_data)
{
- if (ev->nesting.hook_fn &&
+ if (ev->nesting.hook_fn &&
(ev->nesting.hook_fn != hook ||
ev->nesting.hook_private != private_data)) {
/* the way the nesting hook code is currently written
@@ -789,7 +787,7 @@ static void tevent_abort_nesting(struct tevent_context *ev, const char *location
}
/*
- do a single event loop using the events defined in ev
+ do a single event loop using the events defined in ev
*/
int _tevent_loop_once(struct tevent_context *ev, const char *location)
{
@@ -825,6 +823,9 @@ int _tevent_loop_once(struct tevent_context *ev, const char *location)
ret = ev->ops->loop_once(ev, location);
tevent_trace_point_callback(ev, TEVENT_TRACE_AFTER_LOOP_ONCE);
+ /* New event (and request) will always start with call depth 0. */
+ tevent_thread_call_depth_set(0);
+
if (ev->nesting.level > 0) {
if (ev->nesting.hook_fn) {
int ret2;
@@ -971,7 +972,7 @@ int _tevent_loop_wait(struct tevent_context *ev, const char *location)
/*
re-initialise a tevent context. This leaves you with the same
event context, but all events are wiped and the structure is
- re-initialised. This is most useful after a fork()
+ re-initialised. This is most useful after a fork()
--
Samba Shared Repository
More information about the samba-cvs
mailing list