Skip to content
Snippets Groups Projects
  • Stephen Smalley's avatar
    Ensure that /data/misc/wifi/sockets is always labeled wpa_socket. · 7ade68d7
    Stephen Smalley authored
    
    It appears that wpa_supplicant tries to rmdir /data/misc/wifi/sockets
    and re-create it at times, so make sure that it remains labeled correctly
    when re-created in this manner via a name-based type transition rule.
    Do the same for hostapd as it also has permissions for creating/removing
    this directory.
    
    <5>[83921.800071] type=1400 audit(1392997522.105:26): avc:  denied  { rmdir } for  pid=3055 comm="wpa_supplicant" name="sockets" dev="mmcblk0p28" ino=618957 scontext=u:r:wpa:s0 tcontext=u:object_r:wpa_socket:s0 tclass=dir
    
    We no longer need the type_transition for sock_file as it will inherit
    the type from the parent directory which is set via restorecon_recursive
    /data/misc/wifi/sockets or via type_transition, so drop it.
    
    Change-Id: Iffa61c426783eb03205ba6964c624c6ecea32630
    Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
    7ade68d7
wpa_supplicant.te 960 B