Bug 22914 - require user password to eject a CD or DVD mounted by the same user
Summary: require user password to eject a CD or DVD mounted by the same user
Status: RESOLVED FIXED
Alias: None
Product: udisks
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: David Zeuthen (not reading bugmail)
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-23 10:32 UTC by Sebastien Bacher
Modified: 2009-08-17 14:08 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
The log for the cdrom device (1.92 KB, text/plain)
2009-08-17 12:48 UTC, Sebastien Bacher
Details

Description Sebastien Bacher 2009-07-23 10:32:45 UTC
Using GNOME 2.27 with devicekit-disks 005 on Ubuntu karmic devkit-disks --unmount /dev/sr0 ask for a password to unmount the disk, GNOME has been automounting the CD and nautilus ask for a password too on eject
Comment 1 David Zeuthen (not reading bugmail) 2009-08-17 10:14:23 UTC
Really need more detail than this - in general please include the information requested here

 http://www.freedesktop.org/wiki/Software/DeviceKit-disks

Anyway, it sounds to me like the device is mounted by something else than DeviceKit-disks - maybe HAL via gnome-mount. The /etc/mtab should provide a clue.

Closing as INVALID until more information is provided. Please reopen if it is still an issue. Thanks.
Comment 2 Sebastien Bacher 2009-08-17 12:46:34 UTC
The issue is still there:
- run GNOME without nautilus running so there is no automounting
- insert the CD
- run "mount | grep cd" -> nothing
- run "devkit-disks --mount /dev/sr0"
- run "mount | grep cd" -> "/dev/sr0 on /media/cdrom0 type iso9660 (ro,nosuid,nodev,user=usename" where "username" is the user who ran the command
- run "devkit-disks --dump >log", log coming
- run "devkit-disks --unmount /dev/sr0"

you get asked for a password to unmount the disk there
Comment 3 Sebastien Bacher 2009-08-17 12:48:08 UTC
Created attachment 28712 [details]
The log for the cdrom device
Comment 4 David Zeuthen (not reading bugmail) 2009-08-17 13:09:04 UTC
(In reply to comment #2)
> The issue is still there:
> - run GNOME without nautilus running so there is no automounting
> - insert the CD
> - run "mount | grep cd" -> nothing
> - run "devkit-disks --mount /dev/sr0"
> - run "mount | grep cd" -> "/dev/sr0 on /media/cdrom0 type iso9660
> (ro,nosuid,nodev,user=usename" where "username" is the user who ran the command

Please attach the output of 'cat /etc/mtab' and 'sudo cat /var/lib/DeviceKit-disks/mtab' after doing this.

The relevant line from /etc/mtab should look like this

 /dev/sr1 /media/Setup iso9660 ro,nosuid,nodev,uhelper=devkit,uid=500,gid=500,iocharset=utf8,mode=0400,dmode=0500 0 0

and the relevant like from the latter like this

 %2Fdev%2Fsr1 %2Fmedia%2FSetup 500 1

It looks like something is wrong because it should definitely include 'uhelper=devkit'.

> - run "devkit-disks --dump >log", log coming
> - run "devkit-disks --unmount /dev/sr0"
> 
> you get asked for a password to unmount the disk there

This doesn't happen on my machine - it just works here. What version of DeviceKit-disks are you running?
Comment 5 David Zeuthen (not reading bugmail) 2009-08-17 13:10:09 UTC
Ah, wait a minute. Sounds like the cdrom device is in /etc/fstab. Please include the output of 'cat /etc/fstab' as well. Thanks.
Comment 6 David Zeuthen (not reading bugmail) 2009-08-17 13:16:25 UTC
With this setup I get a polkit authentication dialog when trying to unmount the device - it says "Authentication is required to unmount devices mounted by another user". Is it the same dialog you are getting?

(Alos, in the future please include either a screenshot or the text from the dialog - makes it easier to figure out what is going wrong)
Comment 7 Sebastien Bacher 2009-08-17 13:24:24 UTC
there is a "/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto,exec 0       0" lines in the fstab configuration

> With this setup I get a polkit authentication dialog when trying to unmount the
device - it says "Authentication is required to unmount devices mounted by
another user". Is it the same dialog you are getting?

Yes that's the same dialog there


> (Alos, in the future please include either a screenshot or the text from the
dialog - makes it easier to figure out what is going wrong)

ok, sorry about that will do it for the next bug
Comment 8 David Zeuthen (not reading bugmail) 2009-08-17 14:08:07 UTC
Should be fixed with

http://cgit.freedesktop.org/DeviceKit/DeviceKit-disks/commit/?id=e57f8698b52a9eaf5c848b5f5e27af3eee80b7b9


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.