After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 656228 - gdu: Don't ignore fstab mounts belonging to crypto volumes
gdu: Don't ignore fstab mounts belonging to crypto volumes
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: [obsolete] gdu volume monitor
git master
Other Linux
: Normal normal
: ---
Assigned To: David Zeuthen (not reading bugmail)
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2011-08-09 17:00 UTC by Tomas Bzatek
Modified: 2011-09-15 14:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (2.40 KB, patch)
2011-08-09 17:00 UTC, Tomas Bzatek
committed Details | Review

Description Tomas Bzatek 2011-08-09 17:00:31 UTC
Created attachment 193497 [details] [review]
proposed patch

(originally filed as https://bugzilla.redhat.com/show_bug.cgi?id=599055)

The motivation is to have consistent behaviour on crypto volumes and records in fstab. Basically if we filter certain mounts out (simply for their mountpoint being in /mnt for example) but still present corresponding volumes, bad things would happen. This patch is based on assumption from existing code that crypto volumes should be always visible.

Not sure if this is the experience we want, system mounts should be hidden no matter if they're crypto or not. But it's difficult to distinguish system mounts from user ones (and match against fstab) when we are not unlocked yet.


My test case is as follows (yes, it's rather silly):
 1. have a fstab record on /dev/dm-0 mounting in /mnt/test
 2. create a crypto partition on USB stick
 3. check Nautilus sidebar, the crypto volume is shown
 4. click it, enter password to unlock
 5. an error dialog would show up saying either that /dev/dm-0 is already mounted (2nd try) or nothing would happen at all (first try)
 6. /dev/mapper/udisks-luks-uuid-e5a3a451-e26e-4cc4-a4fd-f5b0aeef1546-uid710 will be mounted (check `mount`); it's basically a symlink to '../dm-0', thus matching the fstab entry

Another test case:
 1. create a /home crypto partition, let it unlock and mount on boot
 2. start Gnome, check Nautilus sidebar
Comment 1 Tomas Bzatek 2011-08-30 15:30:35 UTC
Committed after David's quick look.


commit cbc96e8fffa0d63fae90d96a566e4000d100b492
Author: Tomas Bzatek <tbzatek@redhat.com>
Date:   Tue Aug 30 17:29:57 2011 +0200

    gdu: Don't ignore fstab mounts belonging to crypto volumes
    
    Since we always show crypto volumes, we should never ignore
    corresponding mounts even if they are supposed to be ignored.
    
    If we consider the opposite case, i.e. ignoring volumes that have
    corresponding mounts that should be hidden, we may end up with strange
    behaviour like volume disappearing after mount/unlock. It's not
    easily possible to determine that the particular unlocked volume
    is supposed to be mounted in 'hidden' path.