This is a short term solution on the way to get rid of 'am_parent' completely.
metze
int32_t level_II_oplocks_open = 0;
struct kernel_oplocks *koplocks = NULL;
int32_t level_II_oplocks_open = 0;
struct kernel_oplocks *koplocks = NULL;
+struct smbd_parent_context *am_parent = NULL;
struct memcache *smbd_memcache_ctx = NULL;
bool exit_firsttime = true;
struct child_pid *children = 0;
struct memcache *smbd_memcache_ctx = NULL;
bool exit_firsttime = true;
struct child_pid *children = 0;
extern int32_t level_II_oplocks_open;
extern struct kernel_oplocks *koplocks;
extern int32_t level_II_oplocks_open;
extern struct kernel_oplocks *koplocks;
+struct smbd_parent_context;
+extern struct smbd_parent_context *am_parent;
extern struct memcache *smbd_memcache_ctx;
extern bool exit_firsttime;
struct child_pid;
extern struct memcache *smbd_memcache_ctx;
extern bool exit_firsttime;
struct child_pid;
NTSTATUS status = NT_STATUS_OK;
/* Child code ... */
NTSTATUS status = NT_STATUS_OK;
/* Child code ... */
+ am_parent = NULL;
+
+ /*
+ * Can't use TALLOC_FREE here. Nulling out the argument to it
+ * would overwrite memory we've just freed.
+ */
+ talloc_free(s->parent);
+ s = NULL;
set_my_unique_id(unique_id);
set_my_unique_id(unique_id);
close_low_fds(False); /* Don't close stderr */
}
close_low_fds(False); /* Don't close stderr */
}
- /*
- * Can't use TALLOC_FREE here. Nulling out the argument to it
- * would overwrite memory we've just freed.
- */
- talloc_free(s->parent);
- s = NULL;
-
status = reinit_after_fork(msg_ctx,
ev,
true);
status = reinit_after_fork(msg_ctx,
ev,
true);
parent->interactive = interactive;
parent->ev_ctx = ev_ctx;
parent->msg_ctx = msg_ctx;
parent->interactive = interactive;
parent->ev_ctx = ev_ctx;
parent->msg_ctx = msg_ctx;
se = tevent_add_signal(parent->ev_ctx,
parent,
se = tevent_add_signal(parent->ev_ctx,
parent,