diff --git a/pressure-vessel/runtime.c b/pressure-vessel/runtime.c index 766862149b8bdc0deee288c7591a11a0d5a17076..87e61009b0da75292e02f01a5d7ea476ff33b3bc 100644 --- a/pressure-vessel/runtime.c +++ b/pressure-vessel/runtime.c @@ -260,7 +260,7 @@ pv_runtime_path_belongs_in_interpreter_root (PvRuntime *self, return TRUE; } - /* Special case: when running under Snap we have to use + /* Special case: when running under older Snap we have to use * /run/pressure-vessel/ldso because /var/pressure-vessel/ldso isn't * allowed. We don't expect to be running FEX-Emu under Snap, * so it doesn't matter that this would break FEX-Emu. */ diff --git a/pressure-vessel/utils.c b/pressure-vessel/utils.c index 021aa7c07ee663e36c032fc73708c6eadef724de..85025c32bcf1627e33a69a50b015d092ec0f40e5 100644 --- a/pressure-vessel/utils.c +++ b/pressure-vessel/utils.c @@ -134,10 +134,13 @@ pv_get_workarounds (SrtBwrapFlags bwrap_flags, if (bwrap_flags & SRT_BWRAP_FLAGS_SETUID) flags |= PV_WORKAROUND_FLAGS_BWRAP_SETUID; + /* Reinstate this if workarounds for snapd need to be used by default */ +#if 0 if (_srt_environ_getenv (envp, "SNAP") != NULL && _srt_environ_getenv (envp, "SNAP_NAME") != NULL && _srt_environ_getenv (envp, "SNAP_REVISION") != NULL) flags |= PV_WORKAROUND_FLAGS_SNAP; +#endif if (value != NULL) { diff --git a/pressure-vessel/utils.h b/pressure-vessel/utils.h index 3a3a0664a874d3572f359d8b0795d4d52ed4f6e4..61c01b3fbd095776454895dc8709c9dd0c4c4e02 100644 --- a/pressure-vessel/utils.h +++ b/pressure-vessel/utils.h @@ -50,7 +50,8 @@ typedef enum PV_WORKAROUND_FLAGS_NONE = 0 } PvWorkaroundFlags; -#define PV_WORKAROUND_FLAGS_SNAP \ +/* Workarounds for old snapd bugs, no longer used by default */ +#define PV_WORKAROUND_FLAGS_OLD_SNAP \ (PV_WORKAROUND_FLAGS_STEAMSNAP_356 \ | PV_WORKAROUND_FLAGS_STEAMSNAP_359 \ | PV_WORKAROUND_FLAGS_STEAMSNAP_369 \ @@ -59,7 +60,7 @@ typedef enum #define PV_WORKAROUND_FLAGS_ALL \ (PV_WORKAROUND_FLAGS_BWRAP_NO_PERMS \ | PV_WORKAROUND_FLAGS_BWRAP_SETUID \ - | PV_WORKAROUND_FLAGS_SNAP) + | PV_WORKAROUND_FLAGS_OLD_SNAP) PvWorkaroundFlags pv_get_workarounds (SrtBwrapFlags bwrap_flags, const char * const *envp); diff --git a/tests/pressure-vessel/utils.c b/tests/pressure-vessel/utils.c index 8d01c2d7ff56b89c574b866e93f1df40ec5826c7..aae69b3966109d2ec5db06f44ca5c22bff1c3277 100644 --- a/tests/pressure-vessel/utils.c +++ b/tests/pressure-vessel/utils.c @@ -726,7 +726,7 @@ test_workarounds (Fixture *f, g_assert_cmpint (pv_get_workarounds (SRT_BWRAP_FLAGS_HAS_PERMS, all_env), ==, PV_WORKAROUND_FLAGS_ALL); g_assert_cmpint (pv_get_workarounds (SRT_BWRAP_FLAGS_HAS_PERMS, snap_env), - ==, PV_WORKAROUND_FLAGS_SNAP); + ==, PV_WORKAROUND_FLAGS_NONE); g_assert_cmpint (pv_get_workarounds (SRT_BWRAP_FLAGS_HAS_PERMS, config_env), ==, (PV_WORKAROUND_FLAGS_BWRAP_NO_PERMS | PV_WORKAROUND_FLAGS_STEAMSNAP_356));