ACL troubles

Danny Kukawka danny.kukawka at web.de
Thu Jan 8 08:35:14 PST 2009


On Mittwoch, 7. Januar 2009, Alesh Slovak wrote:
> Hi,
>
> I am a developer working on third party scanner drivers and we are
> having some trouble with HAL and access management.
>
> In order to support a wide range of distributions, we run a post install
> script that searches for the SANE fdi file and mimicks it as close as
> possible. We then drop the generated file into the same location we
> found the SANE fdi file in, except we put it in the "20thirdparty"
> directory.
>
> This works just fine for most of the distributions we support, including
> Debian, Ubuntu, and openSUSE, but Fedora is giving us trouble because it
> is using ACL.

SUSE is also using ACL's.

[...]
> I thought of several solutions:
>    1. put the generated fdi file in "/usr/share/hal/fdi/preprobe"
> unconditionally
>    2. put the generated fdi file in "/usr/share/hal/fdi/information"
> unconditionally
>    3. put the generated fdi file in the "10osvendor" directory
>    4. copy the needed ACL entries from "20-acl-management.fdi" into our
> fdi file

You need only to add these lines to the end of your fdi file:

<!-- add / remove ACL's when devices are added and removed -->
 <match key="info.capabilities" contains="access_control">
  <match key="info.callout.add" contains_not="hal-acl-tool --add-device">
   <match key="info.callout.add" contains_not="hal-acl-tool --remove-device">
    <append key="info.callouts.add" 
type="strlist">hal-acl-tool --add-device</append>
    <append key="info.callouts.remove" 
type="strlist">hal-acl-tool --remove-device</append>
   </match>
  </match>
 </match>

Danny
 


More information about the hal mailing list