* 29: added "authoritative" to response.data.auth
* 30: added "validation_level" and "info6" to response.data.auth
* 31: added "client_name" to the request
+ * 32: added "traceid" to the request
*/
-#define WINBIND_INTERFACE_VERSION 31
+#define WINBIND_INTERFACE_VERSION 32
/* Have to deal with time_t being 4 or 8 bytes due to structure alignment.
On a 64bit Linux box, we have to support a constant structure size
uint32_t flags; /* flags relevant *only* to a given request */
fstring domain_name; /* name of domain for which the request applies */
char client_name[32]; /* The client process sending the request */
+ uint64_t traceid; /* debug traceid is sent from parent to child */
union {
fstring winsreq; /* WINS request */
#include "nsswitch/wb_reqtrans.h"
#include "secrets.h"
#include "../lib/util/select.h"
+#include "winbindd_traceid.h"
#include "../libcli/security/security.h"
#include "system/select.h"
#include "messages.h"
return tevent_req_post(req, ev);
}
+ state->request->traceid = debug_traceid_get();
+
if (request->extra_data.data != NULL) {
state->request->extra_data.data = talloc_memdup(
state->request,
struct child_handler_state *state =
(struct child_handler_state *)private_data;
NTSTATUS status;
+ uint64_t parent_traceid;
/* fetch a request from the main daemon */
status = child_read_request(state->cli.sock, state->cli.request);
_exit(0);
}
+ /* read traceid from request */
+ parent_traceid = state->cli.request->traceid;
+ debug_traceid_set(parent_traceid);
+
DEBUG(4,("child daemon request %d\n",
(int)state->cli.request->cmd));
status = winbindd_reinit_after_fork(child, child->logfilename);
+ /* setup callbacks again, one of them is removed in reinit_after_fork */
+ if (lp_winbind_debug_traceid()) {
+ winbind_debug_traceid_setup(global_event_context());
+ }
+
nwritten = sys_write(state.cli.sock, &status, sizeof(status));
if (nwritten != sizeof(status)) {
DEBUG(1, ("fork_domain_child: Could not write status: "