2021-08-04 02:26:38 +02:00
|
|
|
# authfs_service is a binder service running on microdroid. It serves the
|
|
|
|
# client's request and manages the mount/unmount of individual authfs instances
|
|
|
|
# (a FUSE based filesystem). The service then can pass file descriptor on authfs
|
|
|
|
# to the client for remote file access.
|
|
|
|
|
|
|
|
type authfs_service, domain, coredomain;
|
|
|
|
type authfs_service_exec, exec_type, file_type, system_file_type;
|
|
|
|
|
|
|
|
# Allow domain transition from init.
|
|
|
|
init_daemon_domain(authfs_service)
|
|
|
|
|
|
|
|
# Allow running as a binder service.
|
|
|
|
binder_call(authfs_service, servicemanager)
|
2021-08-10 19:49:01 +02:00
|
|
|
add_service(authfs_service, authfs_binder_service)
|
2021-08-04 02:26:38 +02:00
|
|
|
|
|
|
|
# Allow domain transition into authfs.
|
|
|
|
domain_auto_trans(authfs_service, authfs_exec, authfs)
|
|
|
|
|
2021-08-11 01:04:42 +02:00
|
|
|
# Allow mounting the FUSE filesystem.
|
|
|
|
allow authfs_service self:global_capability_class_set sys_admin;
|
|
|
|
|
2021-08-04 02:26:38 +02:00
|
|
|
# Allow creating/deleting mount directories.
|
|
|
|
allow authfs_service authfs_data_file:dir create_dir_perms;
|
|
|
|
|
|
|
|
# Allow opening a file from the FUSE mount.
|
|
|
|
# Note: authfs_service doesn't really need to read and write the file, but the
|
2021-10-12 21:40:44 +02:00
|
|
|
# check seems to happen on open anyway.
|
2021-08-04 02:26:38 +02:00
|
|
|
allow authfs_service authfs_fuse:dir search;
|
2021-10-12 21:40:44 +02:00
|
|
|
allow authfs_service authfs_fuse:file { open read write };
|
2021-08-04 02:26:38 +02:00
|
|
|
|
|
|
|
# Allow killing the authfs process and unmount.
|
|
|
|
allow authfs_service authfs:process sigkill;
|
|
|
|
allow authfs_service authfs_fuse:filesystem unmount;
|