Lines Matching refs:state

81     struct ipa_fetch_deskprofile_state *state;
90 req = tevent_req_create(mem_ctx, &state,
97 state->ev = ev;
98 state->be_ctx = be_ctx;
99 state->session_ctx = session_ctx;
100 state->sdap_ctx = session_ctx->sdap_ctx;
101 state->ipa_options = session_ctx->ipa_options;
102 state->search_bases = session_ctx->deskprofile_search_bases;
103 state->username = username;
104 state->hosts = talloc_zero(state, struct ipa_common_entries);
105 if (state->hosts == NULL) {
109 state->rules = talloc_zero(state, struct ipa_common_entries);
110 if (state->rules == NULL) {
115 if (state->search_bases == NULL) {
121 state->sdap_op = sdap_id_op_create(state,
122 state->sdap_ctx->conn->conn_cache);
123 if (state->sdap_op == NULL) {
131 request_interval = dp_opt_get_int(state->ipa_options,
136 if (state->session_ctx->no_rules_found &&
149 state->session_ctx->no_rules_found = false;
155 refresh_interval = dp_opt_get_int(state->ipa_options,
187 struct ipa_fetch_deskprofile_state *state;
190 state = tevent_req_data(req, struct ipa_fetch_deskprofile_state);
192 subreq = sdap_id_op_connect_send(state->sdap_op, state, &ret);
238 struct ipa_fetch_deskprofile_state *state;
241 state = tevent_req_data(req, struct ipa_fetch_deskprofile_state);
242 hostname = dp_opt_get_string(state->ipa_options, IPA_HOSTNAME);
244 subreq = ipa_host_info_send(state,
245 state->ev,
246 sdap_id_op_handle(state->sdap_op),
247 state->sdap_ctx->opts,
249 state->session_ctx->host_map,
250 state->session_ctx->hostgroup_map,
251 state->session_ctx->host_search_bases);
265 struct ipa_fetch_deskprofile_state *state;
269 state = tevent_req_data(req, struct ipa_fetch_deskprofile_state);
271 ret = ipa_host_info_recv(subreq, state,
272 &state->hosts->entry_count,
273 &state->hosts->entries,
274 &state->hosts->group_count,
275 &state->hosts->groups);
276 state->hosts->entry_subdir = DESKPROFILE_HOSTS_SUBDIR;
277 state->hosts->group_subdir = DESKPROFILE_HOSTGROUPS_SUBDIR;
283 ret = ipa_get_host_attrs(state->ipa_options,
284 state->hosts->entry_count,
285 state->hosts->entries,
286 &state->ipa_host);
292 subreq = ipa_deskprofile_get_config_send(state,
293 state->ev,
294 sdap_id_op_handle(state->sdap_op),
295 state->sdap_ctx->opts,
296 state->ipa_options);
313 struct ipa_fetch_deskprofile_state *state;
317 state = tevent_req_data(req, struct ipa_fetch_deskprofile_state);
319 ret = ipa_deskprofile_get_config_recv(subreq, state, &state->config);
325 ret = sysdb_store_custom(state->be_ctx->domain, IPA_DESKPROFILE_PRIORITY,
326 DESKPROFILE_CONFIG_SUBDIR, state->config);
332 subreq = ipa_deskprofile_rule_info_send(state,
333 state->ev,
334 sdap_id_op_handle(state->sdap_op),
335 state->sdap_ctx->opts,
336 state->search_bases,
337 state->ipa_host,
338 state->be_ctx->domain,
339 state->username);
356 struct ipa_fetch_deskprofile_state *state;
362 state = tevent_req_data(req, struct ipa_fetch_deskprofile_state);
365 state,
366 &state->rules->entry_count,
367 &state->rules->entries);
368 state->rules->entry_subdir = DESKPROFILE_RULES_SUBDIR;
380 ret = sdap_id_op_done(state->sdap_op, ret, &dp_error);
395 ret = ipa_common_purge_rules(state->be_ctx->domain,
408 ret = ipa_common_save_rules(state->be_ctx->domain,
409 state->hosts, NULL, state->rules,
410 &state->session_ctx->last_update);
487 struct ipa_pam_session_handler_state *state;
491 req = tevent_req_create(mem_ctx, &state,
498 state->pd = pd;
499 state->ev = params->ev;
500 state->be_ctx = params->be_ctx;
501 state->session_ctx = session_ctx;
508 state,
509 state->be_ctx->domain,
511 &state->shortname,
512 &state->domain,
513 &state->user_dir,
514 &state->uid,
515 &state->gid);
520 state->pd->pam_status = PAM_SESSION_ERR;
527 ret = ipa_deskprofile_rules_remove_user_dir(state->user_dir,
528 state->uid,
529 state->gid);
533 state->pd->pam_status = PAM_SESSION_ERR;
537 subreq = ipa_fetch_deskprofile_send(state, state->ev, state->be_ctx,
538 state->session_ctx, pd->user);
540 state->pd->pam_status = PAM_SESSION_ERR;
558 struct ipa_pam_session_handler_state *state;
563 state = tevent_req_data(req, struct ipa_pam_session_handler_state);
570 if (!state->session_ctx->no_rules_found) {
571 state->session_ctx->no_rules_found = true;
572 state->session_ctx->last_request = time(NULL);
574 state->pd->pam_status = PAM_SUCCESS;
580 state->pd->pam_status = PAM_SYSTEM_ERR;
584 state->session_ctx->last_request = time(NULL);
586 hostname = dp_opt_get_string(state->session_ctx->ipa_options, IPA_HOSTNAME);
587 ret = ipa_pam_session_handler_save_deskprofile_rules(state->be_ctx,
588 state->be_ctx->domain,
589 state->pd->user,
590 state->user_dir,
592 state->uid,
593 state->gid);
595 state->pd->pam_status = (ret == EOK) ? PAM_SUCCESS : PAM_SESSION_ERR;
607 struct ipa_pam_session_handler_state *state = NULL;
609 state = tevent_req_data(req, struct ipa_pam_session_handler_state);
613 *_data = talloc_steal(mem_ctx, state->pd);