diff --git a/file.te b/file.te index 086f2a87c26ac2fc66da11af796a98d8f772a1cb..722ccac0dab2b92575eb9178949fe1fe98289012 100644 --- a/file.te +++ b/file.te @@ -35,6 +35,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 2446587d41cb896cf663bdb07bc643b0e08d7763..4d5eea91123fc067ad8aff80f3ecd0b12cfb75d9 100644 --- a/file_contexts +++ b/file_contexts @@ -373,6 +373,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 104baf28613ddc5e2679642e760a0025132a285a..7b9201c55a5a9ab7e284390383af46d30a3c8524 100644 --- a/netd.te +++ b/netd.te @@ -33,11 +33,14 @@ allow netd devpts:chr_file rw_file_perms; # For /proc/sys/net/ipv[46]/route/flush. allow netd proc_net:file rw_file_perms; -# 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;