Skip to content
Snippets Groups Projects
Commit ba1a7315 authored by Nick Kralevich's avatar Nick Kralevich
Browse files

allow wpa_cli to work.

With wpa_supplicant in enforcing, wpa_cli doesn't work.

Denial:

type=1400 audit(1390597866.260:59): avc:  denied  { write } for  pid=3410 comm="wpa_supplicant" name="wpa_ctrl_4852-1" dev="mmcblk0p28" ino=618993 scontext=u:r:wpa:s0 tcontext=u:object_r:wifi_data_file:s0 tclass=sock_file

After I9e35cc93abf89ce3594860aa3193f84a3b42ea6e and
I51b09c5e40946673a38732ea9f601b2d047d3b62, the /data/misc/wifi/sockets
directory is labeled properly. This change allows the communication
between the su domain and wpa.

Steps to reproduce:
  Start wifi (so wpa_supplicant will run)
  Start wpa_cli - it will hand
  $ adb root
  $ adb shell
  # wpa_cli -g @android:wpa_wlan0

Bug: 12721629
Change-Id: I03170acc155ad122c5197baaf590d17fc1ace6a5
parent 418e2abd
No related branches found
No related tags found
No related merge requests found
...@@ -19,3 +19,9 @@ allow wpa random_device:chr_file r_file_perms; ...@@ -19,3 +19,9 @@ allow wpa random_device:chr_file r_file_perms;
type_transition wpa wifi_data_file:sock_file wpa_socket; type_transition wpa wifi_data_file:sock_file wpa_socket;
allow wpa wpa_socket:dir { rw_dir_perms setattr }; allow wpa wpa_socket:dir { rw_dir_perms setattr };
allow wpa wpa_socket:sock_file create_file_perms; allow wpa wpa_socket:sock_file create_file_perms;
# Allow wpa_cli to work. wpa_cli creates a socket in
# /data/misc/wifi/sockets which wpa supplicant communicates with.
userdebug_or_eng(`
unix_socket_send(wpa, wpa, su)
')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment