Title: [295725] trunk/Source
- Revision
- 295725
- Author
- [email protected]
- Date
- 2022-06-22 02:20:20 -0700 (Wed, 22 Jun 2022)
Log Message
[GLIB] Change MPRIS bus name to be sandbox friendly
https://bugs.webkit.org/show_bug.cgi?id=241807
Reviewed by Philippe Normand.
When an application has an ID this changes the name to be
org.mpris.MediaPlayer2.$APP_ID.$INSTANCE_ID which is permitted
by default with flatpak and now with our bubblewrap sandbox.
Instead of the previous org.mpris.MediaPlayer2.$APP_ID-$INSTANCE_ID
which would be blocked by sandboxes unless they allowed an
overly broad org.mpris.MediaPlayer2.* permission.
* Source/WebCore/platform/audio/glib/MediaSessionGLib.cpp:
(WebCore::MediaSessionGLib::MediaSessionGLib):
Canonical link: https://commits.webkit.org/251730@main
Modified Paths
Diff
Modified: trunk/Source/WebCore/platform/audio/glib/MediaSessionGLib.cpp (295724 => 295725)
--- trunk/Source/WebCore/platform/audio/glib/MediaSessionGLib.cpp 2022-06-22 08:31:19 UTC (rev 295724)
+++ trunk/Source/WebCore/platform/audio/glib/MediaSessionGLib.cpp 2022-06-22 09:20:20 UTC (rev 295725)
@@ -222,7 +222,7 @@
}
const auto& applicationID = getApplicationID();
- m_instanceId = applicationID.isEmpty() ? makeString("org.mpris.MediaPlayer2.webkit.instance", getpid(), "-", identifier.toUInt64()) : makeString("org.mpris.MediaPlayer2.", applicationID.ascii().data(), "-", identifier.toUInt64());
+ m_instanceId = applicationID.isEmpty() ? makeString("org.mpris.MediaPlayer2.webkit.instance", getpid(), "-", identifier.toUInt64()) : makeString("org.mpris.MediaPlayer2.", applicationID.ascii().data(), ".", identifier.toUInt64());
m_ownerId = g_bus_own_name_on_connection(m_connection.get(), m_instanceId.ascii().data(), G_BUS_NAME_OWNER_FLAGS_NONE, nullptr, nullptr, this, nullptr);
}
Modified: trunk/Source/WebKit/UIProcess/Launcher/glib/XDGDBusProxy.cpp (295724 => 295725)
--- trunk/Source/WebKit/UIProcess/Launcher/glib/XDGDBusProxy.cpp 2022-06-22 08:31:19 UTC (rev 295724)
+++ trunk/Source/WebKit/UIProcess/Launcher/glib/XDGDBusProxy.cpp 2022-06-22 09:20:20 UTC (rev 295725)
@@ -145,7 +145,7 @@
#if ENABLE(MEDIA_SESSION)
if (auto* app = g_application_get_default()) {
if (const char* appID = g_application_get_application_id(app)) {
- auto mprisSessionID = makeString("--own=org.mpris.MediaPlayer2.", appID);
+ auto mprisSessionID = makeString("--own=org.mpris.MediaPlayer2.", appID, ".*");
proxyArgs.append(mprisSessionID.ascii().data());
}
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes