Lines Matching refs:state
44 struct cmd_lookupname_state *state;
49 state = talloc(result, struct cmd_lookupname_state);
50 if (state == NULL) goto failed;
51 state->ctx = result;
52 result->private_data = state;
54 state->name = talloc_asprintf(state, "%s\\%s", dom_name, name);
55 if (state->name == NULL) goto failed;
57 ctx = wb_sid2domain_send(state, service, service->primary_sid);
61 ctx->async.private_data = state;
71 struct cmd_lookupname_state *state =
76 state->ctx->status = wb_sid2domain_recv(ctx, &domain);
77 if (!composite_is_ok(state->ctx)) return;
79 ctx = wb_lsa_lookupnames_send(state, domain->libnet_ctx->lsa.pipe,
80 &domain->libnet_ctx->lsa.handle, 1, &state->name);
81 composite_continue(state->ctx, ctx, lookupname_recv_sids, state);
86 struct cmd_lookupname_state *state =
91 state->ctx->status = wb_lsa_lookupnames_recv(ctx, state, &sids);
92 if (!composite_is_ok(state->ctx)) return;
94 state->result = sids[0];
95 composite_done(state->ctx);
102 struct cmd_lookupname_state *state =
106 *sid = talloc_steal(mem_ctx, state->result);
108 talloc_free(state);