ndr_print_bool(ndr, "startup", r->startup);
ndr_print_winbindd_methods(ndr, "backend", r->backend);
ndr_print_ptr(ndr, "private_data", r->private_data);
+ ndr_print_ptr(ndr,
+ "backend_data.samr_pipes",
+ r->backend_data.samr_pipes);
ndr_print_string(ndr, "dcname", r->dcname);
ndr_print_sockaddr_storage(ndr, "dcaddr", &r->dcaddr);
ndr_print_time_t(ndr, "last_seq_check", r->last_seq_check);
struct winbindd_domain *domain = talloc_get_type_abort(
private_data, struct winbindd_domain);
/*
- * domain->private_data is the struct winbind_internal_pipes *
- * pointer so freeing it closes the cached pipes.
+ * Freeing samr_pipes closes the cached pipes.
*
* We can do a hard close because at the time of this commit
* we only use sychronous calls to external pipes. So we can't
* get nested event loops. Once we start to get async in
* winbind children, we need to check for outstanding calls
*/
- TALLOC_FREE(domain->private_data);
+ TALLOC_FREE(domain->backend_data.samr_pipes);
}
static NTSTATUS open_cached_internal_pipe_conn(
{
struct winbind_internal_pipes *internal_pipes = NULL;
- if (domain->private_data == NULL) {
+ if (domain->backend_data.samr_pipes == NULL) {
TALLOC_CTX *frame = talloc_stackframe();
NTSTATUS status;
return NT_STATUS_NO_MEMORY;
}
- domain->private_data = talloc_move(domain, &internal_pipes);
+ domain->backend_data.samr_pipes =
+ talloc_move(domain, &internal_pipes);
TALLOC_FREE(frame);
}
- internal_pipes = talloc_get_type_abort(
- domain->private_data, struct winbind_internal_pipes);
+ internal_pipes = domain->backend_data.samr_pipes;
if (samr_domain_hnd) {
*samr_domain_hnd = internal_pipes->samr_domain_hnd;
struct rpc_pipe_client *p,
NTSTATUS status)
{
- struct winbind_internal_pipes *internal_pipes = NULL;
struct dcerpc_binding_handle *b = p->binding_handle;
- internal_pipes = talloc_get_type_abort(
- domain->private_data, struct winbind_internal_pipes);
-
if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT) ||
NT_STATUS_EQUAL(status, NT_STATUS_IO_DEVICE_ERROR))
{
- TALLOC_FREE(internal_pipes);
- domain->private_data = NULL;
+ TALLOC_FREE(domain->backend_data.samr_pipes);
return true;
}
if (!dcerpc_binding_handle_is_connected(b)) {
- TALLOC_FREE(internal_pipes);
- domain->private_data = NULL;
+ TALLOC_FREE(domain->backend_data.samr_pipes);
return true;
}