-
Simon McVittie authored
This is a redo of commit d6a519f5 "pv-runtime: Add a mechanism to take custom CA certificates from the host" which aims to be more robust against host operating systems that might not have the Debian-compatible layout that we expect. This reverts commit 9e3d9c85. steamrt/tasks#416 Signed-off-by:
Simon McVittie <smcv@collabora.com>
Simon McVittie authoredThis is a redo of commit d6a519f5 "pv-runtime: Add a mechanism to take custom CA certificates from the host" which aims to be more robust against host operating systems that might not have the Debian-compatible layout that we expect. This reverts commit 9e3d9c85. steamrt/tasks#416 Signed-off-by:
Simon McVittie <smcv@collabora.com>
wrap-context.c 38.08 KiB
/*
* Copyright © 2014-2019 Red Hat, Inc
* Copyright © 2017-2024 Collabora Ltd.
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
#include "pressure-vessel/wrap-context.h"
#include "steam-runtime-tools/glib-backports-internal.h"
#include "steam-runtime-tools/utils-internal.h"
#include "pressure-vessel/exports.h"
#include "pressure-vessel/utils.h"
static Tristate
tristate_environment (const gchar *name)
{
const gchar *value = g_getenv (name);
if (g_strcmp0 (value, "1") == 0)
return TRISTATE_YES;
if (g_strcmp0 (value, "0") == 0)
return TRISTATE_NO;
if (value != NULL && value[0] != '\0')
g_warning ("Unrecognised value \"%s\" for $%s", value, name);
return TRISTATE_MAYBE;
}
static void
wrap_preload_module_clear (gpointer p)
{
WrapPreloadModule *self = p;
g_clear_pointer (&self->preload, g_free);
}
static void
pv_wrap_options_init (PvWrapOptions *self)
{
self->pass_fds = g_array_new (FALSE, FALSE, sizeof (int));
self->preload_modules = g_array_new (FALSE, FALSE,
sizeof (WrapPreloadModule));
g_array_set_clear_func (self->preload_modules, wrap_preload_module_clear);
/* Set defaults */
self->batch = FALSE;
self->copy_runtime = FALSE;
self->deterministic = FALSE;
self->devel = FALSE;
self->env_if_host = NULL;
self->filesystems = NULL;
self->gc_runtimes = TRUE;
self->generate_locales = TRUE;
self->graphics_provider = FALSE;
self->import_ca_certs = FALSE;
self->import_vulkan_layers = TRUE;
self->launcher = FALSE;
self->only_prepare = FALSE;
self->remove_game_overlay = FALSE;
self->runtime = NULL;
self->runtime_base = NULL;
self->share_home = TRISTATE_MAYBE;
self->share_pid = TRUE;
self->shell = PV_SHELL_NONE;
self->single_thread = FALSE;
self->systemd_scope = FALSE;