Le 25.01.2005 19:53:36, Sjoerd Simons a �crit�:
On Tue, Jan 25, 2005 at 05:10:44PM +0000, Jean-Luc Coulon (f5ibh)
wrote:
Le 25.01.2005 17:26:19, Sjoerd Simons a �crit�:

[ destructive compression ]

>
>Oh that's a good hint.. First i saw fstab-sync running in your
trace,
>which is
>not necessary so it's probably best to remove it.

How to remove it?

rm /etc/hal/device.d/50-fstab-sync.hal

You had to use fstab-sync for automounting with gvm in the time before
we had
the current pmount solution.

removed ...


> >Second if you strace it, hal runs as root, if you don't it runs as >user >haldaemon...

Well, you told me to run: hald... run hald --daemon=no --verbose=yes
If I do that with a normal user, I get the following error

Yeah, i wasn't expecting a permission problem..

[EMAIL PROTECTED] % /usr/sbin/hald --daemon=no --verbose=yes ~ 17:42:36.712 [I] hald.c:394: hal 0.4.6 17:42:36.713 [I] hald.c:398: Will not daemonize 17:42:36.740 [E] hald_dbus.c:1945: dbus_bus_acquire_service(): Connection ":1.54" is not allowed to own the service "org.freedesktop.Hal" due to security policies in the configuration file

That's correct, hal can only run as either root or as usr hal. You can just add --drop-privileges to the options, so it behave the same way as it does when running normally..

It refuses to start with this option:
[EMAIL PROTECTED] % /usr/sbin/hald --daemon=no --verbose=yes --drop-privileges ~
15:03:35.500 [E] hald.c:284: drop_privileges: could not initialize groups




What are the permissions of your cd drives ?

brw-rw----  1 root cdrom 3, 0 2005-01-25 13:27 /dev/hda
brw-rw----  1 root cdrom 22, 0 2005-01-25 13:27 /dev/hdc

Looks okay. Is user hal member of group cdrom ?

yes, hal is member of this group too.


>Also you can use ``strace -e ioctl,open,close -p $(pidof hald)'' to
>strace your
>running hald.. Probably it will show permission denied or somthing
>like
>that.

Yes, right

[EMAIL PROTECTED] /home/jean-luc # strace -e ioctl,open,close -p
19238
Process 19238 attached - interrupt to quit

open("/dev/hdc", O_RDONLY|O_NONBLOCK|O_EXCL|O_LARGEFILE) = 3
ioctl(3, CDROM_DRIVE_STATUS, 0x7fffffff) = 1
close(3)                                = 0

hdc seems to work fine here? Does inserting volumes in that driver work
?


open("/dev/hda", O_RDONLY|O_NONBLOCK|O_EXCL|O_LARGEFILE) = -1 EACCES
(Permission denied)

But it is not the case with the previous version of hal...

open("/dev/hda", O_RDONLY|O_NONBLOCK|O_LARGEFILE) = 3
ioctl(3, CDROM_DRIVE_STATUS, 0x7fffffff) = 4

Okay, compare the two opens.. The ``new'' hal adds O_EXCL, which is correct, although i have no clue what triggered the difference..

But this shouldn't cause E_ACCESS, if access is denied to the E_EXCL
you get
E_BUSY..

If this can helps, I remarked while doing my tests that fam is
something doing bad things. The drive is marked busy so I cannot
eject
it nor unmount it without killing fam. But I don't know the exact
conditions this occured.

Could you disable fam while testing hal, just to be sure it doesn't gets in way in some weird way..

yes, done


I'm also still guessing what the exact problem is here, but i think we're slowing getting there :)

Maybe there is a permission problem: udev doesnt create the deviceconsistantly. Sometimes /dev/hda iscreated with roo:disk, sometimes (mostly) root:cdrom and sometimes root:floppy. I remarked that /dev/hdc isalways created correctly, not hda



Sjoerd


J-L





Reply via email to