Commit Graph

434 Commits (929071ad1083494f717f6a5ab6dfcf817d143700)
 

Author SHA1 Message Date
Alexander Larsson 929071ad10 Import xdg-document-portal from github repo
This pulls in the daemon code from:
     https://github.com/alexlarsson/xdg-document-portal/

We need this in xdg-app because we need to set up the mounts correctly.
2015-07-10 16:56:39 +02:00
Alexander Larsson b0e1124f02 Bump version to 0.3.6 2015-07-10 12:39:54 +02:00
Alexander Larsson 0040312b07 If home is accessible, make user-dirs.dir visible in custom config dir
This makes xdg user dirs work in the sandbox too.
2015-07-10 12:36:54 +02:00
Alexander Larsson 3e1d401c6d Add NEWS file 2015-07-10 12:23:42 +02:00
Alexander Larsson 302f88e69d Restructure directories and build
This moves a all source code into separate subdirs per binary. The
helper and the generic stuff goes into lib/ which is then used by all
the others. For now this is a completely internal library, but at
some point we will probably clean it up and expose some subset.

Also, we move the dbus proxy to libexecdir.
2015-07-10 12:15:45 +02:00
Dan Nicholson ef223b6a46 helper: Add all possible architectures to seccomp filter
Ensure that the seccomp filters will be applied if someone tries to run
a non-native architecture program. This currently only covers the
various x86 architectures and was borrowed from systemd LGPL code.

https://bugs.freedesktop.org/show_bug.cgi?id=91165
2015-07-01 00:18:44 +02:00
Alexander Larsson f28b1d3082 helper: Mount extra dirs/files only after all other mounts are up
This fixes the user-dirs.dirs write being over-mapped. But it also
just make more sense.
2015-07-01 00:14:21 +02:00
Dan Nicholson ecf8ecf088 Write user-dirs.dirs under app's XDG_CONFIG_HOME
Creating the custom user-dirs.dirs under ~/.config won't work since
later the config directory gets set via XDG_CONFIG_HOME. Pass in the
app's data directory so that the the custom config directory can be
used.

https://bugs.freedesktop.org/show_bug.cgi?id=91164
2015-06-30 23:26:35 +02:00
Dan Nicholson 163b582a72 helper: Disable socket filters on x86
Filtering on socket related syscalls are not possible on x86. See
https://github.com/seccomp/libseccomp/issues/8. Disable socket filtering
until a better solution comes along.

https://bugs.freedesktop.org/show_bug.cgi?id=91162
2015-06-30 23:05:38 +02:00
Alexander Larsson 653e71d006 run: Make users fonts appear in /run/host/user-fonts 2015-06-30 20:04:05 +02:00
Alexander Larsson 22bdf350db helper: Fix typo in the socket-family blacklist
We want greater-or-equal on the last family in the list, not on the
other families.
2015-06-29 23:00:50 +02:00
Alexander Larsson 4f73eaf10b Bump version to 0.3.5 2015-06-24 14:46:51 +02:00
Alexander Larsson c7a05ae781 profile: Don't override pre-existing XDG_DATA_DIRS env vars 2015-06-24 09:31:50 +02:00
Alexander Larsson 0774aa39e2 Add xdg-app.env file for gdm 2015-06-23 11:40:11 +02:00
Alexander Larsson c5a2bb2b07 xdg-app.sh: /usr/local/share is also in the default XDG_DATA_DIRS 2015-06-23 11:38:55 +02:00
Alexander Larsson 536f1e5e3e Bump version to 0.3.4 2015-06-23 10:54:39 +02:00
Alexander Larsson f39af8d75e Avoid unnecessary escapes in desktop file exports
Strings that are regular can be used as-is rather than escaping.
This is estetically nicer, but it also allows apps that don't fully
unescape things to work better. For instance, gnome-shell didn't like
if %U is escaped.
2015-06-23 10:52:28 +02:00
Alexander Larsson 9ae639ab77 Bump version to 0.3.3 2015-06-23 09:52:28 +02:00
Alexander Larsson d52c09165c configure: Add checks for docbook xsl/dtd 2015-06-17 17:10:41 +02:00
Alexander Larsson 06cbbf9965 helper: No need for a tmpfs on /dev these days
We used to have this because / has nodev, but thats not needed
anymore as we now have bind-mounts to devices.
2015-06-17 16:59:06 +02:00
Alexander Larsson 9a8c32364a helper: Remove noremount hack now that we keep old mount flags 2015-06-17 16:59:06 +02:00
Alexander Larsson 5da240c24f helper: Keep any existing old mount flags when remounting 2015-06-17 16:59:02 +02:00
Alexander Larsson 53fc3413ea Bump version to 0.3.2 2015-06-16 16:34:49 +02:00
Alexander Larsson 14c678b1c6 update: Don't remove existing deployment if there was no updates 2015-06-16 16:33:52 +02:00
Alexander Larsson a39197c60c Bump version to 0.3.1 2015-06-04 16:03:26 +02:00
Alexander Larsson e856962cc4 helper: Clean up launched command line 2015-06-02 15:51:58 +02:00
Alexander Larsson d781e27094 run: If session helper not available, bind-mount /etc/resolv.conf
This helps in e.g development environments
2015-06-02 13:36:11 +02:00
Alexander Larsson 8241165848 helper: Don't fail if ~/.local/share/xdg-app does not exist 2015-06-02 13:33:57 +02:00
Alexander Larsson dc5431fb98 helper: Make ~/.local/share/xdg-app read-only in sandbox
There should never be a need to install or modify apps
from inside the sandbox.
2015-06-02 11:46:15 +02:00
Alexander Larsson b1aa93a9d4 Use seccomp to limit allowed syscalls
We disallow any network family but inet, inet6, unix and netlink
as the rest are generally weird old unused things.

We also have a blacklist of syscalls, some are just old unnecessary
things, some are things that are "risky", like NUMA/VM control, and
setting up custom sub-namespaces.
2015-06-02 11:14:27 +02:00
Alexander Larsson 811c512e56 helper: Make all helper functions static
Also, remove unused ones
2015-06-02 09:57:23 +02:00
Alexander Larsson 61012949d7 helper: Fix thinko due to create_file() return type change
This broke wayland/dbus socket support
2015-06-01 16:23:46 +02:00
Alexander Larsson 05ddc17ee2 Make /var/cache persistent (in app-data cache dir)
This is nice as it makes the fontconfig cache persist, which is needed
for e.g. the host fonts to not take a long time each time you start an
app.
2015-06-01 16:03:33 +02:00
Alexander Larsson 7ebbba1d64 Show version when listing apps and runtimes 2015-06-01 13:32:48 +02:00
Alexander Larsson e6df651528 Show source repo when listing apps and runtimes 2015-06-01 13:28:19 +02:00
Alexander Larsson 3cf4a0d7e6 Use xdg_app_dir_get_origin helper 2015-06-01 13:28:03 +02:00
Alexander Larsson c1b2a67a84 Add xdg_app_dir_get_origin() helper 2015-06-01 13:27:41 +02:00
Alexander Larsson 50b3de3728 helper: Optionally add back setuid support
If you don't have userns support in your kernel you can use this.
The future lies with userns though, so it is the default.
2015-05-29 10:46:10 +02:00
Alexander Larsson 31692b6ab2 helper: Minor cleanup of uid/gid handling 2015-05-28 22:28:37 +02:00
Alexander Larsson 2c0c21744f helper: Drop setuid and use user namespaces 2015-05-28 22:02:31 +02:00
Alexander Larsson 8b7822ff07 helper: Only call get[ug]id() once at the start
Since the uid keeps changing during the runtime of the helper this makes things
much less complicated.
2015-05-28 21:59:34 +02:00
Alexander Larsson d12c3cd09f run: Fix typo that broke env var support 2015-05-26 14:48:54 +02:00
Alexander Larsson c6b6ba5095 Bump version to 0.3.0 2015-05-26 13:53:11 +02:00
Alexander Larsson 49bea07b74 build: Remove duplicated helper arguments 2015-05-25 21:36:56 +02:00
Alexander Larsson 3a20c07280 build: Always allow host fs access 2015-05-25 21:36:36 +02:00
Alexander Larsson 1a68b0bbf2 helper: Fix errors caused by create_file() return value change 2015-05-25 21:36:04 +02:00
Alexander Larsson 16b46d3579 Update docs for new run command line options 2015-05-25 16:01:33 +02:00
Alexander Larsson 2cb54a711e helper: Remove backwars compat /self symlink
We've broken the format anyway.
2015-05-25 15:37:12 +02:00
Alexander Larsson 111eff480e run: Remove hardcoded GI_TYPELIB_PATH
This is now better done in the [Environment] part of
the runtime metadata
2015-05-25 15:35:54 +02:00
Alexander Larsson 7f6d801d8e Context: Finish support for filesystems
You can now expose absolute paths, ~/foo paths, or xdg-* paths which
expands to xdg user dirs.
2015-05-25 15:28:29 +02:00