LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Explain the contents of hal.conf (https://www.linuxquestions.org/questions/linux-software-2/explain-the-contents-of-hal-conf-668215/)

pwabrahams 09-07-2008 07:03 PM

Explain the contents of hal.conf
 
I'm having problems with automounting USB memory sticks that appear to be related to the file /etc/dbus-1/system.d/hal.conf. I'm trying to understand the contents of that file, which has something to do with policies, but I haven't been able to find an explanation of it anywhere -- and google doesn't help. Can someone point me to such an explanation?

pwabrahams 09-08-2008 12:09 PM

Found part of explanation
 
OK, I discovered that the manpage for dbus-daemon describes the <policy> element, but now I am having trouble interpreting the description. It contains the following explanation:
Quote:

The <policy> element has one of three attributes:
context="(default|mandatory)"
user="username or userid"
group="group name or gid"




Policies are applied to a connection as follows:
- all context="default" policies are applied
- all group="connection's user's group" policies are applied
in undefined order
- all user="connection's auth user" policies are applied
in undefined order
- all context="mandatory" policies are applied
I simply don't understand what the last part of this is saying. What does "all" indicate here?

The other problem I now have is that I don't know what interface makes usb automounting work. The file I have is:
Code:

<!DOCTYPE busconfig PUBLIC
 "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>

  <!-- This comment inserted on 9/6/08 -->
  <!-- This configuration file specifies the required security policies
      for the HAL to work. -->

  <!-- Only root or user haldaemon can own the HAL service -->
  <policy user="haldaemon">
    <allow own="org.freedesktop.Hal"/>
  </policy>
  <policy user="root">
    <allow own="org.freedesktop.Hal"/>
  </policy>

  <!-- Allow anyone to invoke methods on the Manager and Device interfaces -->
  <policy context="default">
    <allow send_interface="org.freedesktop.Hal.Manager"/>
    <allow send_interface="org.freedesktop.Hal.Device"/>
    <allow receive_interface="org.freedesktop.Hal.Manager"
          receive_sender="org.freedesktop.Hal"/>
    <allow receive_interface="org.freedesktop.Hal.Device"
          receive_sender="org.freedesktop.Hal"/>

    <allow send_interface="org.freedesktop.Hal.Device.SystemPowerManagement"/>
    <allow send_interface="org.freedesktop.Hal.Device.LaptopPanel"/>
    <allow send_interface="org.freedesktop.Hal.Device.Volume"/>
    <allow send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
    <allow receive_interface="org.freedesktop.Hal.Device.SystemPowerManagement"
          receive_sender="org.freedesktop.Hal"/>
    <allow receive_interface="org.freedesktop.Hal.Device.LaptopPanel"
          receive_sender="org.freedesktop.Hal"/>
    <allow receive_interface="org.freedesktop.Hal.Device.Volume"
          receive_sender="org.freedesktop.Hal"/>
    <allow receive_interface="org.freedesktop.Hal.Device.Volume.Crypto"
          receive_sender="org.freedesktop.Hal"/>
  </policy>

  <!-- This will not work if pam_console support is not enabled -->
  <policy at_console="true">
    <allow send_interface="org.freedesktop.Hal.Device.SystemPowerManagement"/>
    <allow send_interface="org.freedesktop.Hal.Device.LaptopPanel"/>
    <allow send_interface="org.freedesktop.Hal.Device.Volume"/>
    <allow send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
  </policy>

  <!-- You can change this to a more suitable user, or make per-group -->
  <policy user="*">
    <allow send_interface="org.freedesktop.Hal.Device.SystemPowerManagement"/>
    <allow send_interface="org.freedesktop.Hal.Device.VideoAdapterPM"/>
    <allow send_interface="org.freedesktop.Hal.Device.LaptopPanel"/>
    <allow send_interface="org.freedesktop.Hal.Device.Volume"/>
    <allow send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
  </policy>

</busconfig>

What interface is supposed to support USB automounting? Is it there already?

Uncle_Theodore 09-08-2008 12:10 PM

Quote:

Originally Posted by pwabrahams (Post 3272710)
I'm having problems with automounting USB memory sticks that appear to be related to the file /etc/dbus-1/system.d/hal.conf. I'm trying to understand the contents of that file, which has something to do with policies, but I haven't been able to find an explanation of it anywhere -- and google doesn't help. Can someone point me to such an explanation?

The best explanation I've seen so far is here http://wiki.archlinux.org/index.php/HAL
You might also wanna look in here
http://gentoo-wiki.com/HOWTO_D-BUS,_HAL,_KDE_media:/


All times are GMT -5. The time now is 02:45 AM.