Home | History | Annotate | Download | only in sepolicy
      1 # nfc subsystem
      2 type nfc_hal_pn54x, domain;
      3 type nfc_hal_pn54x_exec, exec_type, file_type;
      4 
      5 # may be started by init
      6 init_daemon_domain(nfc_hal_pn54x)
      7 
      8 allow nfc_hal_pn54x nfc_hal_pn54x_exec:file rx_file_perms;
      9 
     10 # hwbinder access
     11 hwbinder_use(nfc_hal_pn54x)
     12 
     13 # call into NFC process (callbacks)
     14 binder_call(nfc_hal_pn54x, nfc)
     15 
     16 # Set NFC properties
     17 set_prop(nfc_hal_pn54x, nfc_prop)
     18 
     19 # NFC device access.
     20 allow nfc_hal_pn54x nfc_device:chr_file rw_file_perms;
     21 
     22 # Data file accesses.
     23 allow nfc_hal_pn54x nfc_vendor_data_file:dir create_dir_perms;
     24 allow nfc_hal_pn54x nfc_vendor_data_file:notdevfile_class_set create_file_perms;
     25 
     26 allow nfc_hal_pn54x sysfs_nfc_power_writable:file rw_file_perms;
     27 allow nfc_hal_pn54x sysfs:file write;
     28 
     29 # TODO: added to match above sysfs rule. Remove me?
     30 allow nfc_hal_pn54x sysfs_usb:file write;
     31