Bug 460223

Summary: gnome-mount no longer automatically opens LUKS-encrypted partitions
Product: [Fedora] Fedora Reporter: Michel Lind <michel>
Component: gvfsAssignee: Tomáš Bžatek <tbzatek>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: alexl, davidz, tsmetana
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-08-29 00:02:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
screenshot showing one locked device and one device luksOpen-ed manually
none
untested patch none

Description Michel Lind 2008-08-26 20:51:00 UTC
Created attachment 315046 [details]
screenshot showing one locked device and one device luksOpen-ed manually

Description of problem:
In Fedora 10 alpha, LUKS-encrypted partitions are automatically opened as described in http://www.redhatmagazine.com/2008/07/31/whats-next-in-red-hat-enterprise-linux-part-2/

Now, however, while the partition is seen (in Nautilus' Computer view), I have to open it with 'cryptsetup luksOpen' manually. gnome-mount then automatically mount the device as previously, and correctly use the icon for an unlocked device.

Version-Release number of selected component (if applicable):
gnome-mount-0.8-1.fc9.x86_64
hal-0.5.11-3.fc10.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Plug in a removable media with a LUKS-encrypted partition
  
Actual results:
As described above

Expected results:
User prompted for passphrase; LUKS partition opened and mounted

Additional info:
gnome-mount now silently fails on the command line (return value=1):
$ /usr/bin/gnome-mount -v -t --hal-udi || echo $?
1

not sure if this is related to the Fedora 8 bug,
https://bugzilla.redhat.com/show_bug.cgi?id=415161

which is still open.

Comment 1 Matthias Clasen 2008-08-27 02:08:47 UTC
Created attachment 315062 [details]
untested patch

Does this patch help ?

Comment 2 Michel Lind 2008-08-27 02:33:42 UTC
Does not seem to help, no.

Comment 3 David Zeuthen 2008-08-28 21:16:19 UTC
I can confirm that I don't see the dialog automatically pop up. And also that nothing happens when I click the icon in Nautilus. However it works fine using gnome-mount directly. Also, if set up via gnome-mount, "unmounting" (in quotes because this means first unmounting, then tearing down the cleartext device) works fine from Nautilus.

All this indicates it's a bug in gvfs, not gnome-mount (not surprising since gnome-mount haven't seen a lot of changes). So reassigning; I'll try to work on a fix.

I'm curious, Michel does

 $ gnome-mount -v -b -d /dev/sdb2
 (replace /dev/sdb2 with the crypted device, make sure
  you haven't set up the cleartext device on the command line)

work for you?

Comment 4 Michel Lind 2008-08-28 23:55:39 UTC
Funnily enough, it was (In reply to comment #3)
> I can confirm that I don't see the dialog automatically pop up. And also that
> nothing happens when I click the icon in Nautilus. However it works fine using
> gnome-mount directly. Also, if set up via gnome-mount, "unmounting" (in quotes
> because this means first unmounting, then tearing down the cleartext device)
> works fine from Nautilus.
> 
> All this indicates it's a bug in gvfs, not gnome-mount (not surprising since
> gnome-mount haven't seen a lot of changes). So reassigning; I'll try to work on
> a fix.
> 
> I'm curious, Michel does
> 
>  $ gnome-mount -v -b -d /dev/sdb2
>  (replace /dev/sdb2 with the crypted device, make sure
>   you haven't set up the cleartext device on the command line)
> 
> work for you?
Funnily enough, it was the exact same command (sdb1 = a vfat partition for livecd-iso-to-disk and to give customs officials something to play with).

I can confirm that it works, and unmounting tears down the LUKS mapping as well. Thanks!

Comment 5 David Zeuthen 2008-08-29 00:02:20 UTC
I've committed a fix upstream for the problem that "mounting" luks volumes doesn't work

2008-08-28  David Zeuthen  <davidz>

        * monitor/proxy/gproxyvolume.c: (g_proxy_volume_mount):
        * monitor/proxy/gvfsproxyvolumemonitordaemon.c:
        (handle_volume_mount): Make sure we really read mount_flags and
        use_mount_operation. Fixes RH bug 460223.

This fix will appear in the next gvfs release (on Monday) and will subsequently appear in Rawhide a day or two after.

The patch itself is here

http://svn.gnome.org/viewvc/gvfs/trunk/monitor/proxy/gvfsproxyvolumemonitordaemon.c?r1=1858&r2=1916&view=patch

if you need it fixed earlier.