Home | History | Annotate | Download | only in public
      1 type sdcardd, domain;
      2 type sdcardd_exec, exec_type, file_type;
      3 
      4 allow sdcardd cgroup:dir create_dir_perms;
      5 allow sdcardd fuse_device:chr_file rw_file_perms;
      6 allow sdcardd rootfs:dir mounton;  # TODO: deprecated in M
      7 allow sdcardd sdcardfs:filesystem remount;
      8 allow sdcardd tmpfs:dir r_dir_perms;
      9 allow sdcardd mnt_media_rw_file:dir r_dir_perms;
     10 allow sdcardd storage_file:dir search;
     11 allow sdcardd storage_stub_file:dir { search mounton };
     12 allow sdcardd sdcard_type:filesystem { mount unmount };
     13 allow sdcardd self:global_capability_class_set { setuid setgid dac_override sys_admin sys_resource };
     14 
     15 allow sdcardd sdcard_type:dir create_dir_perms;
     16 allow sdcardd sdcard_type:file create_file_perms;
     17 
     18 allow sdcardd media_rw_data_file:dir create_dir_perms;
     19 allow sdcardd media_rw_data_file:file create_file_perms;
     20 
     21 # Read /data/system/packages.list.
     22 allow sdcardd system_data_file:file r_file_perms;
     23 
     24 # Read /data/.layout_version
     25 allow sdcardd install_data_file:file r_file_perms;
     26 
     27 # Allow stdin/out back to vold
     28 allow sdcardd vold:fd use;
     29 allow sdcardd vold:fifo_file { read write getattr };
     30 
     31 # Allow running on top of expanded storage
     32 allow sdcardd mnt_expand_file:dir search;
     33 
     34 # access /proc/filesystems
     35 allow sdcardd proc_filesystems:file r_file_perms;
     36 
     37 ###
     38 ### neverallow rules
     39 ###
     40 
     41 # The sdcard daemon should no longer be started from init
     42 neverallow init sdcardd_exec:file execute;
     43 neverallow init sdcardd:process { transition dyntransition };
     44