| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
We check to see if the desired file name already exists before doing
a renaming by stat'ing the file (to prevent smb from destroying an
existing file). Since smb is not case sensitive, the check for an
existing file mistakenly returns true if we are only changing the
filename's case.
Add a second check to see whether we are simply changing the
case of the filename.
Fixes: https://gitlab.gnome.org/GNOME/gvfs/-/issues/672
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the case of an application monitoring the trash can, delete a file
on the mounted device to the trash can, and then unmount the device.
At this time, if you check the status of the trash can, you will find
that the number of files queried is inconsistent with the number of
files obtained through the enumeration job. This is because the number
of files queried includes some files that do not exist when the device
is unmounted. The solution is to synchronize the status of the trash
can in time to ensure that the trash can does not record files that do
not exist.
|
|
|
|
|
|
|
|
| |
When the push method in DAV baclend is called with a nonexistent source
file, the `GLib-GObject-CRITICAL **: 12:07:04.743: g_object_unref:
assertion 'G_IS_OBJECT (object)' failed` message is printed because
the `g_object_unref` function is called for a `NULL` pointer. Let's
use `g_clear_object` instead to avoid this.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, using `FileProgressCallback` is quite confusing as
`current_num_bytes` is in uncompressed bytes unlike `total_num_bytes`
which is in compressed bytes.
In order to solve this issue, we disable compression in `query_info` by
setting the "Accept-Encoding" flag to `identity` (none). Then whenever
`query_info_on_read` is called, we make sure that the request wasn't set
to accept compresssion and fallback to `query_info` if it is the case.
Fixes #195
|
|
|
|
|
|
|
|
| |
In several places, the code compares to strings by comparing
their pointers instead of using g_strcmp0(). Although this
seems to work, it is incorrect.
This MR fixes it.
|
|
|
|
|
|
|
|
|
|
|
| |
When the username is not part of an URI, then the following message is
printed: `GVFS-CRITICAL **: 12:31:47.663: g_mount_spec_set_with_len_internal:
assertion 'value != NULL' failed`. This is because `g_mount_spec_set` is
called with `NULL`. It possibly lead to crash when it is build with the
`G_DISABLE_CHECKS` option. This bug was introduced recently by the commit
6636d89f. Let's check the value before setting it to fix this.
Related: https://gitlab.gnome.org/GNOME/gvfs/-/issues/644
|
|
|
|
|
|
|
|
|
|
| |
After gvfsd-ftp is connected to the ftp server, if the ftp server
stops, the gvfsd-ftp sending request will be stuck, even after the ftp
server is started, it still cannot be recovered. This is because
ftp->connections is not updated when the connection is released,Thus
let ftp->connections decrement by one when the connection is released.
https://gitlab.gnome.org/GNOME/gvfs/-/merge_requests/149
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Meson is currently configured to search the gvfs builder's PATH for an
ssh client, and hardcode its fullpath as the canonical ssh client for
the gvfs sftp backend.
This setup breaks in cases where the builder has a different ssh client
from the final runtime root, or where the client's pathes differ.
Builders using OpenEmbedded or buildroot workspaces are particularly
affected.
Instead, set SSH_PROGRAM to `ssh` so that it gets PATH-expanded at
runtime.
Closes: https://gitlab.gnome.org/GNOME/gvfs/-/issues/465
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
|
|
|
|
|
|
|
| |
GVfs doesn't support x-large and xx-large thumbnails currently. Consequently,
thumbnails are not shown for remote locations in Nautilus on HiDPI screens.
GLib added support for them over glib!2941 recently. Let's do the similar
change for GVfs.
Relates: glib#2767
|
|
|
|
|
| |
The `mount_try_again` variable is redundant since it is set to `TRUE` in
all cases. Let's remove it to sligtly improve readability of the code.
|
|
|
|
|
|
|
|
|
|
|
| |
After the recent samba change, the "Invalid Argument" error can be still
returned when anonymous login is requested even after the commit 747c7f6.
This is because `smbc_setOptionNoAutoAnonymousLogin` is called after returning
from the `auth_callback` function (i.e. there is one redundant iteration).
Let's rework the handling a bit and call that immediately, which bypasses
the issue.
Fixes: https://gitlab.gnome.org/GNOME/gvfs/-/issues/619
|
|
|
|
|
|
|
|
|
|
| |
Currently, the HTTP backend fails with the "The specified location is
not mounted" error for URIs with path containing escaped characters.
This is because the mount prefix is not unescaped. This is unfortunatelly
another libsoup3 port regression. Let's correctly unescape the prefix to
make that work again.
Fixes: https://gitlab.gnome.org/GNOME/gvfs/-/issues/623
|
|
|
|
|
|
|
|
|
| |
The recent commits break build when Avahi support is disabled. Let's add
the missing ifdef directive and move some variable declarations to fix
the build. Part of this change was originally proposed by the reporter of
GNOME/gvfs#621.
Fixes: https://gitlab.gnome.org/GNOME/gvfs/-/issues/621
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, it is not possible to connect to some Nextcloud servers when
a username is part of URI. So this also affects volumes configured over
GOA. The main problem seems to be that Nextcloud doesn't send the
`WWW-Authenticate` header as a part of 401 response in certain cases (e.g.
when 2FA is enabled). A recent libsoup change leads to the situation that
DAV backend doesn't have a chance to specify a password as the `authenticate`
signal is not called at all. This is because libsoup tries to authenticate
with an empty password first. Let's drop the username from URI to avoid the
password-less login attempt so the backend has at least one chance to try
some password in this case...
Fixes: https://gitlab.gnome.org/GNOME/gvfs/-/issues/617
|
|
|
|
|
|
|
|
|
|
| |
The mount operation hangs for DNS-SD style URIs (i.e. with `dav+sd` and
`davs+sd` schemes) after the recent commit 9203fad5. This is because the
backend now uses the asynchronous APIs, but the `GVfsDnsSdResolver` is still
used synchronously. Let's use asynchronous API for the resolver as well to
fix the hangs.
Fixes: https://gitlab.gnome.org/GNOME/gvfs/-/issues/618
|
|
|
|
|
|
|
|
| |
With samba 4.16.0, mount operation fails with the "Invalid Argument" error
when kerberos/ccache is misconfigured. Ignore this error, so user get a chance
to login using the password...
Fixes: https://gitlab.gnome.org/GNOME/gvfs/-/issues/611
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since libsoup3 cannot deal with threads, we cannot use the do_
methods which execute in a thread pool. However, we can implement
these in an async manner, which will bypass the thread pool and
get rid of the issue.
The write methods are left synchronous as they deal with a memory
output stream and do not actually call libsoup. Therefore, we do
not have to care whether they are threaded or not.
Fixes: https://gitlab.gnome.org/GNOME/gvfs/-/issues/609
|
|
|
|
|
|
|
|
|
|
| |
The use of g_uri_build was also bad, since otherwise we would
run into this: https://gitlab.gnome.org/GNOME/glib/-/issues/2619
While this should be fixed in glib, we need to work around this
behavior for existing installations.
Fixes: https://gitlab.gnome.org/GNOME/gvfs/-/issues/614
|
|
|
|
|
|
|
|
|
| |
The `mount_base` uri is unreffed twice. First time over the local `mount_base`
pointer and for the second time over the `G_VFS_BACKEND_HTTP (backend)->mount_base`
pointer. This leads to `SIGABRT` from the `__pthread_kill_implementation`
function. Let's remove that extra unref to fix this crashes.
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2066717
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The dav and http backends of the daemon now use libsoup3. Things
should work more or less the same as before.
One caveat is that the soup session no longer defaults to
ssl-strict, so it will no longer silently accept certificates.
This does not affect the DAV backend (it has its own handling
which is replicated in the soup3 port) but it does affect the
http backend.
Fixes: https://gitlab.gnome.org/GNOME/gvfs/-/issues/208
|
|
|
|
|
|
|
|
| |
The positional argument was being silently ignored until meson 0.60.0 where
it fails with "ERROR: Function does not take positional arguments".
Related: https://github.com/mesonbuild/meson/issues/9441
Fixes: https://gitlab.gnome.org/GNOME/gvfs/-/issues/599
|
|
|
|
|
|
|
|
|
|
| |
SFTP backend fails when connecting with the "Timed out when logging in"
error with the recent OpenSSH versions. This is because their password
prompts are now prefixed by the `(user@host)` string, which breaks our
`g_str_has_prefix` checks. Let's use `strstr` instead to fix this issue
and also to not break compatibility with old versions and other vendors.
Fixes: https://gitlab.gnome.org/GNOME/gvfs/-/issues/584
|
|
|
|
|
|
| |
The files generated on configure time have been improved by the
stacking multiple configuration processes, use of generator tags and
the use of dictionaries.
|
|
|
|
|
|
| |
To be consistent with the whole set of build files, the
`include_directories` have been replaced by string based
alternative.
|
|
|
|
|
|
|
|
|
| |
Dictionaries can be used to ease `foreach` statements due to their
natural unpacking system[0].
This system has been used to ease some loops.
[0] https://mesonbuild.com/Syntax.html#foreach-with-a-dictionary
|
|
|
|
|
|
|
|
|
|
|
|
| |
The external program object returned by `find_program()` has been
fixed and its `path` method has been deprecated and `full_path` is
the method to be called[0].
The deprecated `path` method has been updated in meson build files.
Required meson version has also been bumped to 0.55.
[0] https://mesonbuild.com/Release-notes-for-0-55-0.html#find_program-fixes-when-the-program-has-been-overridden-by-executable
|
|
|
|
|
|
| |
The `g_spawn_check_exit_status` function is deprecated now and
`g_spawn_check_wait_status` should be used instead. Let's make that
change and bump the glib dependency accordingly.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The `PartOf` directive sets up a one-way dependency between
`graphical-session.target` and our services, so that when
`graphical-session.target` is stopped or restarted, our services also get
stopped or restarted.
This ensures that gvfs daemons that were started in the context of a GUI
login session (through dbus activation) do not continue to run after the
user has logged out.
See `systemd.unit(5)` for more info.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This puts all gvfs systemd services (which are all dbus-activated through
`SystemdService=`) inside of the `session` slice that was introduced in
v249 (https://github.com/systemd/systemd/pull/16603) and described in
https://systemd.io/DESKTOP_ENVIRONMENTS/ and `systemd.special(7)`
This allows sysadmins or OS integrators to assign higher-priority
`systemd.resource-control(5)` on `session.slice` and have it propagate
down to important session services such as gvfs, so that the gvfs daemons
receive sufficient priority for resource allocations to keep the session
running smoothly under load.
Note that it still works on older systemd
(the slice, which is just a cgroup inner directory, is created on demand)
|
|
|
|
|
|
|
|
|
| |
Currently, the mount operation for the admin backend can hang when the
authentication dialog is dismissed for example. This is because `pkexec`
exits before spawning the `gvfsd-admin` daemon. Let's catch that case
and return the "Permission denied" error.
Fixes: https://gitlab.gnome.org/GNOME/gvfs/-/issues/565
|
|
|
|
|
|
|
|
|
| |
Currently, `wheel` group is hardcoded in the `.rules` file which is there
to prevent redundant password prompt when starting gvfsd-admin. The Debian
based systems obviously uses `sudo` group instead of `wheel`. Let's make
the privileged group configurable.
https://gitlab.gnome.org/GNOME/gvfs/-/issues/565
|
|
|
|
|
|
|
|
|
| |
Currently, critical errors are printed when peer credentials aren't
available (i.e. session bus fallback is used). Let's return an error
immediately to prevent the criticals. Also add warning with suggestion
to allow `--filesystem=xdg-run/gvfsd` access.
https://gitlab.gnome.org/GNOME/gvfs/-/issues/305
|
|
|
|
|
|
|
|
|
|
|
| |
Recently, GVfs switched from abstract sockets to named sockets. The
sockets are created in the `XDG_RUNTIME_DIR` directory. This directory
is not unfortunatelly set for `gvfsd-admin` and thus the root's cache
dir is used instead, which is wrong. Let's pass the `XDG_RUNTIME_DIR`
environment variable to the `pkexec` environment similarly to
`DBUS_SESSION_BUS_ADDRESS`.
Fixes: https://gitlab.gnome.org/GNOME/gvfs/-/issues/552
|
|
|
|
|
|
|
|
|
|
| |
Recently, GVfs switched from abstract sockets to named sockets. The
named sockets honors file permissions and thus the socket owner is root
in the case `gvfsd-admin`. This obviously prevents client from connecting.
Let's change the owner to the value of `PKEXEC_UID` to ensure that the
socket is usable by the client.
https://gitlab.gnome.org/GNOME/gvfs/-/issues/552
|
|
|
|
|
|
|
|
|
|
|
| |
Recently, GVfs switched from abstract sockets to named sockets. The
socket dir is currently created by the individual daemons immediately
before starting DBus server. If gvfsd-admin is started at first, the
socket dir is owned by root user and thus it isn't accesible for other
daemons and clients. Let's create the socket dir early from the gvfsd
daemon to ensure correct ownership.
https://gitlab.gnome.org/GNOME/gvfs/-/issues/552
|
|
|
|
|
|
|
|
|
|
| |
The naming scheme for the non-abstract socket was changed but
`new_connection_data_free` was not adjusted to match.
`GDBusServer` will remove the socket when it stops, but only if
`g_dbus_server_start` was called. So we can simplify the process
somewhat. Also don't bother removing the directory now that all sockets
share it.
|
|
|
|
|
| |
The comment in the .rules file contains `another prompts` phrase which is
wrong. Let's use `another prompt` instead of it.
|
|
|
|
|
|
|
|
| |
Currently, it is not possible to browse files available over Shared drives
(formerly Team drives). Let's add Shared drives folder to the root to make
them available.
Fixes: https://gitlab.gnome.org/GNOME/gvfs/-/issues/377
|
|
|
|
|
|
| |
The G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE and G_FILE_ATTRIBUTE_ACCESS_CAN_READ
attributes are not set currently. Let's use the newly added libgdata API to
set them.
|
|
|
|
|
|
| |
The My Drive folder was added to the root, which changed URIs from
/file-id to /root-id/file-id. Let's provide volatile entries in the
old locations to not break user bookmarks...
|
|
|
|
|
|
|
|
| |
Currently, it is not possible to browse files which are shared with the
user (the Shared with me folder on the web). Let's add My Drive and Shared
with me folder to the root to make them available.
Fixes: https://gitlab.gnome.org/GNOME/gvfs/-/issues/444
|
|
|
|
|
|
|
|
|
| |
Currently, only 50 results are returned in one batch, which means that
multiple network requests are needed for folders with a lot files, which
makes it slow. I am not sure there was some reason for this limitation
earlier (e.g. before the cache rework), however, I don't see any
rationals for it currently. Let's increase this to its maximum for
better performance.
|
|
|
|
|
|
|
| |
GVfs build with --werror fails currently because of glib!1719. Let's
drop the volatile qualifier as it doesn't help with atomicity anyway.
Relates: https://gitlab.gnome.org/GNOME/glib/-/issues/600
|
|
|
|
|
|
|
| |
It can be correctly implied from the value of filesystem::remote for
many backends, but let's make it explicit for them too.
Fixes https://gitlab.gnome.org/GNOME/gvfs/-/issues/497
|
|
|
|
|
|
|
| |
These backends are special and their "files" are links to locations
from other backends. I doesn't make sense to preview them.
https://gitlab.gnome.org/GNOME/gvfs/-/issues/497
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
filesystem::preview-type used to be IF_LOCAL for this backedn but it
has been unset by commit a71469c79fd31adfc594a55afd29a7ce2202b270
The commit message says it should be treated as remote filesystems.
However, filesystem::remote is set to FALSE, so application would
still interpret this as local for previewing purposes.
Set filesystem::preview-type to get the result expected by that commit.
https://gitlab.gnome.org/GNOME/gvfs/-/issues/497
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The layout of the modal dialogs in gnome-shell changed [1] and the title
now is larger and uses the style of a headline. Make sure all titles
remain fully visible and use shorter strings for those.
Also unify the generic "Enter password" strings a bit to make work
easier for translators and use this string for most cases:
"Authentication Required\nEnter password for “%s”:"
[1] https://gitlab.gnome.org/GNOME/gnome-shell/issues/1343
|
|
|
|
|
|
|
|
| |
gphoto2 does this since commit 983186766060ec82e260f8cd9a5160b93b2ae958
The same rationale applies to MTP.
https://gitlab.gnome.org/GNOME/gvfs/-/issues/497
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The MTP spec section 5.2.2.7 allows `StorageDescription` to be
an empty string.
`libmtp` currently translates this to
char * StorageDescription = NULL
instead of `""` in `ptp_unpack_SI()` via `ptp_unpack_string()`.
(I'm not sure if it's good that it does that, to be followed up on separately.)
`create_storage_name()` until now returned
`g_strdup(storage->StorageDescription)`, which returns `NULL` if `NULL` is
given, and thus `get_storage_info()` would eventually call
char *storage_name = NULL = create_storage_name(storage);
g_file_info_set_name (info, storage_name = NULL);
g_file_info_set_display_name (info, storage_name = NULL);
resulting in assertion failures in `gvfsd`:
g_file_info_set_name: assertion 'name != NULL' failed
g_file_info_set_display_name: assertion 'display_name != NULL' failed
as well as crashes in file managers like Thunar:
g_file_get_child: assertion 'name != NULL' failed
and warnings in Nautilus like:
Got GFileInfo with NULL name in mtp://Ricoh_Company__Ltd._RICOH_THETA_V_00165759/, ignoring. This shouldn't happen unless the gvfs backend is broken.
This commit fixes it by adding a contract to `create_storage_name()`
that it will never represent empty strings as NULL.
|
| |
|