Allow system to create sdcard symlink
[ 7.646044] audit: type=1400 audit(90335.236:4): avc: denied { create } for pid=1 comm="init" name="sdcard" scontext=u:r:init:s0 tcontext=u:object_r:tmpfs:s0 tclass=lnk_file permissive=0
[ 7.646062] init: Command 'symlink /storage/self/primary /mnt/sdcard' action=init (/init.rc:127) took 0ms and failed: symlink() failed: Permission denied
Bug: 144399145
Test: Flash selinux modules, reboot, and find the symlink established
Change-Id: Ia408c9bfaeff777a6ce908e5bad40d8c5021fcdf
diff --git a/vendor/google/init.te b/vendor/google/init.te
index 1eb87f6..76f6021 100644
--- a/vendor/google/init.te
+++ b/vendor/google/init.te
@@ -2,8 +2,8 @@
allow init firmware_file:filesystem { getattr mount relabelfrom };
allow init boot_block_device:lnk_file relabelto;
allow init custom_ab_block_device:lnk_file relabelto;
+allow init tmpfs:lnk_file create;
dontaudit init kernel:system module_request;
dontaudit init socket_device:sock_file { create setattr };
dontaudit init sysfs:file { open setattr write };
-dontaudit init tmpfs:lnk_file create;