diff --git a/file.te b/file.te index 7d7f5fc9ea0146c993f82c50627b1f8c0fe1212d..312ace8d313f454bf1a7a3055923c9891b95f83d 100644 --- a/file.te +++ b/file.te @@ -8,6 +8,7 @@ type selinuxfs, fs_type; type cgroup, fs_type, mlstrustedobject; type sysfs, fs_type, mlstrustedobject; type sysfs_writable, fs_type, sysfs_type, mlstrustedobject; +type sysfs_nfc_power_writable, fs_type, sysfs_type, mlstrustedobject; type inotify, fs_type, mlstrustedobject; type devpts, fs_type; type tmpfs, fs_type; diff --git a/file_contexts b/file_contexts index 9c8325a2b181e4fe29c93409e6d6175de81734c4..1f9781c96280e2e035066de06c080894d76178d3 100644 --- a/file_contexts +++ b/file_contexts @@ -132,3 +132,4 @@ # sysfs files # /sys/qemu_trace/process_name -- u:object_r:sysfs_writable:s0 +/sys/devices/platform/nfc-power/nfc_power -- u:object_r:sysfs_nfc_power_writable:s0 diff --git a/nfc.te b/nfc.te index b20d2369906f8ee36307efc48b807096de44c294..72c2d69b7d56e43a74286513b30b076523be0d9c 100644 --- a/nfc.te +++ b/nfc.te @@ -8,3 +8,5 @@ allow nfc nfc_device:chr_file rw_file_perms; # Data file accesses. allow nfc nfc_data_file:dir create_dir_perms; allow nfc nfc_data_file:notdevfile_class_set create_file_perms; + +allow nfc sysfs_nfc_power_writable:file rw_file_perms; diff --git a/rild.te b/rild.te index 2857892df2c4b608e632f63aba22075a69b04435..5993af478471df7b9f26ebad6caa8315872d7a73 100644 --- a/rild.te +++ b/rild.te @@ -4,6 +4,7 @@ type rild_exec, exec_type, file_type; init_daemon_domain(rild) net_domain(rild) +allow rild self:netlink_route_socket setopt; allow rild kernel:system module_request; unix_socket_connect(rild, property, init) unix_socket_connect(rild, qemud, qemud) diff --git a/system.te b/system.te index 7f299c92e882d93365c5f741a563e4ec8c7cc37f..5fa9a917d739af593e5e51388f0593539656759e 100644 --- a/system.te +++ b/system.te @@ -113,6 +113,7 @@ selinux_check_access(system) # XXX Label sysfs files with a specific type? allow system sysfs:file rw_file_perms; +allow system sysfs_nfc_power_writable:file rw_file_perms; # Access devices. allow system device:dir r_dir_perms;