mirror of
https://github.com/flatpak/flatpak.git
synced 2026-10-21 15:15:34 -04:00
run: Mount /run/user/$uid/app/$appid in the sandbox
This directory is shared between all instances of the app, as well as the host. In many ways this is similar to the ~/.var/app/$appid directory, but the directory is guaranteed to not be persistent (/run is on tmpfs), local to the host (not NFS), as well as nice support for features like locks and mmap (due to being tmpfs).
This commit is contained in:
1 parent
54c5f9a59e
commit
24c691f645
1 file changed
+14
@@ -1895,6 +1895,20 @@ flatpak_run_add_environment_args (GPtrArray *argv_array,
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
g_autofree char *run_user_app_dst = g_strdup_printf ("/run/user/%d/app/%s", getuid (), app_id);
|
||||
g_autofree char *run_user_app_src = g_build_filename (g_get_user_runtime_dir (), "app", app_id, NULL);
|
||||
|
||||
if (glnx_shutil_mkdir_p_at (AT_FDCWD,
|
||||
run_user_app_src,
|
||||
0700,
|
||||
NULL,
|
||||
NULL))
|
||||
add_args (argv_array,
|
||||
"--bind", run_user_app_src, run_user_app_dst,
|
||||
NULL);
|
||||
}
|
||||
|
||||
g_hash_table_iter_init (&iter, context->filesystems);
|
||||
while (g_hash_table_iter_next (&iter, &key, &value))
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user