Commit Graph

13 Commits (0ea33a7e35172542cded0b02333bdf3fee7c523e)

Author SHA1 Message Date
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 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 64d7c00045 Move dbus invocation peer app detection to lib/ 2015-10-21 10:23:37 +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 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 12fbd9ff95 Make document portal use the new permission store 2015-08-26 17:11:35 +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