summaryrefslogtreecommitdiff
path: root/fdi
diff options
context:
space:
mode:
authorDavid Zeuthen <davidz@redhat.com>2007-02-15 13:52:56 -0500
committerDavid Zeuthen <davidz@redhat.com>2007-02-15 13:52:56 -0500
commit7368286927bad8b996a53c3b4985df17c2068bcb (patch)
treecc1b97c63347cdc9e9d7cb7ced99bc2b09b72e4b /fdi
parentb26ba073131b944b9ad3760ecc7b60834ee585a0 (diff)
make HAL track ConsoleKit seats and sessions and initial work on ACL mgmt
This is just preliminary work; no ACL's are added nor removed just yet.
Diffstat (limited to 'fdi')
-rw-r--r--fdi/policy/10osvendor/20-acl-management.fdi34
-rw-r--r--fdi/policy/10osvendor/Makefile.am4
2 files changed, 38 insertions, 0 deletions
diff --git a/fdi/policy/10osvendor/20-acl-management.fdi b/fdi/policy/10osvendor/20-acl-management.fdi
new file mode 100644
index 00000000..23fbe08a
--- /dev/null
+++ b/fdi/policy/10osvendor/20-acl-management.fdi
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deviceinfo version="0.2">
+ <device>
+
+ <!-- allow local sessions to access ALSA device files -->
+ <match key="info.capabilities" contains="alsa">
+ <merge key="acl.is_managed" type="bool">true</merge>
+ <merge key="acl.grant_local_session" type="bool">true</merge>
+ <merge key="acl.file" type="copy_property">alsa.device_file</merge>
+ </match>
+
+ <!-- allow local sessions to access OSS device files -->
+ <match key="info.capabilities" contains="oss">
+ <merge key="acl.is_managed" type="bool">true</merge>
+ <merge key="acl.grant_local_session" type="bool">true</merge>
+ <merge key="acl.file" type="copy_property">oss.device_file</merge>
+ </match>
+
+ <!-- TODO: add more rules for adding/removing ACL's (e.g. webcam, cd drive etc.) -->
+
+ <!-- remove all previously added ACL's on start-up -->
+ <match key="info.udi" string="/org/freedesktop/Hal/devices/computer">
+ <append key="info.callouts.add" type="strlist">hal-acl-remove --remove-all</append>
+ </match>
+
+ <!-- add and remove ACL's when devices are added and removed -->
+ <match key="acl.is_managed" bool="true">
+ <append key="info.callouts.add" type="strlist">hal-acl-add</append>
+ <append key="info.callouts.remove" type="strlist">hal-acl-remove</append>
+ </match>
+
+ </device>
+</deviceinfo>
diff --git a/fdi/policy/10osvendor/Makefile.am b/fdi/policy/10osvendor/Makefile.am
index 734eeadb..aed14e1b 100644
--- a/fdi/policy/10osvendor/Makefile.am
+++ b/fdi/policy/10osvendor/Makefile.am
@@ -29,6 +29,10 @@ if BUILD_DELL
dist_fdi_DATA += 10-dell-laptop-brightness.fdi
endif
+if HAVE_ACLMGMT
+dist_fdi_DATA += 20-acl-management.fdi
+endif
+
check:
for f in $(dist_fdi_DATA); do \
echo -n "Validate XML in $$f : "; \