Lines Matching defs:lookup_ctx

370 lookup_automntmap_step(struct setautomntent_lookup_ctx *lookup_ctx);
390 struct setautomntent_lookup_ctx *lookup_ctx,
397 te = tevent_add_timer(lookup_ctx->rctx->ev,
398 lookup_ctx->rctx, tv,
426 struct setautomntent_lookup_ctx *lookup_ctx;
553 lookup_ctx = talloc_zero(state->map, struct setautomntent_lookup_ctx);
554 if (!lookup_ctx) {
560 /* Steal the dom_ctx onto the lookup_ctx so it doesn't go out of scope if
563 lookup_ctx->dctx = talloc_steal(lookup_ctx, state->dctx);
564 lookup_ctx->actx = actx;
565 lookup_ctx->map = state->map;
566 lookup_ctx->rctx = client->rctx;
567 lookup_ctx->mapname =
568 talloc_strdup(lookup_ctx, state->mapname);
569 if (!lookup_ctx->mapname) {
575 ret = lookup_automntmap_step(lookup_ctx);
625 lookup_automntmap_update_cache(struct setautomntent_lookup_ctx *lookup_ctx);
628 lookup_automntmap_step(struct setautomntent_lookup_ctx *lookup_ctx)
631 struct sss_domain_info *dom = lookup_ctx->dctx->domain;
632 struct autofs_dom_ctx *dctx = lookup_ctx->dctx;
649 lookup_ctx->mapname, dom->name);
659 ret = sysdb_get_map_byname(dctx, dom, lookup_ctx->mapname,
667 lookup_ctx->mapname, dom->name);
678 ret = get_autofs_map(lookup_ctx->actx, lookup_ctx->mapname, &map);
690 set_autofs_map_lifetime(lookup_ctx->actx->neg_timeout, lookup_ctx, map);
695 ret = lookup_automntmap_update_cache(lookup_ctx);
720 set_autofs_map_lifetime(lookup_ctx->actx->neg_timeout, lookup_ctx, map);
727 "setautomntent done for map %s\n", lookup_ctx->mapname);
730 set_autofs_map_lifetime(dom->autofsmap_timeout, lookup_ctx, map);
734 map = talloc_zero(lookup_ctx->actx, struct autofs_map_ctx);
741 map->map_table = lookup_ctx->actx->maps;
743 map->mapname = talloc_strdup(map, lookup_ctx->mapname);
749 ret = set_autofs_map(lookup_ctx->actx, map);
755 set_autofs_map_lifetime(lookup_ctx->actx->neg_timeout, lookup_ctx, map);
766 lookup_automntmap_update_cache(struct setautomntent_lookup_ctx *lookup_ctx)
770 struct autofs_dom_ctx *dctx = lookup_ctx->dctx;
775 if (strcmp(lookup_ctx->mapname, "auto.master") != 0) {
802 req = sss_dp_get_autofs_send(lookup_ctx->cctx, lookup_ctx->rctx,
803 lookup_ctx->dctx->domain, true,
804 SSS_DP_AUTOFS, lookup_ctx->mapname);
812 cb_ctx = talloc_zero(lookup_ctx->dctx, struct dp_callback_ctx);
819 cb_ctx->ptr = lookup_ctx;
820 cb_ctx->cctx = lookup_ctx->dctx->cmd_ctx->cctx;
821 cb_ctx->mem_ctx = lookup_ctx->dctx;
828 ret = autofs_cmd_send_error(lookup_ctx->dctx->cmd_ctx, ret);
831 talloc_free(lookup_ctx->cctx);
834 autofs_cmd_done(lookup_ctx->dctx->cmd_ctx, ret);
842 struct setautomntent_lookup_ctx *lookup_ctx =
856 talloc_free(lookup_ctx->cctx);
866 struct setautomntent_lookup_ctx *lookup_ctx =
868 struct autofs_dom_ctx *dctx = lookup_ctx->dctx;
879 ret = lookup_automntmap_step(lookup_ctx);
882 autofs_setent_notify(lookup_ctx->map, ret);
893 ret = lookup_automntmap_step(lookup_ctx);
901 autofs_setent_notify(lookup_ctx->map, ret);