summaryrefslogtreecommitdiff
path: root/client
Commit message (Collapse)AuthorAgeFilesLines
* build: Add proper linker support checkIñigo Martínez2018-07-211-1/+1
| | | | | | | | Since meson 0.46[0], meson has added support for checking properly link flags support. `version-script` link flag check has been changed to take advantage of this support. [0] http://mesonbuild.com/Release-notes-for-0-46-0.html#new-functions-has_link_argument-and-friends
* build: Remove autotoolsIñigo Martínez2018-04-062-103/+0
| | | | | | | To avoid the burden of maintaining multiple build systems, this patch removes autotools support. https://bugzilla.gnome.org/show_bug.cgi?id=786149
* Remove redundant gmodule.h includesOndrej Holy2018-04-032-2/+0
| | | | | | | | Our codes don't use GModule APIs directly, so there is no need for gmodule.h includes. GModule has been replaced by GIOModule in our codes long time ago. gmodule.h is included indirectly over gio.h anyway. https://bugzilla.gnome.org/show_bug.cgi?id=794365
* build: Revise dependenciesIñigo Martínez2018-04-031-9/+14
| | | | | | | | | | | | | | | gvfs is using a set of glib libraries (gio-2.0, gio-unix-2.0, glib, gobject-2.0) in almost all the created objects. However, these dependencies are not always necessary. gvfs' meson port also uses some internal dependencies formed by built libraries. This internal dependencies depend on other dependendecies as well. These both issues have been fixed by reviewing all the internal dependencies and built objects. https://bugzilla.gnome.org/show_bug.cgi?id=794365
* build: Improve installation on system pathsIñigo Martínez2017-10-311-3/+2
| | | | | | | | | | | | Instead of being hardcoded, D-Bus, systemd and GIO modules paths can be checked by using the information in their correspondant pkg-config files. This patch uses the information on pkg-config files by default, and also allows the user to provide this information to avoid overwriting system files. https://bugzilla.gnome.org/show_bug.cgi?id=786149
* build: Port to meson build systemIñigo Martínez2017-10-313-0/+109
| | | | | | | | meson is a build system focused on speed an ease of use, which helps speeding up the software development. This patch adds meson support along autotools. https://bugzilla.gnome.org/show_bug.cgi?id=786149
* daemon: Avoid overflowing when querying for filesystem infoMichael Terry2017-08-211-1/+4
| | | | | | | Filesystem sizes can be large and in danger of overflowing. Guard against that possibility in the dav and fuse FS query code. https://bugzilla.gnome.org/show_bug.cgi?id=786177
* gdaemonfile: Fix g_file_equal for different mount_prefixOndrej Holy2017-08-211-2/+6
| | | | | | | | | | g_daemon_file_equal() always return FALSE for files with different mount_prefix even though the files can be equal. It happen when comparing two files from different origins, e.g. g_mount_get_root() and g_file_new_for_uri(). Let's do the same which is done in _prefix_matches and _get_relative_path in order to fix this issue. https://bugzilla.gnome.org/show_bug.cgi?id=786217
* gdaemonfile: Fix relative path handlingOndrej Holy2017-08-211-53/+15
| | | | | | | | | | | | | | | | | | g_daemon_file_get_relative_path() fails for files with different mount_prefix and always return NULL. It happen when comparing two files from different origins, e.g. g_mount_get_root() and g_file_new_for_uri(). On the other hand, g_daemon_file_prefix_matches() can succeed in cases, where paths don't have the same prefixes, because it just compares mount_prefix of a parent with a path of a descendant, but a path of the parent is ignored. The code concatenates mount_prefix with a path, so the comparison never succeeds if mount_prefix is set, because mount_prefix is already part of the path in GDaemonFile. Let's ignore mount_prefix when comparing and always compare the paths, so we can significantly simplify the code. https://bugzilla.gnome.org/show_bug.cgi?id=786217
* client: Fix crash when calculating a relative pathMichael Terry2017-08-211-1/+1
| | | | | | Fix an if condition that resulted in trying to strdup(0x1). https://bugzilla.gnome.org/show_bug.cgi?id=786217
* gdaemonfileenumerator: Marginally simplify the codeDebarshi Ray2017-08-071-4/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=747412
* gdaemonfileenumerator: Fix crashes in synchronous enumerator codeOndrej Holy2017-07-241-2/+6
| | | | | | | | | | | | Commit 2eae108 ported the code to GTask and slightly changed processing. The changes trigger the following criticals and cause crashes of some applications (e.g. Firefox, Thunderbird). GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed Return TRUE from signal handlers in order to prevent further processing of the invocations, which cause the mentioned issues. https://bugzilla.gnome.org/show_bug.cgi?id=784953
* client: Port GDaemonFileEnumerator to GTaskOndrej Holy2017-06-141-95/+95
| | | | | | | | | GSimpleAsyncResult is deprecated in favour of GTask and should be replaced. "changed" signal is added in order to allow splitting _sync and _async code paths to use GTask as user_data for _async functionality. https://bugzilla.gnome.org/show_bug.cgi?id=747412
* Do not sent user invisible mounts if not neededOndrej Holy2017-06-061-16/+10
| | | | | | | | | | | g_volume_monitor_get() might be really slow if there is too many mounts, because the list of the mounts is send over D-Bus. It can simply happen due to user invisible mounts, e.g. http. User invisible mounts are ignored by the volume monitor, so it is useless to send them over D-Bus. Improve the D-Bus API and don't send the user invisible mounts if it is not needed. https://bugzilla.gnome.org/show_bug.cgi?id=775600
* client: Remove obsolete GSimpleAsyncResult helpersOndrej Holy2017-03-282-38/+0
| | | | | | GSimpleAsyncResult is deprecated in favour of GTask and should be replaced. https://bugzilla.gnome.org/show_bug.cgi?id=747412
* fuse: Prevent potential crash if file handle is not setOndrej Holy2017-03-231-1/+1
| | | | | | File handle may be NULL, so it has to be checked before dereferencing. This issue was revealed by coverity scan.
* client: Ignore everything after first colon in userinfoOndrej Holy2017-02-131-2/+17
| | | | | | | | | | Use of the format "user:password" in the userinfo field is deprecated and applications should not render as clear text any data after the first colon as per rfc3986. Passwords have never been handled in userinfo fields by GVfs, however, they are still part of the usernames, which is wrong. Let's ignore such data in userinfo fileds. https://bugzilla.gnome.org/show_bug.cgi?id=628430
* client: Port GDaemonFileOutputStream to GTaskOndrej Holy2017-02-071-201/+95
| | | | | | GSimpleAsyncResult is deprecated in favour of GTask and should be replaced. https://bugzilla.gnome.org/show_bug.cgi?id=747412
* client: Do not leak GDBusConnection referenceOndrej Holy2017-02-072-0/+2
| | | | | | | | | async_construct_proxy() calls g_object_ref() on connection, because the connection is unrefed by async_call_finish(). The returned connection might be NULL in some cases and g_bus_get() is called instead. However, g_bus_get_finish() is "transfer full" and thus one reference is leaked. https://bugzilla.gnome.org/show_bug.cgi?id=747412
* client: Propagate error from create_mount_tracker_proxyOndrej Holy2017-01-261-9/+10
| | | | | | Prevent GDaemonFile methods failures without error being set. https://bugzilla.gnome.org/show_bug.cgi?id=777737
* client: Do not modify caller's errorsOndrej Holy2017-01-243-3/+2
| | | | | | | Caller's errors are modified by g_dbus_error_strip_remote_error. Strip the dbus error in the caller directly. https://bugzilla.gnome.org/show_bug.cgi?id=747412
* client: Port GDaemonFile to GTaskOndrej Holy2017-01-241-640/+429
| | | | | | | | GSimpleAsyncResult is deprecated in favour of GTask and should be replaced. Based on patch from Dan Winship. https://bugzilla.gnome.org/show_bug.cgi?id=747412
* fuse: Add client pid in debug messagesOndrej Holy2017-01-241-1/+5
| | | | | It is hard to debug what application is accessing fuse mount point. Let's add client pid in the debug messages.
* Add prefixes in debug messagesOndrej Holy2017-01-241-1/+1
| | | | | There is a lot of messages if all debug output from gvfs is enabled. Let's add prefixes in order to find easily origin of the messages.
* fuse: Print open flags in readable formOndrej Holy2017-01-171-2/+12
| | | | | Debug prints contain open flags as an octal numbers, which is hard to read. Print selected flags in readable form for easier debugging.
* client: Fix typos in source tag checksOndrej Holy2017-01-161-2/+2
| | | | | | | | Commit 3a5f04c made port of GDaemonFileInputStream to GTask. Unfortunately, it introduced typos in two source tag checks, which causes read failures currently. https://bugzilla.gnome.org/show_bug.cgi?id=747412
* Remove some leftover dead codeChristian Kellner2017-01-091-3/+1
| | | | | | | Porting from GSimpleAsyncResult to GTask resulted in a tiny amount of dead code. Remove that. https://bugzilla.gnome.org/show_bug.cgi?id=747412
* gvfsiconloadable: Duplicate caller's errorOndrej Holy2016-12-121-1/+1
| | | | | | | The caller's error is not duplicated since the commit 811aace. It might cause segfaults, because gvfsdaemonvfs is not modified appropriately. https://bugzilla.gnome.org/show_bug.cgi?id=747412
* test: Add test case for Bug 772849Ondrej Holy2016-12-121-0/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=772849
* client: Escape ":[]" chars in host if it is not IPv6Ondrej Holy2016-12-121-6/+14
| | | | | | | | | | | The "[]:" chars are omitted currently when encoding uri, because they are valid for IPv6. This causes problems in some cases, e.g. output from g_file_get_uri(g_file_new_for_uri("dav+sd://foo%3Abar._webdav._tcp.local")) is "dav+sd://foo:bar._webdav._tcp.local/", which is obviously wrong. Add gvfs_is_ipv6 in order to detect IPv6 addresses and encode also "[]:" chars in other cases. Use gvfs_is_ipv6 to detect IPv6 also in some backends. https://bugzilla.gnome.org/show_bug.cgi?id=772849
* gdaemonfile: Pass GFileCreateFlags in write operationsOndrej Holy2016-12-121-0/+1
| | | | | | | | Flags are not passed in write operations on the client side currently, so the daemons always use G_FILE_CREATE_NONE when writting. Pass the flags in to fix this regression... https://bugzilla.gnome.org/show_bug.cgi?id=747412
* gdaemonfile: Remove dead codeOndrej Holy2016-12-121-5/+0
| | | | | | The uri variable is just set, but never used. https://bugzilla.gnome.org/show_bug.cgi?id=747412
* client: Use sync methods instead of flushing dbusOndrej Holy2016-11-241-21/+11
| | | | | | | | | | | | | g_dbus_connection_flush_sync causes troubles in certain cases when using multiple threads. The problem occurs when there are ongoing gvfs_metadata_call_set_sync calls. It blocks threads e.g. when moving files over Nautilus. Nautilus freezes sometimes due to it. Use sync methods instead of flushing dbus. I don't see any significant slowdown when using sync methods instead of the flushing according to my testing. It fixes hangs in Nautilus and moving in Nautilus is almost instant again. https://bugzilla.gnome.org/show_bug.cgi?id=757747
* client: Port GDaemonFileInputStream to GTaskOndrej Holy2016-11-181-202/+95
| | | | | | GSimpleAsyncResult is deprecated in favour of GTask and should be replaced. https://bugzilla.gnome.org/show_bug.cgi?id=747412
* client: Port GVfsIconLoadable to GTaskOndrej Holy2016-11-011-64/+56
| | | | | | | | | | GSimpleAsyncResult is deprecated in favour of GTask and should be replaced. This commit also slightly changes API to be more similiar with gdeamonfile. Based on patch from Dan Winship. https://bugzilla.gnome.org/show_bug.cgi?id=747412
* client: Port GDaemonMount to GTaskOndrej Holy2016-11-011-50/+65
| | | | | | | | GSimpleAsyncResult is deprecated in favour of GTask and should be replaced. Based on patch from Dan Winship. https://bugzilla.gnome.org/show_bug.cgi?id=747412
* Use Unicode in translatable stringsPiotr Drąg2016-10-033-10/+10
| | | | | | See https://developer.gnome.org/hig/stable/typography.html https://bugzilla.gnome.org/show_bug.cgi?id=772219
* fuse: Add GVFS_DEBUG_FUSE to enable debug outputOndrej Holy2016-05-252-87/+75
| | | | | | | | | | It was not possible to enable debug output from the fuse daemon without rebuilding. This patch replaces custom debug handling in the similar way as it is done in other daemons (using GLib logging functionality). Environment variable GVFS_DEBUG_FUSE can be specified in order to enable debugging and SIGUSR2 signal can be sent also to toggle debug output. The debug output will be printed at stdout, so the debug output can be seen on gvfsd output thanks to the commit 85bacbf.
* Always add mount prefix in cached fuse pathsJens Georg2016-05-201-34/+29
| | | | | | | | | | | | | If a fuse path is encountered the first time, the fuse path is re-created taking the mount prefix into account. When the file is created for the path the second time from the cached mount info, the mount prefix is silently ignored, causing the new file not to be equal to the old one (it is even invalid): This change just looks up the mount info in the cache and then continues constructing the path as it would without having the info cached. https://bugzilla.gnome.org/show_bug.cgi?id=766294
* fuse: Ignore signals during exit procedureOndrej Holy2016-03-111-1/+47
| | | | | | | | | | Fuse removes its signals handlers in the middle of exit procedure, before vfs_destroy() call. Consequenlty fuse daemon may be killed instead of proper termination if signal is recieved. Reimplement fuse_main helper using lowlevel API in order to ignore new signals during the whole exit procedure. https://bugzilla.gnome.org/show_bug.cgi?id=762250
* fuse: Avoid crashes when exitingOndrej Holy2016-03-111-9/+9
| | | | | | | | | There may be a race when exiting between a fuse main loop and a subthread's main loop. Therefore call g_main_loop_quit always from vfs_destroy on the main thread and wait there for a termination of the subthread to avoid the race. https://bugzilla.gnome.org/show_bug.cgi?id=762250
* fuse: Do not unref result of g_vfs_get_defaultOndrej Holy2016-03-071-1/+0
| | | | | | Result from g_vfs_get_default shouldn't be freed as per documentation. https://bugzilla.gnome.org/show_bug.cgi?id=762250
* fuse: Print file flags in vfs_write when debuggingOndrej Holy2016-01-051-0/+1
|
* Accept XDG_RUNTIME_DIR/bus as a valid D-Bus session/user busSimon McVittie2015-10-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | These checks for DBUS_SESSION_BUS_ADDRESS were added to solve https://bugzilla.gnome.org/show_bug.cgi?id=526454, in which non-X11-session processes (for example a system service), or processes under su or similar inside an X11 session, could cause a dbus-daemon to be autolaunched via dbus-launch. If there was no X11 display to represent the lifetime of a session, the dbus-daemon would potentially run forever, causing a "leaked" process; additionally, other uses of D-Bus by the same uid would start more dbus-daemons. This becomes potentially problematic on systems with the "user bus" model introduced in dbus 1.10: libdbus, GDBus and sd-bus will now all try the per-uid socket XDG_RUNTIME_DIR/bus before attempting autolaunch, so if those are known to be the only implementations in use on a "legacy-free" system, setting DBUS_SESSION_BUS_ADDRESS is unnecessary. Check for that socket before giving up. XDG_RUNTIME_DIR/bus as implemented by dbus 1.10 with systemd avoids several of the down sides of autolaunching: it will never start more than one session bus per uid, and the socket and bus will automatically be cleaned up when the corresponding "systemd --user" exits. https://bugzilla.gnome.org/show_bug.cgi?id=756420
* file monitor: Fix invalid readOndrej Holy2015-10-141-8/+4
| | | | | | | | | | | | | | | Commit 7373acf changed file monitor construction to be really synchronous. Unfortunately there is missing g_object_ref for d-bus connection and the connection is unrefed after use. Subsequent read of the unrefed connection cause crash with following critical: (firefox:29844): GLib-GIO-CRITICAL **: g_dbus_connection_is_closed: assertion 'G_IS_DBUS_CONNECTION (connection)' failed Do not store the connection, because it isn't neccesary with the synchronous construction. https://bugzilla.gnome.org/show_bug.cgi?id=756153
* client: Use g_warning if proxy creation failedOndrej Holy2015-10-021-4/+7
| | | | | | | | Currently g_errprint is used and thus a message doesn't end up in a logs. Use g_warning to log the message and also replace g_return_if_fail, because proxy creation failure isn't programmer error. https://bugzilla.gnome.org/show_bug.cgi?id=755805
* file monitor: Construct synchronouslyAlexander Larsson2015-09-301-83/+58
| | | | | | | | | | | | | | g_file_monitor_file() is a sync call anyway, so doing some sync i/o in the constructor doesn't make a difference, and doing so avoids races where you would not get change events for operations you do. We don't actually need to wait for the subscribe event, and proxy construction in this case does not do any i/o, so we're really only doing sync i/o to look up the connection, and it should be cached from the earlier call in g_daemon_file_monitor_file(), so in practice this should make little difference. https://bugzilla.gnome.org/show_bug.cgi?id=749317
* gdaemonfile: fix typo from last commitCarlos Soriano2015-08-181-1/+1
| | | | ugh sorry
* gdaemonfile: check for the correct cancellableCarlos Soriano2015-08-181-1/+1
| | | | | | | | | | We were checking for the newly created data cancellable, which is wrong. That was causing that mounting encloused volumes were not cancellable at all. Check for the actual GCancellable parameter to fix it. https://bugzilla.gnome.org/show_bug.cgi?id=753735
* client: Suppress errors if daemon part is missingOndrej Holy2015-06-081-7/+3
| | | | | | | | | | | | We want to split gvfs package on client and daemon part due to app sandboxing. Return FALSE from vfs_is_active if there aren't any supported uri schemes (i.e. deamon part is missing). It will cause things to work just like if the gvfs client part was never installed. Replace some warnings/errors by g_debug to suppress errors when registering gio modules and daemon part is missing. https://bugzilla.gnome.org/show_bug.cgi?id=750401