aboutsummaryrefslogtreecommitdiff
blob: 4264614cec648b64efd5e3a1a4d15227674021c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
policy_module(quota, 1.10.0)

########################################
#
# Declarations
#

attribute_role quota_roles;

type quota_t;
type quota_exec_t;
init_system_domain(quota_t, quota_exec_t)
role quota_roles types quota_t;

type quota_db_t;
files_type(quota_db_t)

type quota_flag_t;
files_type(quota_flag_t)

type quota_nld_t;
type quota_nld_exec_t;
init_daemon_domain(quota_nld_t, quota_nld_exec_t)

type quota_nld_initrc_exec_t;
init_script_file(quota_nld_initrc_exec_t)

type quota_nld_runtime_t alias quota_nld_var_run_t;
files_pid_file(quota_nld_runtime_t)

########################################
#
# Local policy
#

allow quota_t self:capability { dac_override sys_admin };
dontaudit quota_t self:capability sys_tty_config;
allow quota_t self:process signal_perms;

allow quota_t quota_db_t:file { manage_file_perms quotaon };
files_root_filetrans(quota_t, quota_db_t, file)
files_boot_filetrans(quota_t, quota_db_t, file)
files_etc_filetrans(quota_t, quota_db_t, file)
files_tmp_filetrans(quota_t, quota_db_t, file)
files_home_filetrans(quota_t, quota_db_t, file)
files_usr_filetrans(quota_t, quota_db_t, file)
files_var_filetrans(quota_t, quota_db_t, file)
files_spool_filetrans(quota_t, quota_db_t, file)
userdom_user_home_dir_filetrans(quota_t, quota_db_t, file)

kernel_request_load_module(quota_t)
kernel_list_proc(quota_t)
kernel_read_proc_symlinks(quota_t)
kernel_read_kernel_sysctls(quota_t)
kernel_setsched(quota_t)

dev_read_sysfs(quota_t)
dev_getattr_all_blk_files(quota_t)
dev_getattr_all_chr_files(quota_t)

files_list_all(quota_t)
files_read_all_files(quota_t)
files_read_all_symlinks(quota_t)
files_getattr_all_pipes(quota_t)
files_getattr_all_sockets(quota_t)
files_getattr_all_file_type_fs(quota_t)
files_read_etc_runtime_files(quota_t)

fs_get_xattr_fs_quotas(quota_t)
fs_set_xattr_fs_quotas(quota_t)
fs_getattr_xattr_fs(quota_t)
fs_remount_xattr_fs(quota_t)
fs_search_auto_mountpoints(quota_t)

mls_file_read_all_levels(quota_t)

storage_raw_read_fixed_disk(quota_t)

term_dontaudit_use_console(quota_t)

domain_use_interactive_fds(quota_t)

init_use_fds(quota_t)
init_use_script_ptys(quota_t)

logging_send_syslog_msg(quota_t)

userdom_use_user_terminals(quota_t)
userdom_dontaudit_use_unpriv_user_fds(quota_t)

optional_policy(`
	mta_queue_filetrans(quota_t, quota_db_t, file)
	mta_spool_filetrans(quota_t, quota_db_t, file)
')

optional_policy(`
	seutil_sigchld_newrole(quota_t)
')

optional_policy(`
	udev_read_db(quota_t)
')

#######################################
#
# Nld local policy
#

allow quota_nld_t self:fifo_file rw_fifo_file_perms;
allow quota_nld_t self:netlink_socket create_socket_perms;
allow quota_nld_t self:unix_stream_socket { accept listen };

manage_files_pattern(quota_nld_t, quota_nld_runtime_t, quota_nld_runtime_t)
files_pid_filetrans(quota_nld_t, quota_nld_runtime_t, { file })

kernel_read_network_state(quota_nld_t)

auth_use_nsswitch(quota_nld_t)

init_read_utmp(quota_nld_t)

logging_send_syslog_msg(quota_nld_t)

miscfiles_read_localization(quota_nld_t)

userdom_use_user_terminals(quota_nld_t)

optional_policy(`
	dbus_system_bus_client(quota_nld_t)
	dbus_connect_system_bus(quota_nld_t)
')