Commit Graph

37 Commits (a4641280a7d687b4eae13b14d622874dd05a99fe)

Author SHA1 Message Date
Simon McVittie a4641280a7 Fix various spelling mistakes
Mostly detected by Debian's Lintian tool.

Signed-off-by: Simon McVittie <smcv@debian.org>
2016-05-17 11:43:32 +01: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 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 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
Alexander Larsson c3bae9af57 No need for newlines in g_debug messages 2016-03-14 13:01:09 +01:00
Alexander Larsson 9537bdc339 document portal: Avoid some deadlock
We can't hold the db lock and call into the fuse backend, because that
can create deadlocks if it calls back into the db.
2016-03-14 10:50:34 +01:00
Alexander Larsson e14837308b Now newlines needed in g_debug calls 2016-03-11 17:28:23 +01:00
Alexander Larsson 7a61eaa91d Reimplement fuse backend
The magic inode numbers we used before are problematic.

The inode nrs are tied to the file names, so inode changes on rename, which breaks posix expectations.

Also, it relied on 64bit inode space which is not true on i386.

So, this is a new implementation that uses a more traditional approach
of dynamically allocating inodes as needed.
2016-03-11 17:00:08 +01:00
Alexander Larsson 4177f358cb common: Make it explicit that XdgAppError are portal errors 2015-12-08 12:16:38 +01:00
Alexander Larsson 3ce0c6f7f9 document portal: Add AddNamed method for host-side use
This is needed for the "save as" file selector portal
2015-12-02 15:55:41 +01:00
Alexander Larsson 64d7c00045 Move dbus invocation peer app detection to lib/ 2015-10-21 10:23:37 +02:00
Alexander Larsson 6e1c211a5c Correct capitalization on dbus interface filename 2015-10-21 09:48:53 +02:00
Alexander Larsson 7c4898cbb2 document-portal: Fix warning
We need to return something from main()
2015-10-06 10:12:19 +02:00
Alexander Larsson eec8798f5e document portal: Add support for transient documents
These are useful for passing temporary files.
2015-09-17 20:09:50 +02:00
Alexander Larsson 8c04d2b532 fuse: Add some more debug spew 2015-09-08 15:33:55 +02:00
Alexander Larsson 42c6cd4574 document portal: Correctly handle recursive documents
I.e. if you pass in a document fd to the document portal we
reuse the existing id.
2015-09-08 14:53:14 +02:00
Alexander Larsson af331d364f document portal: Move locking explicitly into portal handlers
This is requires because do i/o on the passed in fd in add() and
if you pass in a fd on the fuse mount itself we deadlock.
2015-09-08 14:23:27 +02:00
Alexander Larsson bbc6fa8835 document-portal: Allow dbus owner replacing 2015-09-08 12:18:14 +02:00
Alexander Larsson ad9f05397e fuse: Add some more debug spew 2015-09-08 11:15:31 +02:00
Alexander Larsson 8fe6a115f6 fuse: Properly invalidate inodes and entries 2015-09-08 11:09:40 +02:00
Alexander Larsson 44f295c088 fuse: Add daemonizing switch
This will be used for the tests
2015-09-08 09:47:32 +02:00
Alexander Larsson 7ad47c74ea document-portals: Support unique documents
These document id will not be shared for multiple users. The main
difference is this this makes it safe for the creating app to delete
the document if he wants to (i.e. for temporary docs), and thus we can
grant this additional permission for the calling app.
2015-09-04 14:46:02 +02:00
Alexander Larsson 04879fdea5 Store and verify parent dir dev/ino and pass O_PATH fds
In order to be robust against symlink attacks (i.e. make a document
for a path, then replace it with a symlink somewhere else and have the
portal read that instead) we store the parent dev/ino when we create
the document id and always verify that (atomically with the *at
syscalls) on each use.

Also, we pass O_PATH fds when creating documents, as it allows us
to be a bit safer. For instance we can verify that the fd is a O_PATH
fd before doing any ops on it, and it makes it possible to avoid other
symlink trickery.

Also, we drop the double add methods, and just use the O_PATH version.
2015-09-03 22:17:00 +02:00
Alexander Larsson 4a298aeec3 fuse: Make filesystem multithreaded
This allows us to handle multiple apps better.
2015-09-03 22:16:43 +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 42012a7d5a Drop the xdp specific errors and use the xdg-app ones 2015-08-27 10:40:58 +02:00
Alexander Larsson b6355e1acb Document portal: Store paths, not uris
There is no way to do this for generic uris anyway, lets not
pretend we're solving a larger problem.
2015-08-27 10:38:22 +02:00
Alexander Larsson 0c25376657 Switch document portal to use strings for document ids 2015-08-26 17:26:53 +02:00
Alexander Larsson 12fbd9ff95 Make document portal use the new permission store 2015-08-26 17:11:35 +02:00
Alexander Larsson 08d05a30a3 Automatically start and mount document portal in sandbox 2015-07-10 17:49:59 +02:00
Alexander Larsson 4c4c66fc2d Add GetMountPoint method for document portal
This is both to get the mount path and to have a nice way
to activate the mount.
2015-07-10 17:02:38 +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