#include "ldb_wrap.h"
#include "lib/util/tfork.h"
#include "lib/messaging/irpc.h"
+#include "server_util.h"
#define min(a, b) (((a) < (b)) ? (a) : (b))
struct tevent_context *ev2;
struct task_server *task = NULL;
struct process_details pd = initial_process_details;
+ struct samba_tevent_trace_state *samba_tevent_trace_state = NULL;
int control_pipe[2];
t = tfork_create();
*/
ev2 = s4_event_context_init(NULL);
+ samba_tevent_trace_state = create_samba_tevent_trace_state(ev2);
+ if (samba_tevent_trace_state == NULL) {
+ TALLOC_FREE(ev);
+ TALLOC_FREE(ev2);
+ exit(127);
+ }
+
+ tevent_set_trace_callback(ev2,
+ samba_tevent_trace_callback,
+ samba_tevent_trace_state);
+
/* setup this new connection: process will bind to it's sockets etc
*
* While we can use ev for the child, which has been re-initialised
#include "lib/util/tfork.h"
#include "dsdb/samdb/ldb_modules/util.h"
#include "lib/util/server_id.h"
+#include "server_util.h"
#ifdef HAVE_PTHREAD
#include <pthread.h>
};
struct server_state *state = NULL;
struct tevent_signal *se = NULL;
+ struct samba_tevent_trace_state *samba_tevent_trace_state = NULL;
setproctitle("root process");
talloc_set_destructor(state->event_ctx, event_ctx_destructor);
+ samba_tevent_trace_state = create_samba_tevent_trace_state(state);
+ if (samba_tevent_trace_state == NULL) {
+ exit_daemon("Samba failed to setup tevent tracing state",
+ ENOTTY);
+ /*
+ * return is never reached but is here to satisfy static
+ * checkers
+ */
+ return 1;
+ }
+
+ tevent_set_trace_callback(state->event_ctx,
+ samba_tevent_trace_callback,
+ samba_tevent_trace_state);
+
if (opt_interactive) {
/* terminate when stdin goes away */
stdin_event_flags = TEVENT_FD_READ;
source='server.c',
subsystem_name='service',
deps='''events process_model service samba-hostconfig samba-util POPT_SAMBA
- popt gensec registry ntvfs share cluster COMMON_SCHANNEL SECRETS''',
+ popt gensec registry ntvfs share cluster COMMON_SCHANNEL SECRETS
+ samba_server_util''',
pyembed=True,
install_path='${SBINDIR}',
enabled=bld.AD_DC_BUILD_IS_ENABLED()
source='process_prefork.c',
subsystem='process_model',
init_function='process_model_prefork_init',
- deps='MESSAGING events ldbsamba cluster samba-sockets process_model messages_dgm',
+ deps='MESSAGING events ldbsamba cluster samba-sockets process_model messages_dgm samba_server_util',
internal_module=False
)