Commit Graph

10 Commits

Author SHA1 Message Date
Alexander Larsson
7105703b0d common: Don't include flatpak-utils.h from flatpak-context.h and flatpak-exports.h
This allows us to use FlatpakContext arguments in flatpak-utils.h
2018-05-02 14:55:20 +02:00
Sam Spilsbury
b0b8f55ecb run: Export flatpak_context_get_session_bus_policy_allowed_own_names
We will use this later to work out which .service files we can export
based on names that we are allowed to own.

Closes: #1589
Approved by: alexlarsson
2018-04-19 07:31:25 +00:00
Alexander Larsson
74c4006dbe run: Add --sandbox
This runs the app in a very tight sandbox, with no access to anything
except /app and /run and some read-only host things like fonts and icons.

You can additionally add explicit permissions on the commandline,
like --share=network to actually grant some access.

This also sets $FLATPAK_SANDBOX_DIR to ~/.var/app/$appid/sandbox in the
environment.
2018-04-04 17:25:59 +02:00
Alexander Larsson
f33fac310c Add fallback-x11 socket permission
This means use x11 if no alternative is present, and should be used
for applications that support both X11 and wayland, but want to be
sandboxed when running under a wayland compositor (but still want to
run under an X server).

Closes: #1416
Approved by: alexlarsson
2018-02-14 09:19:56 +00:00
Alexander Larsson
3b1b9c65cd Move chunk of filesystem setup from flatpak-run.c to FlatpakContext
This way the filesystem setup is centralized in one place.

Closes: #1374
Approved by: alexlarsson
2018-02-05 14:31:30 +00:00
Alexander Larsson
38e2a5decc Rename some FlatpakContext functions
Since flatpak_export_paths_export_context and flatpak_exports_from_context
are now in flatpak-context.c we make them begin with flatpak_context_

Closes: #1374
Approved by: alexlarsson
2018-02-05 14:31:30 +00:00
Alexander Larsson
01156880dc Move flatpak_export_paths_export_context & flatpak_exports_from_context
These make more sense in flatpak-context.c, as they touch its FlatpakContext

Closes: #1374
Approved by: alexlarsson
2018-02-05 14:31:30 +00:00
Alexander Larsson
58b25843b5 Add and use flatpak_context_allows_features
This lets us avoid directly dereferencing FlatpakContext

Closes: #1374
Approved by: alexlarsson
2018-02-05 14:31:30 +00:00
Alexander Larsson
6296987a45 Move dbus filter argument generation to flatpak-context
Closes: #1374
Approved by: alexlarsson
2018-02-05 14:31:30 +00:00
Alexander Larsson
447a8d0537 Extract FlatpakContext to a separate file
This is basically a code motion only, no changes to behaviour.

Closes: #1374
Approved by: alexlarsson
2018-02-05 14:31:30 +00:00