File: consoletype.te

package info (click to toggle)
refpolicy 2%3A2.20190201-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 11,440 kB
  • sloc: python: 1,915; makefile: 612; ansic: 336; sh: 174; sed: 20; xml: 13; awk: 7
file content (125 lines) | stat: -rw-r--r-- 3,153 bytes parent folder | download
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
policy_module(consoletype, 1.12.0)

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

type consoletype_t;
type consoletype_exec_t;
init_domain(consoletype_t, consoletype_exec_t)
init_system_domain(consoletype_t, consoletype_exec_t)

########################################
#
# Local declarations
#

allow consoletype_t self:capability { sys_admin sys_tty_config };
allow consoletype_t self:process { transition signal_perms getsched setsched getsession getpgid setpgid getcap setcap share getattr noatsecure siginh rlimitinh dyntransition setkeycreate setsockcreate getrlimit };
allow consoletype_t self:fd use;
allow consoletype_t self:fifo_file rw_fifo_file_perms;
allow consoletype_t self:sock_file read_sock_file_perms;
allow consoletype_t self:unix_dgram_socket create_socket_perms;
allow consoletype_t self:unix_stream_socket create_stream_socket_perms;
allow consoletype_t self:unix_dgram_socket sendto;
allow consoletype_t self:unix_stream_socket connectto;
allow consoletype_t self:shm create_shm_perms;
allow consoletype_t self:sem create_sem_perms;
allow consoletype_t self:msgq create_msgq_perms;
allow consoletype_t self:msg { send receive };

kernel_use_fds(consoletype_t)
kernel_dontaudit_read_system_state(consoletype_t)

dev_dontaudit_rw_generic_chr_files(consoletype_t)

domain_use_interactive_fds(consoletype_t)

files_dontaudit_read_root_files(consoletype_t)
files_list_usr(consoletype_t)

fs_getattr_all_fs(consoletype_t)
fs_search_auto_mountpoints(consoletype_t)
fs_write_nfs_files(consoletype_t)
fs_list_inotifyfs(consoletype_t)

mls_file_read_all_levels(consoletype_t)
mls_file_write_all_levels(consoletype_t)

term_use_all_terms(consoletype_t)

init_use_fds(consoletype_t)
init_use_script_ptys(consoletype_t)
init_use_script_fds(consoletype_t)
init_rw_script_pipes(consoletype_t)

userdom_use_user_terminals(consoletype_t)

ifdef(`distro_redhat',`
	fs_rw_tmpfs_chr_files(consoletype_t)
')

optional_policy(`
	acpi_use_fds(consoletype_t)
	acpi_write_pipes(consoletype_t)
')

optional_policy(`
	auth_read_pam_pid(consoletype_t)
')

optional_policy(`
	cron_read_pipes(consoletype_t)
	cron_use_system_job_fds(consoletype_t)
')

optional_policy(`
	dbus_use_system_bus_fds(consoletype_t)
')

optional_policy(`
	files_read_etc_files(consoletype_t)
	firstboot_use_fds(consoletype_t)
	firstboot_rw_pipes(consoletype_t)
')

optional_policy(`
	hal_dontaudit_use_fds(consoletype_t)
	hal_dontaudit_rw_pipes(consoletype_t)
	hal_dontaudit_rw_dgram_sockets(consoletype_t)
	hal_dontaudit_write_log(consoletype_t)
')

optional_policy(`
	hotplug_dontaudit_use_fds(consoletype_t)
')

optional_policy(`
	logrotate_dontaudit_use_fds(consoletype_t)
')

optional_policy(`
	lpd_read_config(consoletype_t)
')

optional_policy(`
	nis_use_ypbind(consoletype_t)
')

optional_policy(`
	# Commonly used from postinst scripts
	rpm_read_pipes(consoletype_t)
')

optional_policy(`
	userdom_use_unpriv_users_fds(consoletype_t)
')

optional_policy(`
	kernel_read_xen_state(consoletype_t)
	kernel_write_xen_state(consoletype_t)
	xen_append_log(consoletype_t)
	xen_dontaudit_rw_unix_stream_sockets(consoletype_t)
	xen_dontaudit_use_fds(consoletype_t)
')