rs.te: Allow following /data/user/0 symlink
The bcc command line uses /data/user/0 paths, so renderscript needs to
be able to follow those symlinks.
Addresses the following denial:
audit(1545249938.830:2274): avc: denied { read } for comm="bcc" name="0" dev="dm-6" ino=101 scontext=u:r:rs:s0:c184,c256,c512,c768 tcontext=u:object_r:system_data_file:s0 tclass=lnk_file permissive=1 app=android.rscpp.cts
Test: cts-tradefed run cts -m CtsRsCppTestCases
Bug: 121266184
Bug: 112357170
Change-Id: I16210f9b95f386bdee0863cf0044c956af99586d
diff --git a/private/rs.te b/private/rs.te
index 94cf6b4..9229ed9 100644
--- a/private/rs.te
+++ b/private/rs.te
@@ -7,6 +7,9 @@
allow rs rs_data_file:file create_file_perms;
type_transition rs app_data_file:file rs_data_file;
+# Follow /data/user/0 symlink
+allow rs system_data_file:lnk_file read;
+
# Read files from the app home directory.
allow rs app_data_file:file r_file_perms;
allow rs app_data_file:dir r_dir_perms;