aboutsummaryrefslogtreecommitdiff
blob: a8eec9fca53e5c8eb016755b924dbddf47c38476 (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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
policy_module(consolekit, 1.13.1)

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

type consolekit_t;
type consolekit_exec_t;
init_daemon_domain(consolekit_t, consolekit_exec_t)

type consolekit_log_t;
logging_log_file(consolekit_log_t)

type consolekit_tmpfs_t;
files_tmpfs_file(consolekit_tmpfs_t)

type consolekit_unit_t;
init_unit_file(consolekit_unit_t)

type consolekit_var_run_t;
files_pid_file(consolekit_var_run_t)
init_daemon_pid_file(consolekit_var_run_t, dir, "ConsoleKit")

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

allow consolekit_t self:capability { chown dac_override dac_read_search fowner setgid setuid sys_admin sys_nice sys_ptrace sys_tty_config };
allow consolekit_t self:process { getsched signal setfscreate };
allow consolekit_t self:fifo_file rw_fifo_file_perms;
allow consolekit_t self:unix_stream_socket { accept listen };

create_files_pattern(consolekit_t, consolekit_log_t, consolekit_log_t)
append_files_pattern(consolekit_t, consolekit_log_t, consolekit_log_t)
read_files_pattern(consolekit_t, consolekit_log_t, consolekit_log_t)
setattr_files_pattern(consolekit_t, consolekit_log_t, consolekit_log_t)
logging_log_filetrans(consolekit_t, consolekit_log_t, file)

manage_dirs_pattern(consolekit_t, consolekit_var_run_t, consolekit_var_run_t)
manage_files_pattern(consolekit_t, consolekit_var_run_t, consolekit_var_run_t)
manage_fifo_files_pattern(consolekit_t, consolekit_var_run_t, consolekit_var_run_t)
files_pid_filetrans(consolekit_t, consolekit_var_run_t, { dir file })

kernel_read_system_state(consolekit_t)

corenet_all_recvfrom_unlabeled(consolekit_t)
corenet_all_recvfrom_netlabel(consolekit_t)
corenet_tcp_sendrecv_generic_if(consolekit_t)
corenet_tcp_sendrecv_generic_node(consolekit_t)

corecmd_exec_bin(consolekit_t)
corecmd_exec_shell(consolekit_t)

dev_read_urand(consolekit_t)
dev_rw_sysfs(consolekit_t)
dev_setattr_all_chr_files(consolekit_t)

domain_read_all_domains_state(consolekit_t)
domain_use_interactive_fds(consolekit_t)
domain_dontaudit_ptrace_all_domains(consolekit_t)

files_read_usr_files(consolekit_t)
files_read_var_lib_files(consolekit_t)
files_search_all_mountpoints(consolekit_t)
files_purge_tmp(consolekit_t)

fs_list_inotifyfs(consolekit_t)
fs_mount_tmpfs(consolekit_t)
fs_unmount_tmpfs(consolekit_t)
fs_relabelfrom_tmpfs(consolekit_t)

mcs_ptrace_all(consolekit_t)

seutil_libselinux_linked(consolekit_t)
seutil_read_file_contexts(consolekit_t)

term_use_all_terms(consolekit_t)

auth_use_nsswitch(consolekit_t)
auth_manage_pam_console_data(consolekit_t)
auth_write_login_records(consolekit_t)
auth_create_pam_console_data_dirs(consolekit_t)
auth_pid_filetrans_pam_var_console(consolekit_t, dir, "console")

logging_send_syslog_msg(consolekit_t)
logging_send_audit_msgs(consolekit_t)

miscfiles_read_localization(consolekit_t)

userdom_dontaudit_read_user_home_content_files(consolekit_t)
userdom_read_user_tmp_files(consolekit_t)
userdom_manage_user_runtime_root_dirs(consolekit_t)
userdom_manage_user_runtime_dirs(consolekit_t)
userdom_mounton_user_runtime_dirs(consolekit_t)
userdom_relabelto_user_runtime_dirs(consolekit_t)
userdom_pid_filetrans_user_runtime_root(consolekit_t, dir, "user")
userdom_user_runtime_root_filetrans_user_runtime(consolekit_t, dir)

tunable_policy(`use_nfs_home_dirs',`
	fs_read_nfs_files(consolekit_t)
')

tunable_policy(`use_samba_home_dirs',`
	fs_read_cifs_files(consolekit_t)
')

optional_policy(`
	cgmanager_stream_connect(consolekit_t)
')

optional_policy(`
	dbus_read_lib_files(consolekit_t)
	dbus_system_domain(consolekit_t, consolekit_exec_t)

	optional_policy(`
		hal_dbus_chat(consolekit_t)
	')

	optional_policy(`
		policykit_dbus_chat(consolekit_t)
	')

	optional_policy(`
		rpm_dbus_chat(consolekit_t)
	')

	optional_policy(`
		unconfined_dbus_chat(consolekit_t)
	')
')

optional_policy(`
	devicekit_manage_log_files(consolekit_t)
')

optional_policy(`
	hal_ptrace(consolekit_t)
')

optional_policy(`
	networkmanager_append_log_files(consolekit_t)
')

optional_policy(`
	policykit_domtrans_auth(consolekit_t)
	policykit_read_lib(consolekit_t)
	policykit_read_reload(consolekit_t)
')

optional_policy(`
	shutdown_domtrans(consolekit_t)
')

optional_policy(`
	corenet_sendrecv_xserver_client_packets(consolekit_t)
	corenet_tcp_connect_xserver_port(consolekit_t)
	corenet_tcp_sendrecv_xserver_port(consolekit_t)
	xserver_non_drawing_client(consolekit_t)
	xserver_read_xdm_pid(consolekit_t)
	xserver_read_user_xauth(consolekit_t)
	xserver_stream_connect(consolekit_t)
	xserver_user_x_domain_template(consolekit, consolekit_t, consolekit_tmpfs_t)
')

optional_policy(`
	udev_domtrans(consolekit_t)
	udev_read_db(consolekit_t)
	udev_read_pid_files(consolekit_t)
	udev_signal(consolekit_t)
')

optional_policy(`
	unconfined_stream_connect(consolekit_t)
')