From 3ec0e7b483c5fd09babd59c668011269a2f396d8 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 15 Apr 2021 18:14:20 +0100 Subject: [PATCH] run: Use a constant path for the reference to per-app directories It's a bit simpler to get a per-app XDG_RUNTIME_DIR safely if we avoid putting this in there. Nothing relies on it being in the XDG_RUNTIME_DIR. Signed-off-by: Simon McVittie --- common/flatpak-run.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/flatpak-run.c b/common/flatpak-run.c index ef498e90..62029fd9 100644 --- a/common/flatpak-run.c +++ b/common/flatpak-run.c @@ -4270,11 +4270,11 @@ flatpak_run_app (FlatpakDecomposed *app_ref, if (per_app_dir_lock_path != NULL) { - g_autofree char *dest = g_strdup_printf ("/run/user/%d/.app-ref", getuid ()); + static const char lock[] = "/run/flatpak/per-app-dirs-ref"; flatpak_bwrap_add_args (bwrap, - "--ro-bind", per_app_dir_lock_path, dest, - "--lock-file", dest, + "--ro-bind", per_app_dir_lock_path, lock, + "--lock-file", lock, NULL); }