diff --git a/file.te b/file.te index 235ac77ed478f6529493bded0b86e4ee739c5ba8..693d513c2c0ab87ecbef256fb3743c0186aa3698 100644 --- a/file.te +++ b/file.te @@ -39,6 +39,8 @@ type configfs, fs_type; type sysfs_devices_system_cpu, fs_type, sysfs_type; # /sys/module/lowmemorykiller type sysfs_lowmemorykiller, fs_type, sysfs_type; +# /sys/module/wlan/parameters/fwpath +type sysfs_wlan_fwpath, fs_type, sysfs_type; type sysfs_thermal, sysfs_type, fs_type; diff --git a/file_contexts b/file_contexts index 5eec7616a40a55fa4d5e864546794120afc0cd8a..7d55abe692b9d16bb5c63f28c9b09c18c1b6d15c 100644 --- a/file_contexts +++ b/file_contexts @@ -369,6 +369,7 @@ /sys/power/wake_unlock -- u:object_r:sysfs_wake_lock:s0 /sys/kernel/uevent_helper -- u:object_r:usermodehelper:s0 /sys/module/lowmemorykiller(/.*)? -- u:object_r:sysfs_lowmemorykiller:s0 +/sys/module/wlan/parameters/fwpath u:object_r:sysfs_wlan_fwpath:s0 ############################# # debugfs files diff --git a/netd.te b/netd.te index 9b44e4bdfe192d19b871dc050b013d74947479f9..98da0122bd0ceed955bdea03153f69a49a0cf6bd 100644 --- a/netd.te +++ b/netd.te @@ -28,10 +28,14 @@ allow netd devpts:chr_file rw_file_perms; # For /proc/sys/net/ipv[46]/route/flush. allow netd proc_net:file write; -# For /sys/modules/bcmdhd/parameters/firmware_path -# XXX Split into its own type. +# Enables PppController and interface enumeration (among others) +r_dir_file(netd, sysfs_type) +# Allows setting interface MTU allow netd sysfs:file write; +# For /sys/modules/bcmdhd/parameters/firmware_path +allow netd sysfs_wlan_fwpath:file w_file_perms; + # TODO: added to match above sysfs rule. Remove me? allow netd sysfs_usb:file write; diff --git a/wificond.te b/wificond.te index 0da5f380bd7335a13a0614114864f56f04906ebc..2f100dbaecfdb84648f12e1893f30694fb676380 100644 --- a/wificond.te +++ b/wificond.te @@ -9,3 +9,5 @@ binder_call(wificond, system_server) binder_call(wificond, wpa) allow wificond wificond_service:service_manager { add find }; + +allow wificond sysfs_wlan_fwpath:file w_file_perms;