Skip to content

Commit 0a441c0

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 f6fe7d6 commit 0a441c0

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
@@ -222,7 +222,8 @@ to them with ``--filesystem`` will have no effect::
222222

223223
The entire ``/run`` is not allowed and all subpaths of ``/run`` except
224224
``/run/flatpak, /run/host`` is allowed to be exposed via
225-
``--filesystem``.
225+
``--filesystem``. Additionally, if ``/var/run`` on host is a symlink to
226+
``../run``, exposing it or a subpath of it, is not allowed.
226227

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

0 commit comments

Comments
 (0)