blob: fb7527bcb73d17ee1d699e6378c4628147f5a251 [file] [log] [blame]
Inseob Kimff43be22021-06-07 16:56:56 +09001# zipfuse is a FUSE daemon running in the microdroid. It mounts
2# /dev/block/by-name/microdroid-apk whose content is from an apk file on
3# /mnt/apk so that the entries in the apk file are seen as regular files. See
4# packages/modules/Virtualization/zipfuse.
5
6type zipfuse, domain, coredomain;
7type zipfuse_exec, exec_type, file_type, system_file_type;
8
9# allow domain transition from init
10init_daemon_domain(zipfuse)
11
12# allow basic rules to implement FUSE
13allow zipfuse fuse_device:chr_file rw_file_perms;
14allow zipfuse self:global_capability_class_set sys_admin;
15
16# allow access to /dev/vd* block device files and also access to the symlinks
17# /dev/block/by-name/*
18allow zipfuse block_device:dir r_dir_perms;
19allow zipfuse block_device:lnk_file r_file_perms;
Jooyung Hand4a7a7a2021-06-17 13:05:36 +090020
21# /dev/block/by-name/microdroid-apk is mapped to /dev/block/dm-*
22allow zipfuse dm_device:blk_file r_file_perms;
Inseob Kimff43be22021-06-07 16:56:56 +090023
24# allow mounting on /mnt/apk
25allow zipfuse tmpfs:dir mounton;
26
Inseob Kim056e5fc2021-06-08 11:11:45 +090027# allow mounting with fscontext=u:object_r:zipfusefs:s0
28type zipfusefs, fs_type, contextmount_type;
29allow zipfuse fuse:filesystem relabelfrom;
30allow zipfuse zipfusefs:filesystem { mount relabelfrom relabelto };
Inseob Kimff43be22021-06-07 16:56:56 +090031
Inseob Kim056e5fc2021-06-08 11:11:45 +090032# allow mounting with context=u:object_r:system_file:s0 so that files provided
33# by zipfuse are treated the same as the other files in /system or /apex
34allow system_file zipfusefs:filesystem associate;