Commit Graph

79 Commits (fe133c72042e52edbacdf686a6f2a7cb76900197)

Author SHA1 Message Date
Matthias Clasen d245ba3574 fuse: Always fail X_OK in access()
Pointed out by Ray Strode.
2016-07-27 16:00:44 -04:00
Matthias Clasen 0e8faa8c31 document-portal: Implement access()
In testing readonly exports, I noticed that gedit is does not believe
the mode it gets from stat()ing a file a million times. Instead
it calls access() to determine whether to treat it as readonly.
Since the document portal fuse file system did not implement
access(), gedit treated my file as writable and then failed when
I clicked "Save". With this patch, gedit treats the file as read-only
from the get-go.
2016-07-26 14:55:18 -04:00
Matthias Clasen 369eab84e7 Fix a typo
We were trying to check if O_NOFOLLOW was set here.
(flags & BIT_A) == BIT_B never make sense.
2016-07-25 14:28:57 -04:00
Eric Curtin 930a0a04e2 Remove unused variable in this file 2016-07-17 12:18:57 +01:00
Matthias Clasen b6db220f7c document portal: Add --version
It is expected that --version works.
2016-07-14 23:28:53 -04:00
Cosimo Cecchi 90a3522148 document-portal: add support to activate paths inside /app
When the document portal is called from within the sandbox with an
app-private file path, translate the path to a document portal URI in
order to make it available to other applications.
2016-07-11 15:58:29 -07:00
Cosimo Cecchi d488914614 document-portal: factor out common code to validate FD
We're going to reuse this in another location.
2016-07-11 15:56:59 -07:00
matthiasclasen d1d881edf3 Merge pull request #172 from hadess/origin/wip/glib-reqs
Allow building on GLib 2.40 or older
2016-07-04 21:06:42 -04:00
Bastien Nocera 98356356e6 document-portal: Allow to build on the minimum GLib version
G_IO_ERROR_NOT_CONNECTED is new in 2.44, use the older
G_IO_ERROR_BROKEN_PIPE which is synonymous with the more readable
G_IO_ERROR_CONNECTION_CLOSED.
2016-07-05 01:16:33 +02:00
Alexander Larsson 51663de427 Remove unused variables 2016-07-01 14:45:53 +02:00
Simon McVittie dab1d99c46 document portal: don't reply to GetMountPoint() until ready
As soon as we get our D-Bus name, we can start receiving method calls. If
we reply immediately, callers will think our mount point is ready.

In particular, if FUSE is unavailable, we want "flatpak run" to proceed
with no document portal; it currently tries and fails to bind-mount the
nonexistent document portal mount-point into the container.

Signed-off-by: Simon McVittie <smcv@debian.org>
2016-06-24 21:07:57 +01:00
Matthias Clasen 5612b5f7c6 Fix the build
The xdp-impl-dbus.h header no longer exists - it came from an
earlier version of the document commands branch where I introduced
a separate interface. Just drop the include, it is not needed.
2016-06-19 13:42:42 -04:00
Matthias Clasen 89a10ad9b2 document portal: Implement the new api 2016-06-16 15:05:17 -04:00
Alexander Larsson 1abcc8d080 Merge pull request #108 from ximion/master
Silence compiler warning about unused result of write()
2016-06-14 05:25:00 +02:00
Simon McVittie f8f4f530ab Permission store, document portal: do not distribute generated files
Signed-off-by: Simon McVittie <smcv@debian.org>
2016-06-12 10:35:13 +01:00
Matthias Klumpp 0a90e6ec3e Silence compiler warning about unused result of write()
This way we return a critical warning in the unlikely event of a write
error.
2016-06-10 19:35:49 +02:00
Matthias Clasen f53533ff48 Fix compiler warnings
There are a number of -Wshadow warnings in document-portal/.
Fix them.
2016-06-09 23:47:41 -04:00
Matthias Clasen fbefba695c document portal: Improve logging
Make the error printing more pretty.
2016-06-09 23:30:12 -04:00
Matthias Clasen c5155402b2 document portal: Make -v work
We need to set the log handler for our docmain, not the NULL domain.
2016-06-09 23:19:18 -04:00
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 aabcc54db4 document-portal: Yet another attempt to fix the build 2016-05-09 21:21:07 +02: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 4f9ea6bb57 Remove unused variables
This fixes warnings from clang
2016-05-09 12:49:54 +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 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 af03d2f5b4 Remove unused local variables reported by clang 2016-04-21 09:48:56 +02:00
Alexander Larsson c3bae9af57 No need for newlines in g_debug messages 2016-03-14 13:01:09 +01:00
Alexander Larsson 46a192824c fuse: Store basename in dir so we don't have to keep looking it up
Its immutable for a document anyway
2016-03-14 10:58:08 +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
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
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 106a5b06ec Rename lib/ to common/ in preparation for public xdg-app library 2015-11-26 22:05:38 +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 208eb7b1aa Propagate Xauthority details to the sandbox if X11 is enabled
Some xservers out there (like xorg 1.17.1) have a broken server interpreted
local xauth, which causes apps to fail to connect to the xserver.
This fixes that by propagating Xauthority data such as the MIT-MAGIC-COOKIE-1.
2015-10-01 21:23:23 +02:00
Alexander Larsson cf5050126e fuse: Disable entry cache to work around race condition 2015-10-01 18:02:13 +02:00
Colin Walters b337fc7621 build: Fix srcdir != builddir from git
Was hitting this in gnome-continuous, which does srcdir != builddir by
default.
2015-09-29 23:26:06 +02:00
Alexander Larsson 2d31c3c7da fuse: Supply mode when creating files
https://bugs.freedesktop.org/show_bug.cgi?id=92034
2015-09-18 14:27:32 +02:00
Alexander Larsson 645c433960 Fix distcheck issues 2015-09-17 20:24:04 +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 4ca4f78483 document portal: Fix crashes when dbus activated
We handle the first message (the activating message) before we
have gotten the name aquired message. Make sure that this
is correctly handled.
2015-09-09 16:25:51 +02:00