summaryrefslogtreecommitdiff
path: root/monitor
Commit message (Collapse)AuthorAgeFilesLines
* udisks2: Always use generic notification when unmountingOndrej Holy2016-11-181-1/+1
| | | | | | | | | | | | "You can now unplug %s\n" is used for mounts with filesystem, "%s has been unmounted\n" is used otherwise when unmounting. It is confusing to say "unplug" for drives with multiple mounts, or for drives, which need to be ejected, or stopped. I think "unplug" should be used only when ejecting, or stopping. It might lead to data loss if user unplug the device after unmounting one of several mounts. https://bugzilla.gnome.org/show_bug.cgi?id=774192
* udisks2: Add support for uuidOndrej Holy2016-11-101-0/+6
| | | | | | | | gvfs_udisks2_volume_get_uuid returns NULL regardless of the output from udisks_block_get_id_uuid currently. Set volume->uuid property and handle its changes properly. https://bugzilla.gnome.org/show_bug.cgi?id=772894
* goa: Port GVfsGoaVolume to GTaskOndrej Holy2016-10-261-103/+69
| | | | | | GSimpleAsyncResult is deprecated in favour of GTask and should be replaced. https://bugzilla.gnome.org/show_bug.cgi?id=747412
* Drop hal volume monitor and fallback code in gphoto2 and cdda backendMichael Biebl2016-10-1933-7872/+17
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=770671
* udisks2: Remove obsoleted codeOndrej Holy2016-10-171-5/+0
| | | | | Let's remove code for gio < 2.31.19, GVfs already requires a newer version.
* Revert "udisks2: Filter out system mounts"Ondrej Holy2016-10-171-3/+0
| | | | This reverts commit 078588c4698742eb8c3308275f5bc457f72b2302.
* Revert "udisks2: Use device path to match mount points also"Ondrej Holy2016-10-171-3/+1
| | | | This reverts commit b77369832fd6fb97e1f036998663f2488ff15022.
* udisks2: Fix handling of volumes with multiple mountpointsOndrej Holy2016-10-101-2/+4
| | | | | | | | | Volume is not included currently if it has multiple mount points and one of them is not considered as user interesting. Change this logic and include all volumes with at least one user interesting mount point. https://bugzilla.gnome.org/show_bug.cgi?id=772306
* Use Unicode in translatable stringsPiotr Drąg2016-10-033-5/+5
| | | | | | See https://developer.gnome.org/hig/stable/typography.html https://bugzilla.gnome.org/show_bug.cgi?id=772219
* udisks2: Filter out system mountsOndrej Holy2016-10-031-0/+3
| | | | | | | | | | | | | | System mounts (i.e. autofs) can be considered as user interesting currently if mount paths are user interesting. However, we should not handle those mounts as GMounts, because consequently redundant mounts are offered by volume monitor. It also causes automounts of autofs filesystems. $ mount | grep /media/test systemd-1 on /media/test type autofs ... localhost:/home/oholy on /media/test type nfs4 ... https://bugzilla.gnome.org/show_bug.cgi?id=771740
* udisks2: Use device path to match mount points alsoOndrej Holy2016-10-031-1/+3
| | | | | | | | | | | | | Mount path is used to match mount points currently, however device path should be used also in order to be sure it is really corresponding mount point. Same mount path can be used for multiple mount entries (it is also used e.g. for autofs). $ mount | grep /media/test systemd-1 on /media/test type autofs ... localhost:/home/oholy on /media/test type nfs4 ... https://bugzilla.gnome.org/show_bug.cgi?id=771740
* afc: Fix volume init with a locked deviceBastien Nocera2016-06-091-22/+10
| | | | | | | | | | | | | | | | | The first time we connect the device, we won't be able to create a lockdown client with a handshake, so the volume won't be created at all and will not show up in nautilus. Furthermore, we were checking the OS version with a paired lockdown client (which is not needed, an unpaired one will do just as well) and checking whether HouseArrest was supported even if the service was different. So, we never needed to have a paired lockdown client in the first place, and we only need to check for the OS version if HouseArrest is what was requested. https://bugzilla.gnome.org/show_bug.cgi?id=767399
* afc: Add more debug when initialisation failsBastien Nocera2016-06-091-1/+4
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=767399
* udisks2: Fix "format not a string literal" warningsBastien Nocera2016-06-091-9/+8
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=767349
* monitor: Add g_drive_is_removable() supportOndrej Holy2016-05-203-3/+43
| | | | | | | | | | | | | | | Nautilus wants to show entries in the sidebar only for removable devices. It uses currently sort of conditions to determine which devices should be shown. Those condition fails in some cases unfortunatelly. Lets provide g_drive_is_removable() which uses udisks Removable property to determine which devices should be shown. It should return true for all drives with removable media, or flash media, or drives on usb and firewire buses. Add support for this property also in gvfs-mount tool. Bump GLib version accordingly. https://bugzilla.gnome.org/show_bug.cgi?id=765457
* udisks2: Fix wrong types to avoid warningsOndrej Holy2016-04-292-2/+2
| | | | | | | Commit beea21e introduced incompatible-pointer-types warnings, because incompatible types was used. Fix the wrong types to avoid such warnings. https://bugzilla.gnome.org/show_bug.cgi?id=763890
* udisks2: Fix crash when mounting encrypted volumeOndrej Holy2016-04-181-1/+2
| | | | | | | | | | | | | Code handling external unlocks during mount operation was added by the commit beea21e recently. Unfortunately, it may cause crashes due to accessing already freed memory, because gvfs_udisks2_volume_monitor_update waits for pending dbus messages using udisks_client_settle, thus another main context iteration may happen (i.e. mount operation may finish and mount data may be freed) before accessing mount data pointer. The mount data pointer has to be obtained after gvfs_udisks2_volume_monitor_update call in order to fix this crashes. https://bugzilla.gnome.org/show_bug.cgi?id=765146
* udisks2: Abort mount operation if volume is unlockedOndrej Holy2016-04-061-25/+80
| | | | | | | | | | | | Mount operation for encrypted volumes consists from two udisks2 calls (unlock and mount). Volume monitor is able to mount already unlocked volumes. However password prompt doesn't disappear if the volume is unlocked externally and any reaction causes mount operation failure. The volume may be unlocked externally by e.g. project Tang, see https://github.com/latchset/tang for more details. Abort mount operation and continue with mounting in such situations. https://bugzilla.gnome.org/show_bug.cgi?id=763890
* udisks2: Lock unlocked volumes on eject/stopOndrej Holy2016-04-061-56/+160
| | | | | | | | | | The eject/stop operation fails currently with "Cannot eject drive in use: Encrypted device /dev/sdb1 is unlocked" if any volume is unlocked and isn't mounted. The volume monitor is able to mount already unlocked volumes, so it should be able to eject unlocked volumes also. Lock the unlocked volumes if there are any before eject/stop operation. https://bugzilla.gnome.org/show_bug.cgi?id=763890
* afc: Add debug info when house arrest fails to startBastien Nocera2016-03-191-0/+1
| | | | | | As can happen with some iOS and libplist combinations. https://bugzilla.gnome.org/show_bug.cgi?id=749639
* afc: Don't mount the default AFC serviceBastien Nocera2016-03-191-8/+2
| | | | | | | | | | | | | There's no interesting data for users in afc:/// so it's best to show iDevices through MTP instead. The only reason we'd want to use this mount is if we had support for accessing the iTunes database. Unfortunately, this database needs to be encrypted, and we don't know how to encrypt it. Even then, we would probably want the default AFC service to be hidden so only applications access it, and not users. https://bugzilla.gnome.org/show_bug.cgi?id=749639
* gphoto2: Show iDevices through MTPBastien Nocera2016-03-191-9/+0
| | | | | | | There's no interesting data for users in afc:/// so it's best to show iDevices through MTP instead. Stop hiding iDevices through the MTP. https://bugzilla.gnome.org/show_bug.cgi?id=749639
* udisks2: Send unmount notification only once when stoppingOndrej Holy2016-02-291-1/+2
| | | | | | | | | | Unmount notification is sent for each volume when stopping drive, which is wrong. It may lead to data loss, because user may unplug the device after the first notification, before the device is really stopped. It should be handled similary as an eject operation and send the notification only once for the drive. https://bugzilla.gnome.org/show_bug.cgi?id=760523
* udisks2: Avoid crashes during unmountOndrej Holy2016-02-151-1/+1
| | | | | | | | | Commit c014b64 was pushed to prevent race between unmount reply and retry timer. Result of mount operation reply should be stored if unmount operation is in progress, however it isn't, because the conditional statement is always true. Fix the condition accordingly. https://bugzilla.gnome.org/show_bug.cgi?id=678555
* build: Add --with-systemduserunitdir optionYaroslav Shmelev2016-01-227-7/+14
| | | | | | | | | | | This option allows maintainers to specify the directory that contain a systemd user units, or disable it. Default location for these units is /usr/lib/systemd/user. This patch will switch from hard-coded path to configurable one. The patch was modified by Ondrej Holy <oholy@redhat.com>. https://bugzilla.gnome.org/show_bug.cgi?id=760293
* udisks2: Do not show notification if unmount failedOndrej Holy2015-12-074-9/+23
| | | | | | | | | "You can now unplug..." notification is shown regardless of errors currently. Error dialog is shown together with this notification. Device might be still mounted and it might not be safe to unmount it. Therefore show this notification only if there are no errors. https://bugzilla.gnome.org/show_bug.cgi?id=746769
* 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
* proxy volume monitor: Properly handle failure to create a remote proxyDebarshi Ray2015-10-161-9/+6
| | | | | | | | | | | | We should finish constructing the innards of the object and not leave it in an inconsistent state when we hit an error. The other option would be to litter the rest of the code with NULL checks, but that would be ugly and prone to errors. We should also ensure that the reference counting stays consistent with the non-error paths. https://bugzilla.gnome.org/show_bug.cgi?id=755805
* proxy volume monitor: Guard access to the internal cachesDebarshi Ray2015-09-301-0/+8
| | | | | | | Accesses to the drives, volumes and mounts hash tables should be guarded by the proxy_vm mutex. https://bugzilla.gnome.org/show_bug.cgi?id=755805
* Add a corresponding systemd user service for every D-Bus session serviceSimon McVittie2015-09-3021-24/+190
| | | | | | | | When using "systemd --user" in conjunction with "dbus-daemon --session --systemd-activation", this ensures that each daemon is correctly placed in its own cgroup, instead of being treated as part of dbus.service. Bug: https://bugzilla.gnome.org/show_bug.cgi?id=755760
* goa: Pick up OAuth2-based accounts with a GoaFiles interfaceDebarshi Ray2015-09-081-9/+62
| | | | | | | The Google Drive backend would be OAuth2-based, so we should include such accounts too. https://bugzilla.gnome.org/show_bug.cgi?id=739008
* Make all gvfs daemons own a name under org.gtk.vfs.*Alexander Larsson2015-09-0328-28/+28
| | | | | | | | | | | | | | | | | | | This allows you to easily allow access to gvfs from a sandbox. Just give it talk access to org.gtk.vfs.* and everything will work. This change does three things: Change the existing mountpoint dbus names from org.gtk.vfs.mountpoint.foo to org.gtk.vfs.mountpoint_foo For other mountpoints, always own: org.gtk.vfs.mountpoint_$pid Change the dbus name of the volume monitors from org.gtk.Private.fooMonitor to org.gtk.vfs.fooMonitor
* proxy volume monitor: Plug a memory leakMatthias Clasen2015-07-221-1/+4
| | | | | | | | valgrind pointed out a leak here, and indeed, g_mount_get_root() is documented as transfer full, so we should unref the GFile when we are done with it. https://bugzilla.gnome.org/show_bug.cgi?id=752689
* udisks2: Prevent race between unmount reply and retry timerRoss Lagerwall2015-07-051-16/+50
| | | | | | | | | | | | | | | | | Currently it is possible for the unmount op reply and the retry unmount timer to race. A udisks2 unmount operation (or umount spawned command) is started via the timer. In the meantime, a "cancel" or "force unmount" reply is received which completes the gvfs unmount operation and frees the private data. When the udisks2 unmount operation started by the timer completes, it tries to use the freed data and segfaults. To fix this, prevent starting an unmount operation when another is already in progress. If a timer callback is received while an unmount operation is in progress, simply ignore it. If an unmount op reply is received while an unmount operation is in progress, store the result of the reply and handle it once the unmount operation has completed. https://bugzilla.gnome.org/show_bug.cgi?id=678555
* udisks2: Handle libsecret error properlyRoss Lagerwall2015-06-241-1/+2
| | | | | | | | secret_password_clear_finish() returns whether any passwords are removed, so it may return FALSE without setting error. Handle this properly (in this case all we care about is that there wasn't an error). https://bugzilla.gnome.org/show_bug.cgi?id=751038
* monitor: Show notification always when device is unmountedOndrej Holy2015-06-081-2/+0
| | | | | | | | Unmount progress is shown only when unmount takes more then 1.5 seconds. However the progress should be shown everytime when unmount is finished for users to be sure it is safe to remove device. https://bugzilla.gnome.org/show_bug.cgi?id=750267
* monitor: Rename deprecated g_unix_mount_monitor_newOndrej Holy2015-04-203-3/+3
| | | | | | | g_unix_mount_monitor_new is deprecated now. It was renamed to g_unix_mount_monitor_get, because it is singleton. See Bug 742599. https://bugzilla.gnome.org/show_bug.cgi?id=712382
* hal: Fix a memory leak in hal-volume-monitor.David Liang2015-04-021-0/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=747221
* Fix build error when using HAL backendTing-Wei Lan2015-04-026-584/+7
| | | | | | gvfsdbusutils.[ch] are renamed to gvfshalutils.[ch] to prevent confusion. https://bugzilla.gnome.org/show_bug.cgi?id=722411
* proxy volume monitor: Drop init warningOndrej Holy2015-03-191-1/+1
| | | | | | | | | | This caused make to fail e.g. in libgweather: (g-ir-compiler:11785): GVFS-RemoteVolumeMonitor-WARNING **: Error: The connection is closed kernel: traps: g-ir-compiler[4216] trap int3 ip:7f76f9fa2663 sp:7fff1e6a2d90 error:0 With gvfs-1.22.3 no error's https://bugzilla.gnome.org/show_bug.cgi?id=746398
* proxy volume monitor: Drop init warning if gvfs dbus service is not installedAlexander Larsson2015-02-201-1/+1
| | | | This caused make check to fail in gtk+
* build: Fix out of tree buildRoss Lagerwall2015-01-261-0/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=743551
* ProxyVolumeMonitor: Load list of installed remote monitors via dbusAlexander Larsson2015-01-261-1/+59
| | | | | | 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.
* Move proxy monitor implementation listing to commonAlexander Larsson2015-01-261-98/+12
| | | | | | | | Also add some to/from_dbus helpers. This is in preparation for moving the reading of the monitor files to the gvfs daemon, which is needed for the sandboxed case where the monitor files are not necessarily the same as the host installed ones.
* Do not call NULL callbacks in eject_wrapper_callback()Siteshwar Vashisht2015-01-161-1/+2
|
* goa: Pass "password" as ID when fetching the passwordDebarshi Ray2014-10-241-3/+1
| | | | | | | | | | | | | | Passing GoaAccount:id to GetPassword makes no logical sense. It works because it is ignored by GOA for ownCloud accounts. The ID is meant as a key when an account might have multiple passwords. eg., an email account can have separate passwords for IMAP and SMTP, and the keys can be "imap-password", "smtp-password". This is not the case for ownCloud and the ID field is ignored by GOA because the key is always "password". Since ownCloud is the only password-based account that this volume monitor supports, let's just use "password". https://bugzilla.gnome.org/show_bug.cgi?id=739078
* goa: Clean upDebarshi Ray2014-10-211-12/+0
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=738883
* afc: Clean upDebarshi Ray2014-10-211-12/+0
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=738883
* goa: Fix a memory leakDebarshi Ray2014-10-211-1/+5
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=738878
* gphoto2: Add symbolic icon for volumeRoss Lagerwall2014-10-131-0/+16
| | | | | | Add a symbolic icon to the volume using the new shared API. https://bugzilla.gnome.org/show_bug.cgi?id=736285