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

pv-utils: Reserve more paths used internally by pressure-vessel

This avoids a failure mode seen on ClearLinux where including /var/cache
in XDG_DATA_DIRS would prevent pressure-vessel startup.

It also preemptively avoids the same situation potentially happening for
/run/host, /run/parent and similar paths.

steamrt/tasks#434

Resolves: https://github.com/ValveSoftware/steam-for-linux/issues/10789


Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent 7bb056dc
No related branches found
No related tags found
1 merge request!706pv-wrap: Improve handling of paths that cannot be exported
Pipeline #85152 passed
......@@ -48,6 +48,10 @@
* Return reserved directories above or below which user-specified "exports"
* are not allowed.
*
* For example, `/var/cache/ldconfig/ld.so.cache` needs to be controlled
* by the runtime, so any attempt to export `/var/cache/ldconfig`,
* `/var/cache` or `/var` needs to be ignored.
*
* Returns: (array zero-terminated=1) (transfer none): A NULL-terminated
* array of absolute paths
*/
......@@ -56,6 +60,8 @@ pv_get_reserved_paths (void)
{
static const char * const paths[] =
{
/* Reserved by Flatpak-derived code */
"/.flatpak-info",
/* Reserved by Flatpak-derived code */
"/app",
/* Conceptually part of /usr */
......@@ -72,6 +78,16 @@ pv_get_reserved_paths (void)
"/lib64",
/* Managed separately */
"/proc",
/* Reserved by Flatpak-derived code */
"/run/flatpak",
/* Used to mount the graphics provider if not the host */
"/run/gfx",
/* Used to mount the host filesystem */
"/run/host",
/* Used to mount the real host filesystem under FEX-Emu */
"/run/interpreter-host",
/* Used when running in a Flatpak subsandbox */
"/run/parent",
/* Sockets, /run/pressure-vessel/pv-from-host, etc. */
"/run/pressure-vessel",
/* Conceptually part of /usr */
......@@ -80,6 +96,8 @@ pv_get_reserved_paths (void)
"/usr",
/* Used to mount parts of the graphics stack provider */
"/var/pressure-vessel",
/* We need to manage this for compatibility with ClearLinux ld.so */
"/var/cache/ldconfig",
NULL
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment