nfc: allow sending bugreports via nfc

Same change as 9819a6 but for nfc.

Nfc can receive bugreport data for beaming to another device.
This comes across as an open file descriptor. Allow nfc access
to bugreports.

Addresses the following denial:

  avc: denied { read } for path="/data/data/com.android.shell/files/bugreports/bugreport-2015-03-30-04-49-57.txt" dev="mmcblk0p27" ino=82334 scontext=u:r:nfc:s0 tcontext=u:object_r:shell_data_file:s0 tclass=file op_res=-13 ppid=435 pcomm="main" tgid=23475 tgcomm="m.android.shell"

Change-Id: I3efefcdb46444a1a6520803cb5e68bbdf29d3ad6
This commit is contained in:
Johan Redestig 2015-04-02 11:16:42 +02:00
parent 1598b52b3a
commit 386a0f09dd

7
nfc.te
View File

@ -44,4 +44,9 @@ auditallow nfc {
-trust_service
-user_service
-vibrator_service
}:service_manager find;
}:service_manager find;
# already open bugreport file descriptors may be shared with
# the nfc process, from a file in
# /data/data/com.android.shell/files/bugreports/bugreport-*.
allow nfc shell_data_file:file read;