| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
Flatpak applications don't work with gvfs if network access is not
granted. This is because GVfs for peer-to-peer communication uses
abstract sockets, which are tied to the network namespace. Let's use
named sockets under /run/user/$UID/gvfsd/ instead, which will allow
applications to use --filesystem=xdg-run/gvfsd to grant access.
Fixes: https://gitlab.gnome.org/GNOME/gvfs/-/issues/515
|
|
|
|
|
|
|
|
|
|
| |
EXTERNAL is the mechanism recommended in the D-Bus Specification for
all platforms where it is supported (including Linux, *BSD, Solaris
and Hurd), and is the only mechanism allowed by the session or system
dbus-daemon in their default configurations. It is considerably simpler
than DBUS_COOKIE_SHA1 and relies on fewer assumptions.
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
|
|
|
|
|
|
| |
Otherwise, an attacker who learns the abstract socket address from
netstat(8) or similar could connect to it and issue D-Bus method
calls.
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit e147e48 added missing mutex guards for job_sources, which may
unfortunately lead to deadlock because g_vfs_channel_force_close
synchronously calls g_vfs_job_source_closed which is also guarded by
the same mutex.
The deadlock reveals another bug which was in that code. The code
iterates over job_sources list, but g_vfs_job_source_closed removes
current element of the list, which leads to invalid reads and
potentially to segfaults also.
This patch tries to fix the both mentioned issues.
https://bugzilla.gnome.org/show_bug.cgi?id=794957
|
|
|
|
|
|
|
|
| |
Unmounting may finish with "File system is busy" error, but doesn't
have to be obvious why. Let's print one job which blocks for easier
debugging.
https://bugzilla.gnome.org/show_bug.cgi?id=794487
|
|
|
|
|
|
|
| |
Use daemon->lock when accessing daemon->job_sources as on other places.
This might potentially help to fix some segfaults.
https://bugzilla.gnome.org/show_bug.cgi?id=787992
|
|
|
|
|
|
|
|
|
|
|
|
| |
GSimpleAsyncResult is deprecated in favour of GTask and should be replaced.
This patch also introduce g_vfs_backend_register_mount_finish() and
g_vfs_backend_unregister_mount_finish() functions to make the code
nicer.
Based on patch from Dan Winship.
https://bugzilla.gnome.org/show_bug.cgi?id=747412
|
|
|
|
|
|
|
|
|
|
|
| |
The GVariantBuilder is unable to create any GVariant for
an untyped array - while an empty vector is a valid variant,
it is not valid for an untyped array.
Passing the resulting null to gvfs_dbus_daemon_complete_cancel()
causes gvfs to abort with a g_error().
https://bugzilla.gnome.org/show_bug.cgi?id=756105
|
|
|
|
|
|
|
| |
Random string generation is used in a few different places, so share the
implementation.
https://bugzilla.gnome.org/show_bug.cgi?id=738967
|
|
|
|
|
|
| |
We used to just load the files from this, but that does not work in
a sandboxed environment. For backwards compat we keep loading
the old files if the dbus api is not implemented yet.
|
|
|
|
|
|
|
| |
Don't abort if there are outstanding jobs when finalizing. This may
happen if the backend is force unmounted. Use a warning instead.
https://bugzilla.gnome.org/show_bug.cgi?id=710986
|
|
|
|
|
|
|
| |
User can wait to finish all jobs (not only those with opened channel)
before unmount to avoid potencial crashes.
https://bugzilla.gnome.org/show_bug.cgi?id=710986
|
|
|
|
|
|
|
|
| |
When not using abstract sockets, gvfs tries to rmdir the socket
directory but it still contains the socket so the call fails.
We now make sure to remove the socket first.
https://bugzilla.gnome.org/show_bug.cgi?id=720482
|
|
|
|
|
|
|
|
|
|
|
| |
There was a deadlock that could happen on client disconnect in
peer_connection_closed(). If the cancelled job immediately called back into
job_finished_callback() we would deadlock on daemon->mutex.
So, make sure we cancel jobs without holding the lock, just like
handle_cancel() does.
https://bugzilla.gnome.org/show_bug.cgi?id=708816
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=511802
|
|
|
|
|
|
| |
only close channels with that backend as a single daemon may handle multiple mounts/backends.
https://bugzilla.gnome.org/show_bug.cgi?id=511802
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Not really a problem in this case, but let's be on a safe side.
|
|
|
|
|
|
| |
This mimics the old behaviour and works for sync and async.
Requires new glib for g_dbus_connection_get_last_serial().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changes the way registered paths (i.e. interface skeleton exports)
are activated on daemon side. We're keeping a list of connections on which every
registered path is exported so that if connection is closed or the path is
unregistered we always free the right interface skeletons.
We also keep track of active client (peer-to-peer) connections so that if a new
path is registered, it's automatically exported to all active connections. Needed
since client connections are usually shared.
It also has a nice side-effect of reacting to dirty disconnects (e.g. the client
dies).
This whole registration machinery needs unique object paths (for the hash table)
but that's not a problem in the current state.
|
|
|
|
|
|
|
|
|
|
|
| |
Port of most of the gvfs core, few bits still missing. Lot of debug prints around,
will be removed in further commits. Same amount of TODOs and FIXMEs.
Notes:
* kill serials?
* get rid of mainloops where applicable (copy/move progress callback, enumerator)
* fix keyring integration
* use gdbus builtin fd passing within gvfsdaemon.c, kill the extra_fd stuff
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Updating the address of the FSF.
This has been done by:
while read file; do
sed -i 's:59 Temple Place:51 Franklin Street:' $file
sed -i 's:Suite 330:Fifth Floor:' $file
sed -i 's:02111-1307:02110-1301:' $file
done
https://bugzilla.gnome.org/show_bug.cgi?id=656598
Signed-off-by: Tomas Bzatek <tbzatek@redhat.com>
|
|
|
|
|
|
| |
Turned out zeroing memory is not enough in some cases so let's be
on the safe side and properly initialize all non-static mutexes.
Also, don't initialize/clear the static ones.
|
|
|
|
| |
A continuation to https://bugzilla.gnome.org/show_bug.cgi?id=661148
|
|
|
|
|
|
| |
This includes logic in a GVfsChannel to force close is as well as a
function in the GVfsDaemon to iterate over all active channels and
call the force-close function.
|
|
|
|
|
|
| |
Add a public function to schedule a job in the daemon's threadpool
making it possible for e.g. a job to "manually" implement the
try() / run() stages of job execution.
|
|
|
|
| |
This makes gvfs build with recent glib again, see bug #619537
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
gvfs <= 1.5.1 does not properly call the finalize function of backends,
due to a missing unref call. This causes the cleanup functions of the
libraries underlying the backends to not get called.
In case of the gphoto2 backend, this causes the kernel driver for dual
mode webcams (which have a kernel space webcam driver and a userspace
stillcam driver), to not get re-attached to the device when then the gvfs
mount gets unmounted.
This patch fixes this by adding a g_object_unref (job) to
g_vfs_daemon_initiate_mount, which is needed as g_vfs_daemon_queue_job
takes a reference itself.
https://bugzilla.gnome.org/show_bug.cgi?id=606194
|
|
|
|
|
|
| |
Not cancelling them caused long running jobs - like a GvfsJobPull for a
multi-GB file on a remote ftp mount - to not stop running and finish
downloading the file.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Port everything to use _with_operation() variants of unmount/eject
methods
- Add support for g_file_poll_mountable()
- new job class: GVfsJobPollMountable
- Pass mount operation for unmount/eject ops on GDaemonFile and
GDaemonMount
- receive in the appropriate GVfsJob classes
- also pass unmount flags where it was missing
- port all backends to use this
- Teach GMountSource and GMountOperationDBus about the new
GMountOperation::show-processes signal
- also provide new API
- g_mount_source_is_dummy() - e.g. when the client didn't
passed NULL for the GMountOperation
- g_mount_source_abort() - to send the ::abort signal to the
client-side GMountOperation
- make the client-side of GMountSource return ::reply with
NOT_HANDLED when we do an abort
- Refactor the mount operation handling in GProxyVolumeMonitor
- Pass mount operation for unmount/ejects in GProxyVolumeMonitor
- Pass the process id of the actual reader/writer in OpenForRead
and OpenForWrite daemon methods
- add some private API for making the FUSE client set the
pid of the POSIX client (otherwise it looks like the FUSE
client is blocking) and pass the right pid.
This is because the FUSE client is basically impersonating the
POSIX processes.
- Make the process id mentioned above available in appropriate
GVfsJob classes
- GVfsJobOpenForRead
- GVfsJobOpenForWrite
- GVfsChannel
- Provide API to get a list of all blocking clients, e.g. an array
of GPid
- g_vfs_daemon_get_blocking_processes()
- Provide convenience API to easily doing the right thing on unmount;
e.g. interact with the user about blocking processes - see the gphoto2
backend for example usage
- g_vfs_backend_has_blocking_processes()
- g_vfs_backend_unmount_with_operation() and
g_vfs_backend_unmount_with_operation_finish()
- Only the gphoto2 backend supports ::show-processes right now. Support
for other backends will be added shortly.
- Implement support for ::show-processes in the GDU volume monitor
- right now we don't support "Unmount Anyway" since it requires
ABI changes in libgdu.so - this will be changed as soon as there's
a new gnome-disk-utility release
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2009-04-16 Alexander Larsson <alexl@redhat.com>
* daemon/gvfsbackend.[ch]:
Add g_vfs_backend_is_mounted()
* daemon/gvfsdaemon.c:
(g_vfs_daemon_re_register_job_sources):
Don't re-register backends that have not finished mounted
yet. (#578861)
svn path=/trunk/; revision=2378
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2009-03-06 Alexander Larsson <alexl@redhat.com>
* daemon/daemon-main.c:
* daemon/gvfsbackend.c:
* daemon/gvfsbackendburn.c:
* daemon/gvfsbackenddav.c:
* daemon/gvfsbackendhttp.c:
* daemon/gvfsbackendobexftp.c:
* daemon/gvfsbackendtrash.c:
* daemon/gvfsdaemon.c:
* daemon/gvfsjobcloseread.c:
* daemon/gvfsjobclosewrite.c:
* daemon/gvfsjobcopy.c:
* daemon/gvfsjobdbus.c:
* daemon/gvfsjobenumerate.c:
* daemon/gvfsjobmount.c:
* daemon/gvfsjobmove.c:
* daemon/gvfsjobpull.c:
* daemon/gvfsjobpush.c:
* daemon/gvfsjobread.c:
* daemon/gvfsjobseekread.c:
* daemon/gvfsjobseekwrite.c:
* daemon/gvfsjobunmount.c:
* daemon/gvfsjobwrite.c:
* daemon/mount.c:
Convert all spew to g_debug()
svn path=/trunk/; revision=2297
|
|
|
|
|
|
|
|
|
|
|
|
| |
2009-01-21 A. Walton <awalton@gnome.org>
* daemon/gvfsdaemon.c (daemon_schedule_exit):
* daemon/gvfsjobcreatemonitor.c (create_reply):
Use g_timeout_add_seconds() instead of g_timeout_add() to save
some power.
svn path=/trunk/; revision=2177
|
|
|
|
|
|
|
|
|
|
|
| |
2008-03-04 Carlos Garcia Campos <carlosgc@gnome.org>
* common/gmountspec.c: (g_mount_spec_copy):
* daemon/gvfsdaemon.c: (g_vfs_daemon_initiate_mount):
* daemon/main.c: (main):
Fix memory leaks.
svn path=/trunk/; revision=1519
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-02-19 Alexander Larsson <alexl@redhat.com>
* lots of *.c files:
Code cleanup from Kjartan:
Removes unused code/variables.
Uses right printf types
Uses non-deprecated dbus calls.
Removes spurious ; and ,
deleted extra checks for NULL for g_free
svn path=/trunk/; revision=1302
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-01-24 Alexander Larsson <alexl@redhat.com>
* daemon/gvfsdaemon.c:
Indentation fix
* hal/ghaldrive.[ch]:
* hal/hal-device.c:
* hal/ghalvolume.c:
* hal/ghalmount.c:
Clean up coding style
* hal/ghalvolumemonitor.[ch]:
Clean up coding style
Don't show drives if we're ignoring all their
volumes (and there are volumes)
* hal/hal-pool.c:
Clean up coding style
Actually look at cap_only.
Free private dbus_connection on error
svn path=/trunk/; revision=1176
|
|
|
|
|
|
|
|
|
|
| |
2008-01-14 Alexander Larsson <alexl@redhat.com>
* daemon/gvfsdaemon.c:
Don't translate g_warning strings
svn path=/trunk/; revision=1122
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2007-11-16 Alexander Larsson <alexl@redhat.com>
* client/gdaemonfile.c:
* client/gdaemonfileinputstream.c:
* client/gdaemonfileoutputstream.c:
* client/smburi.c:
* common/gdbusutils.c:
* common/gmountsource.c:
* daemon/gvfsbackendftp.c:
* daemon/gvfsbackendtrash.c:
* daemon/gvfsdaemon.c:
* daemon/gvfsjob.c:
* daemon/gvfsjobdbus.c:
* daemon/gvfsjobopenforwrite.h:
* daemon/mount.c:
* daemon/pty_open.c:
* test/benchmark-gvfs-big-files.c:
* test/benchmark-gvfs-small-files.c:
* test/benchmark-posix-small-files.c:
Code cleanups from Kjartan Maraas.
svn path=/trunk/; revision=1031
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2007-11-14 Alexander Larsson <alexl@redhat.com>
* common/gdbusutils.c:
Handle NULL callback in _g_dbus_connection_call_async
* daemon/gvfsdaemon.c:
Re-register backends with new main daemons
svn path=/trunk/; revision=1024
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2007-11-08 Alexander Larsson <alexl@redhat.com>
* daemon/gvfsdaemon.c:
* daemon/gvfsjobmove.c:
* test/benchmark-common.c:
Fixes for solaris build.
Patches from Damien Carbery
svn path=/trunk/; revision=1019
|
|
|
|
|
|
|
|
|
|
|
|
| |
2007-11-01 Christian Kellner <gicmo@gnome.org>
* client/*.[ch]:
* common/*.[ch]:
* daemon/*.[ch]:
* test/*.[ch]:
Add copyright information to source files.
svn path=/trunk/; revision=1007
|
|
|
|
|
|
|
|
|
|
|
| |
2007-10-12 Alexander Larsson <alexl@redhat.com>
* daemon/gvfsdaemon.c:
Build fixes
Patch from Milosz Derezynski <internalerror@gmail.com>
svn path=/trunk/; revision=979
|