You are not logged in.

#1 2004-11-04 20:21:37

tor
Member
From: Sweden
Registered: 2004-08-02
Posts: 80

Gnome HAL and GVM

Hi,

Im still struggeling to get Gnome-Volume-Manager working.

Since the last upgrade of HAL and GVM every hardware i have tried has been recognized.  :-)

I still however cant get the automont to work.

The device gets recognized and HAL creates the devices.

fstab-sync kicks in and creates nice entries in fstab and creates directories under /media

But the actual mount does not work. Automount does not work. When trying to mount the device as myself i get:

mount: only root can mount /dev/sda1 on /media/usbdisk

and when trying as root:

mount: wrong fs type, bad option, bad superblock on /dev/sda1,
       or too many mounted file systems

When looking into /var/log/kernel

FAT: Unrecognized mount option "pamconsole" or missing value

What is this "pamconsole" stuff? Its in the corresponding line in my fstab.

Seems like either im missing some package or a badly configured one?

Offline

#2 2004-11-04 21:30:39

alexthelion
Member
From: Switzerland
Registered: 2004-03-06
Posts: 117

Re: Gnome HAL and GVM

Same problem here. Help...!

in /usr/share/hal/fdi/90defaultpolicy/storage-policy.fdi you can disable that pamconsole thing. And you can change /media to /mnt, if you want.

To be honest, I'm a little bit confused about all those new hardware things. udev, hal, dbus, g-v-m. it's not easy to understand which component does what.

For example: if I plug in a USB Mass storage, then hald emits some message via dbus, right? But it seems that hald is also directly calling fstab-sync. So what is g-v-m doing in this scenario? Obviously not the mounting part, or what?

Offline

#3 2004-11-05 06:54:35

tor
Member
From: Sweden
Registered: 2004-08-02
Posts: 80

Re: Gnome HAL and GVM

alexthelion wrote:

in /usr/share/hal/fdi/90defaultpolicy/storage-policy.fdi you can disable that pamconsole thing. And you can change /media to /mnt, if you want.

I have noticed that one. But if i understand things correctly. You should not change anything in that file but instead add files in the hal/fdi/95userpolicy instead.

To be honest, I'm a little bit confused about all those new hardware things. udev, hal, dbus, g-v-m. it's not easy to understand which component does what.

For example: if I plug in a USB Mass storage, then hald emits some message via dbus, right? But it seems that hald is also directly calling fstab-sync. So what is g-v-m doing in this scenario? Obviously not the mounting part, or what?

My understanding is this. (Please correct me if im wrong)

UDEV is a userspace replacement for devfs and is responsible for creating the device files in /dev

HAL is a hardware abstraction layer that listens to hotplug and keeps an inventory of the hardware on your machine. HAL also uses dbus the new message bus to notify anyone about changes etc.

Then there are two important listeners for these events.

fstab-sync which listens to added and removed devices. And creates/alters the files in /media and the /etc/fstab file.

Finaly we have GVM, which also listens to these events, and does the actual mounting.

I think that there is something wrong with the util-linux package. util-linux contains among other things the mount command. And it seems like it is mount who does not understand the pamconsole stuff.

Offline

#4 2004-11-05 07:54:13

alexthelion
Member
From: Switzerland
Registered: 2004-03-06
Posts: 117

Re: Gnome HAL and GVM

That mostly coincides with my understanding, except maybe the following:

Does HAL really listen to hotplug? I thought that it get the information directly from the kernel. Anyway, in Arch, hotplug doesn't depend on hotplug.

Offline

#5 2004-11-05 08:28:29

tor
Member
From: Sweden
Registered: 2004-08-02
Posts: 80

Re: Gnome HAL and GVM

alexthelion wrote:

That mostly coincides with my understanding, except maybe the following:

Does HAL really listen to hotplug? I thought that it get the information directly from the kernel. Anyway, in Arch, hotplug doesn't depend on hotplug.

I think so, maybe not only hotplug but as i understand it. HAL uses hotplug.

http://freedesktop.org/~david/hal-0.2/s … -spec.html

Offline

#6 2004-11-05 10:34:58

tor
Member
From: Sweden
Registered: 2004-08-02
Posts: 80

Re: Gnome HAL and GVM

It seems like this pamconsole stuff is redhat specific. Looking into their src rpms for util-linux and pam there are patches to add pamconsole not found in the clean packages. :-(

alexthelion, did changing the /usr/share/hal/fdi/90defaultpolicy/storage-policy.fdi solve the mount problem for you?

Im thinking that the way to solve this might be a correct  95userpolicy file.

Offline

#7 2004-11-08 07:03:15

tor
Member
From: Sweden
Registered: 2004-08-02
Posts: 80

Re: Gnome HAL and GVM

Ok, it seems like changing the settings in storage-policy.fdi does  do the trick.

But the right solution as said before is to add a local.fdi in 95userpolicy directory.

I got usb-storage working by adding a local.fdi file in /usr/share/hal/fdi/95userpolicy containing:

<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->

<deviceinfo version="0.2">

  <!-- Default policies merged onto computer root object  -->
  <device>
    <match key="info.udi" string="/org/freedesktop/Hal/devices/computer">
      <merge key="storage.policy.default.managed_keyword.primary" type="string">user</merge>
      <merge key="storage.policy.default.mount_option.pamconsole" type="bool">false</merge>
    </match>
  </device>

</deviceinfo>

I got this from Mitch on Hal-devlist. He also referred me to this email: http://freedesktop.org/pipermail/hal/20 … 01149.html

If you use HAL with your CD/DVD or floppy then i _think_  you still have to do more modifications.

Offline

#8 2004-11-08 13:53:41

zeppelin
Member
From: Athens, Greece
Registered: 2004-03-05
Posts: 807
Website

Re: Gnome HAL and GVM

I also have problems with HAL not seeing my cds/dvds

I was able to run it in command line and see that it was a permissions thing. I think I changed that, but still doesn't work.

if anyone has a success story, maybe he should WIKIWIKI it..
thanks

Offline

#9 2004-11-09 06:55:12

ganlu
Member
From: ChongQing, China
Registered: 2004-01-04
Posts: 360

Re: Gnome HAL and GVM

Honestly, I still feel mystery of hal.

I got usb-storage working by adding a local.fdi file in /usr/share/hal/fdi/95userpolicy containing:
Code:

<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->

<deviceinfo version="0.2">

  <!-- Default policies merged onto computer root object  -->
  <device>
    <match key="info.udi" string="/org/freedesktop/Hal/devices/computer">
      <merge key="storage.policy.default.managed_keyword.primary" type="string">user</merge>
      <merge key="storage.policy.default.mount_option.pamconsole" type="bool">false</merge>
    </match>
  </device>

</deviceinfo>

if it doesn't use 'pamconsole' so that only user at the console can access removral media, which is potensially risky?  If we prefer 'pamsonsole', how can we do?
Other than the above,

If you use HAL with your CD/DVD or floppy then i _think_ you still have to do more modifications.

Could you give a little more details? Thank you a lot.

Offline

#10 2004-11-09 07:26:15

tor
Member
From: Sweden
Registered: 2004-08-02
Posts: 80

Re: Gnome HAL and GVM

ganlu, you are absolutly correct in that not using pamconsole is a security risk. Without it, users not at the console could mount and umount your devices and gain access to the contents there on.

To fix it, as it looks now, you have to apply the patches that add this functionality. I found out about them by downloading the latest src rpms from fedora and inspect them. The packages that are affected is util-linux and pam.

I do not now where these patches belong. But you can always extract them from the rpms. One could hope that these patches gets merged upstream.  And thus resolve the problem and enhancing security.

About HAL and CD/DVD i actualy havn't tested it. Therefore my "_think_"  I only noticed that the entry for my floppy added to my fstab still had pamconsole in it.

Offline

#11 2004-11-23 08:01:02

JGC
Developer
Registered: 2003-12-03
Posts: 1,664

Re: Gnome HAL and GVM

Fixed this issue yesterday in hal 0.4.1-2. It should also autodetect floppies and place it in /etc/fstab now, as long as you load the specific floppy module yourself (hotplug doesn't probe my floppydrive, neither does it do with my ide-cd driver).

Offline

#12 2004-12-31 20:11:35

link
Member
Registered: 2004-04-30
Posts: 69

Re: Gnome HAL and GVM

Not to beat a dead horse, but even with hal-0.4.2-2, I'm still getting these similar mount errors and my USB devices are not mounting.
I can of course, mount them myself manually, so its nothing with my kernel USB stuff. I'm not sure what's going on here, but I can post relevent portions of lshal if needed. There might be something silly that I'm totally spacing.

EDIT: Found this related Arch Linux bug. The patch included there works.

Offline

Board footer

Powered by FluxBB