Skip to content

Commit 4233a58

Browse files
committed
Add that /var/run or subpaths cannot be exposed when symlinked on host
Flatpak internally sets up a /var/run to /run symlink https://github.com/flatpak/flatpak/blob/fd1b7e444016d1b44bdab7cb5642b0ac83bd4b9e/common/flatpak-run.c#L2281. If it is symlinked on host too, when using `--filesystem=var/run/subpath` bwrap gets called twice to create the same symlink and the second one will fail. See also containers/bubblewrap@4109d59
1 parent 391c53a commit 4233a58

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/sandbox-permissions.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,8 @@ to them with ``--filesystem`` will have no effect::
216216

217217
The entire ``/run`` is not allowed and all subpaths of ``/run`` except
218218
``/run/flatpak, /run/host`` is allowed to be exposed via
219-
``--filesystem``.
219+
``--filesystem``. Additionally, if ``/var/run`` on host is a symlink to
220+
``../run``, exposing it or a subpath of it, is not allowed.
220221

221222
Additionally the following directories from host need to be explicitly
222223
requested with ``--filesystem`` and are not available with

0 commit comments

Comments
 (0)