| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
GVfs fallbacks to session bus if it is not possible to establish
peer-to-peer connection (e.g. inside Flatpak sandbox). However,
the DBus server is not terminated and the socket is leaked. The
named sockets are counted as open files, so it can easily lead to
"Too many open files" errors. Let's fallback to the session bus
immediately if the socket dir is not accessible to prevent the
leaks. This should fix the most common case, when the sockets are
leaked.
Fixes: https://gitlab.gnome.org/GNOME/gvfs/-/issues/542
|
|
|
|
|
|
|
|
| |
Recently added warnings when peer-to-peer connection fails (commit 60ca0cea)
makes visible old bug that the session bus fallback is tried regardless of
the fact that the operation was cancelled. Let's stop the operation
immediately when G_IO_ERROR_CANCELLED is returned and don't print the
warnings in this case.
|
|
|
|
|
|
| |
Asynchronous API fallbacks to session bus when peer-to-peer connection
fails, however, synchronous API fails in the same case. Let's add
fallback to session bus also for the synchronous case.
|
|
|
|
|
|
|
| |
When peer-to-peer connection fails, the session bus is silently used
instead by the asynchronous API. Let's add warnings to make it more
obvious and mention that --filesystem=xdg-run/gvfsd is probably
missing.
|
|
|
|
|
|
| |
g_vfs_icon_load_async fails if peer-to-peer connection can't be
establised. Let's add fallback to session bus as it is implemented
already on other places.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Restoring files from the trash folder is slow in Nautilus as it attempts
to do it recursively. This is because G_IO_ERROR_NOT_SUPPORTED is
returned from g_file_move when G_FILE_COPY_NO_FALLBACK_FOR_MOVE flag is
used. The error is returned from client-side for pull/push operations
after commit 2e765449 as in the most cases the copy-and-delete approach
is really used there. But the problem is that it is not in all
cases, like in the trash backend case, where the native move operation
is used in fact. Let's handle the G_FILE_COPY_NO_FALLBACK_FOR_MOVE flag
directly in the backends, but not in the trash backend.
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/1589
|
|
|
|
|
|
|
|
| |
`gvfsd-metadata` uses the `gvfs_randomize_string` function by
including `gvfsutils.h` header file from `libgvfscommon`. However,
the library is not linked, only the directory is included.
This has been fixed by linking `libgvfscommon` to `libmetadata`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The IPv6 addresses with zone identifiers are refused by GVfs currently.
THis is because of g_uri_unescape_segment failure as RFC 4007 allows bare
% sign to be used as separator. Although, RFC 6874 tries to fix that by
the %25 separator, however, at the same time, it suggests that the bare %
sign should still be accepted in user interfaces. But this would make this
too complex and lead to various problems (e.g. it would not be clear what
separator should be used for g_file_get_uri function). So I intentionally
don't plan to support what is suggested by RFC 6874 for now, which
effectively means that zone identifiers with non-ASCII chars won't be
supported. Let's skip the g_uri_unescape_segment function for IPv6 address
and also fix the gvfs_is_ipv6 function in order to accept the zone
identifiers...
Fixes: https://gitlab.gnome.org/GNOME/gvfs/-/issues/483
|
|
|
|
|
|
|
|
|
|
| |
The fuse daemon can fail when client attempts to seek backwards and seek
is not supported by the concrete backend. There is fallback for forward
seeks using `g_input_stream_skip`. Let's reopen the file and use the same
approach also for backwards seeks. This is pretty ugly to reopen the file
but similar approach is used already to emulate read/write mode.
Fixes: https://gitlab.gnome.org/GNOME/gvfs/issues/441
|
|
|
|
|
|
| |
If `G_FILE_ATTRIBUTE_TIME_MODIFIED` is not set for some reason, the
fuse daemon aborts as it expects that it is always set. Let's use
g_file_info_has_attribute to prevent the crashes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GVfs calls gvfs_dbus_daemon_proxy_new() in cancelled signal handler which
internally needs CONNECTION_LOCK(connection). The lock can be unfortunately
held by gdbus worker thread which can call g_cancellable_disconnect(). This
obviously leads to deadlocks. I don't see any reason why we have to block
g_cancellable_disconnect() because of gvfs_dbus_daemon_proxy_new() resp.
gvfs_dbus_daemon_call_cancel(). Let's call it over idle source to not block
the cancelled signal handler in order to prevent the deadlocks.
It would be better to fix this issue directly in gdbus codes, however, it
is not fully clear to me, what is a proper way to fix this.
https://gitlab.gnome.org/GNOME/glib/issues/1023
|
|
|
|
|
| |
GTimeVal is deprecated. Let's remove it in order to prevent the
deprecation warnings.
|
|
|
|
|
|
| |
Remove unnecessary while loop since g_input_stream_read_all
and g_output_stream_write_all guarantee that all data is
read/written when exiting successfully.
|
|
|
|
|
|
|
|
|
|
| |
Since we moved to fuse 3 big_writes are enabled by default.
There is no need to manually specify max_write anymore since the
set value is actually smaller than the libfuse default.
Let libfuse figure out the right value.
This increses the transfer speed from 31MiB/s to 43MiB/s between
my system and a SMB share.
|
|
|
|
|
|
| |
These macros exist in Linux headers, but they don't exist on FreeBSD.
Since fuse library always uses the same values regardless of the
platform, we just define them ourselves when they aren't defined.
|
|
|
|
|
|
|
|
|
|
| |
Gvfsd-fuse required the old 2.x versions of fuse. Fuse developers
encourage developers to transition to the actively developed libfuse
3.x. This change adapt gvfsd-fuse to build with fuse 3.x. Note that
fuse is no longer compatible with fuse 2.x. It now requires fuse 3.0.0
or later to build.
Closes: https://gitlab.gnome.org/GNOME/gvfs/issues/323
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mount info cache invalidation is not handled properly and thus client
can get "Cache invalid, retry (internally handled)" internal error, which
should not be passed to the client. This can happen if mount was unmounted
and another mount for the some location is mounted. This is now more
common with introducing stable URIs for MTP backend. G_VFS_ERROR_RETRY
error handling was probably lost as a consequence of GDBus port by commit
622a5c0d. Let's retry the operation internally again if G_VFS_ERROR_RETRY
is returned.
https://gitlab.gnome.org/GNOME/gvfs/merge_requests/30
|
|
|
|
|
|
|
|
|
| |
Although usually directory variables are set by using the `prefix`
directory, this might cause issues due to parameters that need
relative directories.
In order to ease the transition `prefix` directory has been stripped
from directory variables and only has been appended when necessary.
|
|
|
|
|
|
|
|
|
| |
The names of the variables in meson corresponding to the variables
obtained from the pkg-config files has been fixed by using a
pattern.
The pattern uses the dependency name as the prefix and the obtained
variable as the suffix.
|
|
|
|
|
|
|
| |
Since meson 0.49, the `/` character can be used to join paths[0], so
all the instances of `join_paths` have been replaced.
[0] http://mesonbuild.com/Release-notes-for-0-49-0.html#joining-paths-with-
|
|
|
|
|
|
|
| |
Add missing trailing commas that avoids getting noise when another
file/parameter is added and eases reviewing changes[0].
[0] https://gitlab.gnome.org/GNOME/dconf/merge_requests/11#note_291585
|
|
|
|
| |
This reverts commit f4ee93b06cfc4d9f727f9174e40d08097a25d571.
|
|
|
|
| |
This reverts commit 9523d8e09e0088c8cd58ace494d47cc3083151fc.
|
|
|
|
| |
This reverts commit 22e9f7721b891b17cd726f1bf92b15a35be34d22.
|
|
|
|
| |
This reverts commit db31059d1b7b11b597b03064329fb1e8899b11f2.
|
|
|
|
|
|
|
|
|
| |
Although usually directory variables are set by using the `prefix`
directory, this might cause issues due to parameters that need
relative directories.
In order to ease the transition `prefix` directory has been stripped
from directory variables and only has been appended when necessary.
|
|
|
|
|
|
|
|
|
| |
The names of the variables in meson corresponding to the variables
obtained from the pkg-config files has been fixed by using a
pattern.
The pattern uses the dependency name as the prefix and the obtained
variable as the suffix.
|
|
|
|
|
|
|
| |
Since meson 0.49, the `/` character can be used to join paths[0], so
all the instances of `join_paths` have been replaced.
[0] http://mesonbuild.com/Release-notes-for-0-49-0.html#joining-paths-with-
|
|
|
|
|
|
|
| |
Add missing trailing commas that avoids getting noise when another
file/parameter is added and eases reviewing changes[0].
[0] https://gitlab.gnome.org/GNOME/dconf/merge_requests/11#note_291585
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
To avoid the burden of maintaining multiple build systems, this
patch removes autotools support.
https://bugzilla.gnome.org/show_bug.cgi?id=786149
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Fix an if condition that resulted in trying to strdup(0x1).
https://bugzilla.gnome.org/show_bug.cgi?id=786217
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=747412
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
GSimpleAsyncResult is deprecated in favour of GTask and should be replaced.
https://bugzilla.gnome.org/show_bug.cgi?id=747412
|
|
|
|
|
|
| |
File handle may be NULL, so it has to be checked before dereferencing.
This issue was revealed by coverity scan.
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
GSimpleAsyncResult is deprecated in favour of GTask and should be replaced.
https://bugzilla.gnome.org/show_bug.cgi?id=747412
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Prevent GDaemonFile methods failures without error being set.
https://bugzilla.gnome.org/show_bug.cgi?id=777737
|
|
|
|
|
|
|
| |
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
|