Lines Matching refs:_ctx
292 static int mcp_keypair_generate_run(struct doveadm_mail_cmd_context *_ctx,
300 (struct mcp_cmd_context *)_ctx;
320 res->error = p_strdup(_ctx->pool, error);
325 res->id = p_strdup(_ctx->pool, pubid);
351 res->id = p_strdup(_ctx->pool, hash);
364 res->error = p_strdup(_ctx->pool, error);
368 res->id = p_strdup(_ctx->pool, pubid);
402 res->name = p_strdup(_ctx->pool, info->vname);
404 res->error = p_strdup(_ctx->pool,
410 res->name = p_strdup(_ctx->pool, info->vname);
412 res->error = p_strdup(_ctx->pool, error);
418 res->name = p_strdup(_ctx->pool, info->vname);
439 static int cmd_mcp_keypair_generate_run(struct doveadm_mail_cmd_context *_ctx,
443 (struct mcp_cmd_context *)_ctx;
448 p_array_init(&result, _ctx->pool, 8);
450 if (mcp_keypair_generate_run(_ctx, user, &result) < 0)
451 _ctx->exit_code = EX_DATAERR;
464 _ctx->exit_code = EX_DATAERR;
607 static int cmd_mcp_key_list_run(struct doveadm_mail_cmd_context *_ctx,
611 (struct mcp_cmd_context *)_ctx;
614 iter_ctx.pool = _ctx->pool;
615 p_array_init(&iter_ctx.keys, _ctx->pool, 8);
673 static int cmd_mcp_key_export_run(struct doveadm_mail_cmd_context *_ctx,
677 (struct mcp_cmd_context *)_ctx;
690 static int cmd_mcp_key_password_run(struct doveadm_mail_cmd_context *_ctx,
694 (struct mcp_cmd_context *)_ctx;
695 bool cli = (_ctx->cctx->conn_type == DOVEADM_CONNECTION_TYPE_CLI);
712 _ctx->exit_code = EX_USAGE;
717 _ctx->exit_code = EX_USAGE;
721 p_strdup(_ctx->pool, t_askpass("Old password: "));
727 _ctx->exit_code = EX_USAGE;
732 _ctx->exit_code = EX_USAGE;
736 p_strdup(_ctx->pool, t_askpass("New password: "));
743 _ctx->exit_code = EX_USAGE;
753 _ctx->exit_code = EX_TEMPFAIL;
781 _ctx->exit_code = EX_TEMPFAIL;
785 raw_key->attr = p_strdup(_ctx->pool, attr);
786 raw_key->id = p_strdup(_ctx->pool, key_id);
787 raw_key->data = p_strdup(_ctx->pool, value.value);
810 _ctx->exit_code = EX_DATAERR;
825 _ctx->exit_code = EX_DATAERR;
842 _ctx->exit_code = EX_TEMPFAIL;
870 static bool cmd_mcp_keypair_generate_parse_arg(struct doveadm_mail_cmd_context *_ctx, int c)
873 (struct mcp_cmd_context *)_ctx;
892 static bool cmd_mcp_key_password_parse_arg(struct doveadm_mail_cmd_context *_ctx, int c)
895 (struct mcp_cmd_context *)_ctx;
908 ctx->old_password = p_strdup(_ctx->pool, optarg);
911 ctx->new_password = p_strdup(_ctx->pool, optarg);
919 static bool cmd_mcp_key_parse_arg(struct doveadm_mail_cmd_context *_ctx, int c)
922 (struct mcp_cmd_context *)_ctx;