pass-hal: tm1: Add pass-hal.conf to change the permission of sysfs nodes 40/134240/3
authorChanwoo Choi <cw00.choi@samsung.com>
Thu, 15 Jun 2017 10:34:56 +0000 (19:34 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Fri, 16 Jun 2017 09:41:15 +0000 (18:41 +0900)
The pass-hal-tm1 package handles the many sysfs nodes in order
to change the state of h/w resources. All sysfs node should
be required to change the permission from root to system_fw
because PASS daemon has the system_fw permission.

So, this patch adds new pass-hal.conf which contains
the permission information for the required sysfs nodes.

Change-Id: I62b761c101841ec0db09389ac6476d3d00d14ab6
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
CMakeLists.txt
packaging/pass-hal-tm1.spec
scripts/pass-hal.conf [new file with mode: 0644]

index 14b933086d7ab39b41b8ae088fac93883663dfbc..22cc53bc88d621df40348bdcdd22ddf6fae2d67a 100644 (file)
@@ -22,3 +22,4 @@ SET(CONF_FILES
        ${CMAKE_CURRENT_SOURCE_DIR}/scripts/pass.conf
        ${CMAKE_CURRENT_SOURCE_DIR}/scripts/pass-resource0.conf)
 INSTALL(FILES ${CONF_FILES} DESTINATION ${CONF_DIR})
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/scripts/pass-hal.conf DESTINATION ${LIB_INSTALL_DIR}/tmpfiles.d)
index 82cce043314e2c05cf25368b60f3ff551e1a1a76..5556fe87d987e84f25cc0cdc6e03e81d68dfbf01 100644 (file)
@@ -35,12 +35,15 @@ make %{?jobs:-j%jobs}
 rm -rf %{buildroot}
 
 %make_install
-%post -p /sbin/ldconfig
+%post
+/sbin/ldconfig
+systemd-tmpfiles /usr/lib/tmpfiles.d/pass-hal.conf --create
 
 %postun -p /sbin/ldconfig
 
 %files
 %manifest %{name}.manifest
 %{_libdir}/pass/*.so
+%{_libdir}/tmpfiles.d/pass-hal.conf
 %config %{_sysconfdir}/pass/pass.conf
 %config %{_sysconfdir}/pass/pass-resource0.conf
diff --git a/scripts/pass-hal.conf b/scripts/pass-hal.conf
new file mode 100644 (file)
index 0000000..abfdf4f
--- /dev/null
@@ -0,0 +1,4 @@
+z      /sys/devices/system/cpu/cpufreq/pmqos/* 0660    root    system_fw       -
+t      /sys/devices/system/cpu/cpufreq/pmqos/* -       -       -       -       security.SMACK64="System"
+z      /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq   0440    root    system_fw       -
+t      /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq   -       -       -       -       security.SMACK64="System"