On Wed, 2005-10-12 at 10:57 -0500, Randy McMurchy wrote:
> [cc'd to BLFS-Dev in hopes of further discussion on some of these topics]
> 
> Simon Geard wrote these words on 10/12/05 04:41 CST:
> 
> > Yep, that's the one I've seen mentioned on the hal lists. Is it simply a
> > case of adding that line to the udev rules file, or is there more
> > involved?
> 
> I simply made a new rule, with that line being the only line in the file.
> I'm sure you could just add it to an existing rule file as well.

Hmm... reading the list archives, it looks like the following may be the
preferred version in future:

RUN="socket:/org/freedesktop/hal/udev_event"

as per:

http://lists.freedesktop.org/archives/hal/2005-August/002915.html

I can't confirm though, since I don't actually have either of them
working yet. Adding either of them to /etc/udev/rules.d doesn't make any
difference that I can see.


> The biggest thing is that --exit-with-session is passed to something that
> can be monitored, or the daemon will continue to run after whatever
> window manager (which includes a user-space tool to do the actual mounting
> and unmounting of volumes) is closed. This isn't critical, just kind of
> nice to have the daemon close when no longer required.

That should be handled by the patch I provided, since dbus-launch exists
for exactly that purpose - basically it's similar to the ssh-agent
that's launched already by gdm's Xsession.

> 
> >>It's also important that the HAL package is compiled with 
> >>--with-fstab-sync passed to configure so that the fstab-sync program
> >>is built.
> > 
> > Actually, I use pmount instead, rather than have HAL manipulating the
> > fstab file. I find it a somewhat cleaner approach, and pretty easy to
> > setup (just needs some extra config switches when building g-v-m).
> 
> This will have to be discussed further. I'm using the fstab-sync
> approach and it seems to work well, though the hal daemon needs to be
> run as the root user.

Yes, that was one of the details I disliked - in more recent versions,
fstab-sync is the sole thing requiring root privileges, but nonetheless
requires the entire daemon to retain those privileges.

With pmount, only one small executable runs as (suid) root, and while
I've not done so, distros such as Ubuntu have setup additional security
around it requiring users to belong to a particular group in order to
use it.

For the record, the two g-v-m parameters needed for it are:

--with-mount-command="/usr/bin/pmount-hal %h"
--with-unmount-command="/usr/bin/pumount %d" 

basically, they just tell g-v-m to run those commands instead of the
default mount/umount when mounting removable volumes. %h is the hal UDI
of the device, while %d is the /dev entry for the device.

> > I assume btw that you're using some kind of patch for util-linux, to
> > make mount ignore the 'managed' option that fstab-sync uses?
> 
> I'm doing what Jürg suggested and that is modifying the HAL policy
> to disregard (comment) the 'managed' option. This apparently should
> be discussed further as well.

I tried that originally, but found that hal required fstab entries to be
marked with that option in order for it to manage the file correctly.
Without it, it got confused as to which devices it was responsible for
adding/removing. That was with older versions of hal though, and may not
be a problem with 0.5.x.

Simon.

Attachment: signature.asc
Description: This is a digitally signed message part

-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to