Define explicit label for wlan sysfs fwpath
avc: denied { write } for name="fwpath" dev="sysfs" ino=6863
scontext=u:r:wificond:s0 tcontext=u:object_r:sysfs_wlan_fwpath:s0
tclass=file permissive=0
Test: wificond and netd can write to this path, wifi works
Test: `runtest frameworks-wifi` passes
Bug: 29579539
Change-Id: Ia21c654b00b09b9fe3e50d564b82966c9c8e6994
(cherry picked from commit 7d13dd806f
)
This commit is contained in:
parent
7c539b1c96
commit
97db27d8c5
4 changed files with 11 additions and 2 deletions
2
file.te
2
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;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
8
netd.te
8
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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue