Alexander Larsson
b744cd2493
Add backport of g_autoptr support for json-glib
2016-11-29 10:14:33 +01:00
Alexander Larsson
cecae8295c
Fix build due to missing include
2016-11-11 11:15:00 +01:00
Christian Hergert
b3489c3557
session-helper: use proper fd with ioctl() for tty setup
...
This was using the "from" fd from the fd_map, which will have already been
closed by time we reach this portion of the child setup.
Tracking the movement of FDs while resolving the remappings is rather
tedious and error prone, so just locate the final fd before calling
the ioctl() in child setup.
2016-09-15 21:38:06 -07:00
Alexander Larsson
8628ec938e
HostCommand: Return actual PID
...
This is needed by e.g gnome-builder that want to pass this pid to
a profiler service. Its not really less secure/sandboxed this way,
because the app can launch whatever he wants in the host, which could
anyway talk back and report the real pid.
2016-09-14 10:03:15 +02:00
Christian Hergert
bed5eb5863
session-helper: return after sending DBus error
...
Make sure we let the caller know we handled the message immediately after
sending our error reply.
2016-09-12 01:37:50 -07:00
Tobias Mueller
2422c386e2
flatpak-session-helper: Check for arg_argv being NULL
...
To prevent crashers like the following:
Starting program: /var/tmp/flatpak/libexec/flatpak-session-helper
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffed8a9700 (LWP 7893)]
[New Thread 0x7fffed0a8700 (LWP 7894)]
[New Thread 0x7fffec439700 (LWP 7895)]
session-helper/flatpak-session-helper.c:176:20: runtime error: load of null pointer of type 'const gchar'
Thread 1 "flatpak-session" received signal SIGSEGV, Segmentation fault.
0x000000000040d6ce in handle_host_command (object=0x62100001ab90,
invocation=0x61d000014dc0, arg_cwd_path=0x0, arg_argv=0x602000003dd0,
arg_fds=0x61900000b130, arg_envs=0x61900001d2a0, flags=1)
at session-helper/flatpak-session-helper.c:176
176 if (*arg_argv[0] == 0)
(gdb)
2016-09-08 17:50:46 +02:00
Alexander Larsson
41443313ca
session-helper: Move HostCommand to its own interface
2016-09-06 15:30:38 +02:00
Alexander Larsson
c8df0e6208
SessionHelper: Add calls to spawn processes on the host
...
This lets any client, possibly in a sandbox if it has access to the
session helper, spawn a process on the host, outside any sandbox.
Clearly this is not something you typically want a sandboxed app to
do. However, it is sometimes very useful when using flatpak mainly
for distribution. For instance, an IDE needs to use this to launch a
flatpak build operation inside the sandbox. (Because otherwise recursive
calls to flatpak will not work.)
2016-09-05 21:41:14 +02:00
Alexander Larsson
0a20f28f89
session-helper: Add support for -r -v --help --version
2016-09-05 11:54:12 +02:00
Matthias Clasen
75218c4a65
Fix license headers
...
We were referring to the nonexisting "version 2" of the
Lesser GPL. It should be "version 2.1".
2016-07-29 14:27:49 -04:00
Alexander Larsson
28b549156a
Split out permission store from session helper
...
This is now available as org.freedesktop.impl.portal.PermissionStore
2016-05-09 14:07:22 +02:00
Alexander Larsson
5e9b247d26
Migrate ~/.local/share/xdg-app to ~/.local/share/flatpak
2016-05-09 12:21:28 +02:00
Alexander Larsson
8abbc0186e
Rename everything but the on-disk location to flatpak
2016-05-09 11:11:55 +02:00
Alexander Larsson
ba37b22d78
Rename library to libflatpak
2016-05-09 09:46:26 +02:00
Alexander Larsson
c24528d369
Rename source files to flatpak
2016-05-09 09:00:20 +02:00
Alexander Larsson
6a613d1fab
Rename all non-autogenerated symbols to flatpak
2016-05-09 09:00:20 +02:00
Alexander Larsson
1ffdf27d92
uncruftify: Initial run, all non-problematic changes
2016-05-06 16:03:27 +02:00
Alexander Larsson
839e17abf0
session-helper: Forgot to remove some of the dead gresource code
2016-04-26 16:58:20 +02:00
Alexander Larsson
4f4b8c536b
No need to put introspection xml in resources
...
This is already built in to the gdbus codegen code.
2016-04-26 11:54:59 +02:00
Simon McVittie
3d0a97099d
session-helper: connect the D-Bus and systemd services
...
Signed-off-by: Simon McVittie <smcv@debian.org>
2016-04-17 10:25:57 +01:00
Alexander Larsson
30a536f6dc
Add change notification for the permissions store
2016-03-14 14:26:35 +01:00
Alexander Larsson
56872d1602
Never use gvfs in the session helper
2016-03-14 14:10:19 +01:00
Simon McVittie
9efe31e8d4
Add systemd user units corresponding to the D-Bus session services
...
Signed-off-by: Simon McVittie <smcv@debian.org>
2016-01-28 23:45:47 +01:00
Simon McVittie
2f38ec6521
Rename xdg-app-session.service to the recommended name
...
Using the bus name as the name of the service file is mandatory
for system services, and recommended for session services.
Signed-off-by: Simon McVittie <smcv@debian.org>
2016-01-28 23:45:03 +01:00
Alexander Larsson
4177f358cb
common: Make it explicit that XdgAppError are portal errors
2015-12-08 12:16:38 +01:00
Alexander Larsson
106a5b06ec
Rename lib/ to common/ in preparation for public xdg-app library
2015-11-26 22:05:38 +01:00
Alexander Larsson
645c433960
Fix distcheck issues
2015-09-17 20:24:04 +02:00
Alexander Larsson
6775dc1002
Use g_auto(GStrv) instead of glnx_strfreev
2015-08-31 09:51:48 +02:00
Alexander Larsson
52525f46fd
Remove ununsed variables reported by clang
2015-08-27 16:13:15 +02:00
Alexander Larsson
a3f4342b5a
Initial version of permission store
...
This is a generalized store for permissions, which also will
be used by the document portal.
2015-08-26 17:11:31 +02:00
Alexander Larsson
ffa1acea75
Rename dbus file to org.freedesktop.XdgApp
2015-08-25 09:27:35 +02:00
Alexander Larsson
2238cc44c3
Change dbus name of session helper to org.freedesktop.XdgApp
2015-08-18 13:33:03 +02:00
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
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