policy library landed...

David Zeuthen david at fubar.dk
Sun Feb 26 16:39:25 PST 2006


On Sun, 2006-02-26 at 19:14 -0500, David Zeuthen wrote:
> Finally, I've added configuration files for the following policies.. It
> is easiest described by the snippet in [2]. Does this look about right?
> I think so...

Btw, it is pretty important we get this right. The following policies

  power-suspend
  power-hibernate
  power-reboot
  power-poweroff
  storage-fixed-mount
  storage-fixed-mount-change-uid
  storage-removable-mount
  storage-removable-mount-change-uid

that I've include effectively becomes part of the ABI we export in HAL.

This means that e.g. applications can expect that the policy
"storage-fixed-mount" really means "this policy describes under what
conditions a user is allowed to mount non-removable partitions from
non-hotpluggable drive"... this is important for

 1. e.g. gnome-mount will be able to do something intelligent when
    catching org.freedesktop.Hal.Device.Volume.PermissionDenied on
    a volume for which the storage device has storage.removable ->
    FALSE and storage.hotpluggable -> FALSE. The intelligent thing
    here would be

       a. use libhal-policy to check that we're allowed to mount;
          if libhal-policy says FALSE; then

       b. put up a dialog asking for auth and then use libhal-policy
          to change the policy to allow this user to mount (or also
          allow everyone else cf. my dialogs in the initial ramble)

       c. try to mount again

    Similar stories for lots of other components..

 2. Translations.. I thought of including a [Description] group in
    the .policy files with Name= and Description= but this is really
    something we don't want in HAL...

    David






More information about the hal mailing list