Finish SELinux policy ad fix some bugs
[gruntmaster-daemon.git] / selinux / gruntmasterd.te
... / ...
CommitLineData
1policy_module(gruntmasterd, 1.0)
2
3define(`read_file_perms', `{ getattr ioctl read lock open }')
4define(`read_dir_perms', `{ getattr ioctl read lock open search}')
5define(`everything_file_perms', `{ getattr ioctl read lock open unlink setattr write create rename link }')
6define(`everything_dir_perms', `{ getattr ioctl read lock open search unlink setattr write create rename link rmdir remove_name reparent add_name }')
7define(`gruntmaster_read', `allow gruntmasterd_t $1 : dir read_dir_perms; allow gruntmasterd_t $1 : file read_file_perms; allow gruntmasterd_t $1 : lnk_file read_file_perms;')
8define(`gruntmaster_everything', `allow gruntmasterd_t $1 : dir everything_dir_perms; allow gruntmasterd_t $1 : file everything_file_perms; allow gruntmasterd_t $1 : lnk_file everything_file_perms;')
9
10require{
11 type bin_t;
12 type httpd_sys_content_rw_t;
13 type httpd_sys_content_t;
14 type httpd_t;
15 type httpd_tmp_t;
16 type proc_t;
17 type urandom_device_t;
18}
19
20type gruntmasterd_t;
21type gruntmasterd_exec_t;
22init_daemon_domain(gruntmasterd_t, gruntmasterd_exec_t);
23
24type gruntmasterd_log_t;
25logging_log_file(gruntmasterd_log_t);
26
27type gruntmaster_job_t;
28type gruntmaster_job_exec_t;
29init_daemon_domain(gruntmaster_job_t, gruntmaster_job_exec_t);
30type_transition gruntmasterd_t gruntmaster_job_exec_t : process gruntmaster_job_t;
31allow gruntmasterd_t gruntmaster_job_t:process transition;
32dontaudit gruntmasterd_t gruntmaster_job_t:process noatsecure;
33allow gruntmaster_job_t gruntmasterd_t:fd use;
34allow gruntmaster_job_t gruntmasterd_t:process sigchld;
35allow gruntmaster_job_t gruntmaster_job_exec_t:file write;
36allow httpd_t gruntmaster_job_exec_t:file { read getattr open };
37
38type_transition gruntmasterd_t httpd_tmp_t : file gruntmaster_job_exec_t;
39
40allow gruntmasterd_t self : process { fork setrlimit };
41allow gruntmasterd_t gruntmaster_job_t : process { sigkill siginh rlimitinh };
42
43gruntmaster_read(httpd_sys_content_t)
44gruntmaster_read(proc_t)
45gruntmaster_read(bin_t)
46gruntmaster_read(lib_t)
47gruntmaster_read(usr_t)
48allow gruntmasterd_t urandom_device_t:chr_file read_file_perms;
49allow gruntmasterd_t { gruntmaster_job_exec_t } : file execute;
50allow gruntmasterd_t { bin_t lib_t } : file { execute execute_no_trans };
51
52gruntmaster_everything(gruntmasterd_log_t)
53gruntmaster_everything(gruntmaster_job_exec_t)
54gruntmaster_everything(httpd_sys_content_rw_t)
55gruntmaster_everything(httpd_tmp_t)
56gruntmaster_everything(tmp_t)
57
58allow gruntmasterd_t self:fifo_file everything_file_perms;
59
60logging_log_filetrans(gruntmasterd_t, gruntmasterd_log_t, file)
61logging_search_logs(gruntmasterd_t)
62
63libs_use_ld_so(gruntmasterd_t)
64libs_use_ld_so(gruntmaster_job_t)
65libs_use_shared_libs(gruntmasterd_t)
66libs_use_shared_libs(gruntmaster_job_t)
67
68miscfiles_read_localization(gruntmasterd_t)
69miscfiles_read_localization(gruntmaster_job_t)
70
71files_search_etc(gruntmasterd_t)
72files_read_etc_files(gruntmasterd_t)
This page took 0.008422 seconds and 4 git commands to generate.