WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
190619
[GTK][WPE] Fix xdg-desktop-portal permissions from a sandbox
https://bugs.webkit.org/show_bug.cgi?id=190619
Summary
[GTK][WPE] Fix xdg-desktop-portal permissions from a sandbox
Patrick Griffis
Reported
2018-10-16 08:36:56 PDT
[GTK][WPE] Fix xdg-desktop-portal permissions from a sandbox
Attachments
[GTK][WPE] Fix xdg-desktop-portal permissions from a sandbox
(7.97 KB, patch)
2018-10-16 08:37 PDT
,
Patrick Griffis
no flags
Details
Formatted Diff
Diff
[GTK][WPE] Fix xdg-desktop-portal permissions from a sandbox
(7.72 KB, patch)
2018-10-16 11:29 PDT
,
Patrick Griffis
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Patrick Griffis
Comment 1
2018-10-16 08:37:41 PDT
Created
attachment 352457
[details]
[GTK][WPE] Fix xdg-desktop-portal permissions from a sandbox
Michael Catanzaro
Comment 2
2018-10-16 09:18:04 PDT
Comment on
attachment 352457
[details]
[GTK][WPE] Fix xdg-desktop-portal permissions from a sandbox View in context:
https://bugs.webkit.org/attachment.cgi?id=352457&action=review
> Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp:43 > +static int createSealedMemFdWithData(const char *name, gconstpointer data, size_t size)
const char* name
> Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp:129 > + void setPermissions(Vector<CString>& permissions)
Vector<CString>&&
> Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp:132 > + m_permissions = permissions;
WTFMove(permissions)
> Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp:651 > + g_warning("GApplication is required for portal access");
This warning message should be a bit more detailed, so users understand what is actually wrong: "GApplication is required for xdg-desktop-portal access in the WebKit sandbox. Actions that require xdg-desktop-portal will be broken. To fix this, create a GApplication." or something along those lines.
> Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp:738 > + // xdg-desktop-portal defaults to assuming you are host application with > + // full permissions unless it can identify you as a snap or flatpak. > + // The easiest method is for us to pretend to be a flatpak and if that > + // fails just blocking portals entirely as it just becomes a sandbox escape.
Is Alex OK with supporting this hackery? It's OK for now, but seems like not a great long-term solution.
Michael Catanzaro
Comment 3
2018-10-16 09:19:14 PDT
Comment on
attachment 352457
[details]
[GTK][WPE] Fix xdg-desktop-portal permissions from a sandbox View in context:
https://bugs.webkit.org/attachment.cgi?id=352457&action=review
> Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp:805 > + proxy.setPermissions(permissions);
WTFMove() here as well. Basically, whenever you are sinking a value into a caller such that the callee doesn't need it anymore, consider WTFMove() and &&.
Patrick Griffis
Comment 4
2018-10-16 11:29:18 PDT
Created
attachment 352478
[details]
[GTK][WPE] Fix xdg-desktop-portal permissions from a sandbox
Michael Catanzaro
Comment 5
2018-10-16 15:07:22 PDT
Comment on
attachment 352478
[details]
[GTK][WPE] Fix xdg-desktop-portal permissions from a sandbox View in context:
https://bugs.webkit.org/attachment.cgi?id=352478&action=review
> Source/WebKit/ChangeLog:14 > + (WebKit::XDGDBusProxyLauncher::setPermissions):
Umm this hunk of the patch disappeared, what happened to it? How does it build?
Patrick Griffis
Comment 6
2018-10-16 17:33:39 PDT
(In reply to Michael Catanzaro from
comment #5
)
> > Source/WebKit/ChangeLog:14 > > + (WebKit::XDGDBusProxyLauncher::setPermissions): > > Umm this hunk of the patch disappeared, what happened to it? How does it > build?
Already had a version that took `Vector<CString>&&`. Was just missing `WTFMove()` which makes sense.
WebKit Commit Bot
Comment 7
2018-10-16 19:19:17 PDT
Comment on
attachment 352478
[details]
[GTK][WPE] Fix xdg-desktop-portal permissions from a sandbox Clearing flags on attachment: 352478 Committed
r237213
: <
https://trac.webkit.org/changeset/237213
>
WebKit Commit Bot
Comment 8
2018-10-16 19:19:19 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 9
2018-10-16 19:20:31 PDT
<
rdar://problem/45326563
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug