Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding sepolicy for disk-swap #271

Open
wants to merge 1 commit into
base: celadon/t/mr0/master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions diskswap/diskswap.te
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
type diskswap, domain;
type diskswap_exec, exec_type, file_type, vendor_file_type;

init_daemon_domain(diskswap)

allow diskswap vendor_file:file rx_file_perms;
allow diskswap proc_meminfo:file r_file_perms;

# allow the diskswap domain to set prop sys.enable_swap
# set_prop(diskswap, vendor_mem_prop)

not_full_treble(`
allow diskswap system_file:file rx_file_perms;
allow diskswap shell_exec:file rx_file_perms;
')

full_treble_only(`
allow diskswap vendor_shell_exec:file rx_file_perms;
allow diskswap vendor_toolbox_exec:file rx_file_perms;
')
1 change: 1 addition & 0 deletions diskswap/file_contexts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/vendor/bin/diskswap.sh u:object_r:diskswap_exec:s0
Loading