Skip to content
Snippets Groups Projects
Commit 6deea16f authored by Simon McVittie's avatar Simon McVittie
Browse files

runtime: Check consistency of arguments for Flatpak subsandbox


Flatpak subsandboxes don't have sufficiently powerful control over
the container to use bubblewrap or FlatpakExports directly.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent a3980849
No related branches found
No related tags found
1 merge request!203pressure-vessel: Add experimental code path for Flatpak sub-sandboxing
Pipeline #9501 passed
...@@ -4509,6 +4509,17 @@ pv_runtime_bind (PvRuntime *self, ...@@ -4509,6 +4509,17 @@ pv_runtime_bind (PvRuntime *self,
g_return_val_if_fail (container_env != NULL, FALSE); g_return_val_if_fail (container_env != NULL, FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE); g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
if (self->flags & PV_RUNTIME_FLAGS_FLATPAK_SUBSANDBOX)
{
g_return_val_if_fail (exports == NULL, FALSE);
g_return_val_if_fail (bwrap == NULL, FALSE);
}
else
{
g_return_val_if_fail (exports != NULL, FALSE);
g_return_val_if_fail (bwrap != NULL, FALSE);
}
if (bwrap != NULL if (bwrap != NULL
&& !bind_runtime_base (self, bwrap, container_env, error)) && !bind_runtime_base (self, bwrap, container_env, error))
return FALSE; return FALSE;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment