Skip to content

Commit

Permalink
Allow sub-sandboxes to own MPRIS names
Browse files Browse the repository at this point in the history
We already allow normal apps to own MPRIS names but subsandboxes could not.

This allows them with the same dbus restrictions that they must be
prefixed by $app_id.Sandboxed.

This will be used by WebKitGTK.
  • Loading branch information
TingPing authored and alexlarsson committed Aug 16, 2022
1 parent ac792c1 commit 6540f85
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion common/flatpak-context.c
Original file line number Diff line number Diff line change
Expand Up @@ -2361,7 +2361,10 @@ flatpak_context_add_bus_filters (FlatpakContext *context,
flatpak_bwrap_add_arg_printf (bwrap, "--own=org.mpris.MediaPlayer2.%s.*", app_id);
}
else
flatpak_bwrap_add_arg_printf (bwrap, "--own=%s.Sandboxed.*", app_id);
{
flatpak_bwrap_add_arg_printf (bwrap, "--own=%s.Sandboxed.*", app_id);
flatpak_bwrap_add_arg_printf (bwrap, "--own=org.mpris.MediaPlayer2.%s.Sandboxed.*", app_id);
}
}

if (session_bus)
Expand Down
4 changes: 2 additions & 2 deletions doc/flatpak-run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -574,9 +574,9 @@ key=v1;v2;
<listitem><para>
Allow filtered access to the session dbus connection. This is the default, except when run with --sandbox.
</para><para>
Isandbox mode, even if you allow access to the session bus the sandbox cannot talk to or own
In sandbox mode, even if you allow access to the session bus the sandbox cannot talk to or own
the application ids (org.the.App.*) on the bus (unless explicitly added), only names in the
.Sandbox subset (org.the.App.Sandbox.*).
.Sandboxed subset (org.the.App.Sandboxed.* and org.mpris.MediaPlayer2.org.the.App.Sandboxed.*).
</para></listitem>
</varlistentry>

Expand Down

0 comments on commit 6540f85

Please sign in to comment.