From f829ac7a52cb32a5466d1e25b3dc0df7b6fada2d Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@collabora.com>
Date: Wed, 7 Aug 2024 19:21:05 +0100
Subject: [PATCH] pv-utils: Reserve /var/run

If the user has /var/run as a directory (not a symlink), and if they
(unwisely) run with --filesystem=/var/run, then that would prevent us
from creating the symlink `/var/run -> ../run`.

steamrt/tasks#493

Signed-off-by: Simon McVittie <smcv@collabora.com>
---
 pressure-vessel/utils.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/pressure-vessel/utils.c b/pressure-vessel/utils.c
index b317442c3..b5506f27c 100644
--- a/pressure-vessel/utils.c
+++ b/pressure-vessel/utils.c
@@ -100,6 +100,8 @@ pv_get_reserved_paths (void)
     "/var/lib/dbus",
     /* Used to mount parts of the graphics stack provider */
     "/var/pressure-vessel",
+    /* Hard-coded to be a symlink to ../run, see bind_runtime_base() */
+    "/var/run",
     NULL
   };
 
-- 
GitLab