Bug 201793 - [GTK][WPE] Check for a Snap sandbox a bit harder
Summary: [GTK][WPE] Check for a Snap sandbox a bit harder
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Adrian Perez
URL:
Keywords:
Depends on: 201486
Blocks:
  Show dependency treegraph
 
Reported: 2019-09-14 03:40 PDT by Adrian Perez
Modified: 2019-09-14 15:45 PDT (History)
8 users (show)

See Also:


Attachments
Patch (1.60 KB, patch)
2019-09-14 03:53 PDT, Adrian Perez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Perez 2019-09-14 03:40:58 PDT
In a discussion with Patrick after bug #201486 we agreed that
it may be a good thing to check a little bit more thoroughly
whether we are running inside a Snap sandbox: instead of looking
for a “SNAP” environment variable only, we can check also for the
“SNAP_NAME” and “SNAP_REVISION” variables.

The rationale is that “SNAP” is kind of a short variable and not
completely unlikely to be set by an user without being inside a
Snap container. Checking a couple of environment variables should
be fine (it is very unlikely that they would be all set accidentally
at the same time), and we don't want anyway to make complex checks
anyway.
Comment 1 Adrian Perez 2019-09-14 03:53:11 PDT
Created attachment 378790 [details]
Patch
Comment 2 Adrian Perez 2019-09-14 03:54:16 PDT
Added Patrick in CC, as he is our sandboxing expert, in case
he wants to comment on this :)
Comment 3 Patrick Griffis 2019-09-14 14:58:47 PDT
Comment on attachment 378790 [details]
Patch

Looks good.
Comment 4 WebKit Commit Bot 2019-09-14 15:45:36 PDT
Comment on attachment 378790 [details]
Patch

Clearing flags on attachment: 378790

Committed r249882: <https://trac.webkit.org/changeset/249882>
Comment 5 WebKit Commit Bot 2019-09-14 15:45:37 PDT
All reviewed patches have been landed.  Closing bug.