From 91dabf4d78e5bfe442eb908bebfbf4c7ae4f88e6 Mon Sep 17 00:00:00 2001 From: Chris PeBenito Date: Tue, 5 Sep 2006 14:31:27 +0000 Subject: [PATCH] fix up usb.ids per distro --- policy/modules/admin/usbmodules.te | 5 +++-- policy/modules/system/miscfiles.fc | 18 +++++++++++++----- policy/modules/system/miscfiles.te | 2 +- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/policy/modules/admin/usbmodules.te b/policy/modules/admin/usbmodules.te index 76d5c5bb..1313aae0 100644 --- a/policy/modules/admin/usbmodules.te +++ b/policy/modules/admin/usbmodules.te @@ -1,5 +1,5 @@ -policy_module(usbmodules,1.0.0) +policy_module(usbmodules,1.0.1) ######################################## # @@ -16,7 +16,6 @@ role system_r types usbmodules_t; # Local policy # - kernel_list_proc(usbmodules_t) files_list_kernel_modules(usbmodules_t) @@ -37,6 +36,8 @@ init_use_fds(usbmodules_t) libs_use_ld_so(usbmodules_t) libs_use_shared_libs(usbmodules_t) +miscfiles_read_hwdata(usbmodules_t) + modutils_read_module_deps(usbmodules_t) optional_policy(` diff --git a/policy/modules/system/miscfiles.fc b/policy/modules/system/miscfiles.fc index fb19fce2..24574778 100644 --- a/policy/modules/system/miscfiles.fc +++ b/policy/modules/system/miscfiles.fc @@ -38,7 +38,6 @@ ifdef(`distro_gentoo',` /usr/share/fonts(/.*)? gen_context(system_u:object_r:fonts_t,s0) /usr/share/ghostscript/fonts(/.*)? gen_context(system_u:object_r:fonts_t,s0) -/usr/share/hwdata(/.*)? gen_context(system_u:object_r:hwdata_t,s0) /usr/share/locale(/.*)? gen_context(system_u:object_r:locale_t,s0) /usr/share/man(/.*)? gen_context(system_u:object_r:man_t,s0) /usr/share/zoneinfo(/.*)? gen_context(system_u:object_r:locale_t,s0) @@ -50,18 +49,27 @@ ifdef(`distro_gentoo',` /usr/X11R6/man(/.*)? gen_context(system_u:object_r:man_t,s0) +ifdef(`distro_gentoo',` +/usr/share/misc/(pci|usb)\.ids -- gen_context(system_u:object_r:hwdata_t,s0) +') + +ifdef(`distro_redhat',` +/usr/share/hwdata(/.*)? gen_context(system_u:object_r:hwdata_t,s0) +') + # # /var # /var/ftp(/.*)? gen_context(system_u:object_r:public_content_t,s0) -ifdef(`distro_debian', ` -/var/lib/msttcorefonts(/.*)? gen_context(system_u:object_r:fonts_t,s0) -') - /var/lib/texmf(/.*)? gen_context(system_u:object_r:tetex_data_t,s0) /var/cache/fonts(/.*)? gen_context(system_u:object_r:tetex_data_t,s0) /var/cache/man(/.*)? gen_context(system_u:object_r:man_t,s0) /var/spool/texmf(/.*)? gen_context(system_u:object_r:tetex_data_t,s0) + +ifdef(`distro_debian',` +/var/lib/msttcorefonts(/.*)? gen_context(system_u:object_r:fonts_t,s0) +/var/lib/usbutils(/.*)? gen_context(system_u:object_r:hwdata_t,s0) +') diff --git a/policy/modules/system/miscfiles.te b/policy/modules/system/miscfiles.te index 5ca7951f..0e18a689 100644 --- a/policy/modules/system/miscfiles.te +++ b/policy/modules/system/miscfiles.te @@ -1,5 +1,5 @@ -policy_module(miscfiles,1.0.3) +policy_module(miscfiles,1.0.4) ######################################## #