ask admin password for hfs volume on external volume

Bug #95988 reported by didier on 2007-03-25
2
Affects Status Importance Assigned to Milestone
hal (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: gnome-mount

since #84044 fix (I think) gnome-mount, or is it gnome-volume-manager?, ask for admin password when mounting external hfs USB disk (with or without partition table). If the user is in plugdev group it doesn't make a lot of sense:
ls /dev/sdb
brw-rw---- 1 root plugdev 8, 16 2007-03-25 17:42 /dev/sdb

It doesn't ask for vfat or ext3, as usual.

output of lshal
udi = '/org/freedesktop/Hal/devices/storage_serial_USB_USB_BAR'
  info.addons = {'hald-addon-storage'} (string list)
  block.storage_device = '/org/freedesktop/Hal/devices/storage_serial_USB_USB_BAR' (string)
  info.udi = '/org/freedesktop/Hal/devices/storage_serial_USB_USB_BAR' (string)
  storage.partitioning_scheme = 'none' (string)
  storage.removable.media_size = 65404928 (0x3e60000) (uint64)
  storage.requires_eject = false (bool)
  storage.hotpluggable = true (bool)
  info.capabilities = {'storage', 'block'} (string list)
  info.category = 'storage' (string)
  info.product = 'USB BAR' (string)
  info.vendor = '' (string)
  storage.size = 0 (0x0) (uint64)
  storage.removable = true (bool)
  storage.removable.media_available = true (bool)
  storage.physical_device = '/org/freedesktop/Hal/devices/usb_device_ea0_6828_noserial_if0' (string)
  storage.lun = 0 (0x0) (int)
  storage.firmware_version = '1.89' (string)
  storage.serial = 'USB_USB_BAR' (string)
  storage.vendor = '' (string)
  storage.model = 'USB BAR' (string)
  storage.drive_type = 'disk' (string)
  storage.automount_enabled_hint = true (bool)
  storage.media_check_enabled = true (bool)
  storage.no_partitions_hint = false (bool)
  storage.bus = 'usb' (string)
  block.is_volume = false (bool)
  block.minor = 16 (0x10) (int)
  block.major = 8 (0x8) (int)
  block.device = '/dev/sdb' (string)
  linux.hotplug_type = 3 (0x3) (int)
  info.parent = '/org/freedesktop/Hal/devices/usb_device_ea0_6828_noserial_if0_scsi_host_scsi_device_lun0' (string)
  linux.sysfs_path_device = '/sys/block/sdb' (string)
  linux.sysfs_path = '/sys/block/sdb' (string)

udi = '/org/freedesktop/Hal/devices/volume_label_didier'
  volume.unmount.valid_options = {'lazy'} (string list)
  volume.mount.valid_options = {'ro', 'sync', 'dirsync', 'noatime', 'nodiratime', 'noexec', 'quiet', 'remount', 'exec', 'uid=', 'force'} (string list)
  org.freedesktop.Hal.Device.Volume.method_execpaths = {'hal-storage-mount', 'hal-storage-unmount', 'hal-storage-eject'} (string list)
  org.freedesktop.Hal.Device.Volume.method_argnames = {'mount_point fstype extra_options', 'extra_options', 'extra_options'} (string list)
  org.freedesktop.Hal.Device.Volume.method_signatures = {'ssas', 'as', 'as'} (string list)
  org.freedesktop.Hal.Device.Volume.method_names = {'Mount', 'Unmount', 'Eject'} (string list)
  info.interfaces = {'org.freedesktop.Hal.Device.Volume'} (string list)
  volume.ignore = false (bool)
  info.udi = '/org/freedesktop/Hal/devices/volume_label_didier' (string)
  info.product = 'didier' (string)
  volume.size = 65404928 (0x3e60000) (uint64)
  volume.num_blocks = 127744 (0x1f300) (int)
  volume.block_size = 512 (0x200) (int)
  info.capabilities = {'volume', 'block'} (string list)
  info.category = 'volume' (string)
  volume.is_partition = false (bool)
  volume.is_disc = false (bool)
  volume.linux.is_device_mapper = false (bool)
  volume.is_mounted_read_only = false (bool)
  volume.is_mounted = true (bool)
  volume.mount_point = '/media/didier' (string)
  volume.label = 'didier' (string)
  volume.uuid = '' (string)
  volume.fsversion = '' (string)
  volume.fsusage = 'filesystem' (string)
  volume.fstype = 'hfs' (string)
  storage.model = '' (string)
  block.storage_device = '/org/freedesktop/Hal/devices/storage_serial_USB_USB_BAR' (string)
  block.is_volume = true (bool)
  block.minor = 16 (0x10) (int)
  block.major = 8 (0x8) (int)
  block.device = '/dev/sdb' (string)
  linux.hotplug_type = 3 (0x3) (int)
  info.parent = '/org/freedesktop/Hal/devices/storage_serial_USB_USB_BAR' (string)
  linux.sysfs_path_device = '/sys/block/sdb/fakevolume' (string)
  linux.sysfs_path = '/sys/block/sdb/fakevolume' (string)

Move to hal,

cf. tools/hal-storage-mount.c handle_mount()
around line 727

                /* don't consider uid= on vfat, iso9660, udf change-uid for the purpose of policy
                 * (since these doesn't contain uid/gid bits)
                 */
                if (strcmp (libhal_volume_get_fstype (volume), "vfat") != 0 &&
                    strcmp (libhal_volume_get_fstype (volume), "iso9660") != 0 &&
                    strcmp (libhal_volume_get_fstype (volume), "udf") != 0) {
                        pol_change_uid = wants_to_change_uid;
                }
                 /* don't consider uid= on vfat, iso9660, udf change-uid for the purpose of policy
                 * (since these doesn't contain uid/gid bits)
                 */
                if (strcmp (libhal_volume_get_fstype (volume), "vfat") != 0 &&
                    strcmp (libhal_volume_get_fstype (volume), "iso9660") != 0 &&
                    strcmp (libhal_volume_get_fstype (volume), "udf") != 0) {
                        pol_change_uid = wants_to_change_uid;
                }
                 /* don't consider uid= on vfat, iso9660, udf change-uid for the purpose of policy
                 * (since these doesn't contain uid/gid bits)
                 */
                if (strcmp (libhal_volume_get_fstype (volume), "vfat") != 0 &&
                    strcmp (libhal_volume_get_fstype (volume), "iso9660") != 0 &&
                    strcmp (libhal_volume_get_fstype (volume), "udf") != 0) {
                        pol_change_uid = wants_to_change_uid;
                }

Daniel T Chen (crimsun) wrote :

Is this symptom still reproducible in 8.10 alpha/beta?

Changed in hal:
status: New → Incomplete
Pedro Villavicencio (pedro) wrote :

We are closing this bug report because it lacks the information we need to investigate the problem, as described in the previous comments. Please reopen it if you can give us the missing information, and don't hesitate to submit bug reports in the future. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to New. Thanks again!.

Changed in hal:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers