Bug 494144

Summary: avoid automounting device-mapper + similar devices
Product: [Fedora] Fedora Reporter: Jeroen van Meeuwen <vanmeeuwen+fedora>
Component: gvfsAssignee: Tomáš Bžatek <tbzatek>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: alexl, davidz, mclasen, tbzatek, 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: 2009-04-09 18:44:28 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:

Description Jeroen van Meeuwen 2009-04-05 00:31:23 UTC
Description of problem:

DeviceKit asks the desktop user to authenticate when a process running with root privileges is creating a filesystem on a (flat-file) disk image and/or loopmounts the filesystem.

Version-Release number of selected component (if applicable):

DeviceKit-003-1.x86_64
DeviceKit-disks-003-9.fc11.x86_64
DeviceKit-power-008-0.1.20090401git.fc11.x86_64

How reproducible:

livecd-tools -c whatever.ks,  or

revisor

Actual results:

Authentication dialog appears, requesting the user authenticates as root

Expected results:

No dialog, no error, nothing whatsoever. Other applications are running here.

Additional info:

Comment 1 David Zeuthen 2009-04-06 20:47:13 UTC
First of all, there is really no good way to fix this; the same problem applies for partitioning programs, installers and so on. It's like having your cake and trying to eat. FWIW, the traditional way of working around this is to teach applications that use devices (such as anaconda, gparted and livecd-tools) to somehow "reserve" said devices to avoid policy like automounting happening. That's why we have things like "devkit-disks --inhibit" and D-Bus methods for the same.

That said, I think in this case we should fix the desktop automounter to only automount file systems that reside on "real" disk drives; e.g. where the drive is from a known bus and not some virtual abstraction like device-mapper.

Btw, filing this against DeviceKit-disks is about as meaningful as filing it against the mount(8) command. The right component would be Nautilus (since Nautilus is the policy component responsible for deciding whether a file system should be mounted) but I'm reassigning it to gvfs since the volume monitor is the one who sets the should_automount flag.

Comment 2 David Zeuthen 2009-04-09 18:44:28 UTC
Fixed in gvfs-1.2.1-2.fc11.

http://koji.fedoraproject.org/koji/taskinfo?taskID=1287838