1 | policy_module(misc,1.0.0) |
---|
2 | |
---|
3 | ### USER ### |
---|
4 | |
---|
5 | require { |
---|
6 | type user_t; |
---|
7 | }; |
---|
8 | |
---|
9 | afs_access(user_t); |
---|
10 | |
---|
11 | ### AFS ### |
---|
12 | |
---|
13 | require { |
---|
14 | type kernel_t, initrc_t, proc_t; |
---|
15 | }; |
---|
16 | |
---|
17 | afs_access(kernel_t); |
---|
18 | |
---|
19 | # init.d script sets up cell files: |
---|
20 | allow initrc_t afsd_etc_t:file { setattr write }; |
---|
21 | # permit aklog: |
---|
22 | allow user_t proc_t:file write; |
---|
23 | |
---|
24 | ### CRON ### |
---|
25 | |
---|
26 | require { |
---|
27 | type crond_t, user_cron_spool_t; |
---|
28 | }; |
---|
29 | |
---|
30 | afs_access(crond_t); |
---|
31 | ### crond can switch to user_t rather than user_crond_t |
---|
32 | ### (we have pam_env set SELINUX_ROLE_TYPE to accomplish this) |
---|
33 | domain_cron_exemption_target(user_t) |
---|
34 | allow user_t user_cron_spool_t:file entrypoint; |
---|
35 | allow crond_t user_t:process transition; |
---|
36 | dontaudit crond_t user_t:process { noatsecure siginh rlimitinh }; |
---|
37 | allow crond_t user_t:fd use; |
---|
38 | allow user_t crond_t:fd use; |
---|
39 | allow user_t crond_t:fifo_file rw_file_perms; |
---|
40 | allow user_t crond_t:process sigchld; |
---|
41 | |
---|
42 | ### SSH ### |
---|
43 | |
---|
44 | require { |
---|
45 | type sshd_t; |
---|
46 | }; |
---|
47 | |
---|
48 | afs_access(sshd_t); |
---|
49 | ### sshd GSSAPI authentication |
---|
50 | kerberos_read_keytab(sshd_t) |
---|
51 | allow user_t kernel_t:key search; |
---|
52 | |
---|
53 | ### MAIL ### |
---|
54 | |
---|
55 | require { |
---|
56 | type postfix_local_t, procmail_t, sendmail_t; |
---|
57 | }; |
---|
58 | |
---|
59 | afs_access(postfix_local_t); |
---|
60 | afs_access(procmail_t); |
---|
61 | mta_sendmail_exec(user_t) |
---|
62 | can_exec(user_t, sendmail_exec_t) |
---|
63 | allow sendmail_t postfix_local_t:fd use; |
---|
64 | allow sendmail_t postfix_local_t:fifo_file { getattr write }; |
---|
65 | corecmd_exec_bin(procmail_t) |
---|
66 | corecmd_exec_sbin(procmail_t) |
---|
67 | |
---|
68 | ### HTTPD ### |
---|
69 | |
---|
70 | require { |
---|
71 | type httpd_t, httpd_suexec_exec_t; |
---|
72 | }; |
---|
73 | |
---|
74 | afs_access(httpd_t); |
---|
75 | allow httpd_t self:key all_key_perms; |
---|
76 | allow httpd_t self:process setrlimit; |
---|
77 | allow httpd_t httpd_suexec_exec_t:file { execute execute_no_trans }; |
---|