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
|
policy_module(getty)
########################################
#
# Declarations
#
type getty_t;
type getty_exec_t;
init_domain(getty_t, getty_exec_t)
init_system_domain(getty_t, getty_exec_t)
domain_interactive_fd(getty_t)
type getty_conf_t alias getty_etc_t;
files_config_file(getty_conf_t)
type getty_lock_t;
files_lock_file(getty_lock_t)
type getty_log_t;
logging_log_file(getty_log_t)
type getty_runtime_t alias getty_var_run_t;
files_runtime_file(getty_runtime_t)
type getty_tmp_t;
files_tmp_file(getty_tmp_t)
########################################
#
# Getty local policy
#
# Use capabilities.
allow getty_t self:capability { chown dac_override fowner fsetid setgid sys_admin sys_resource sys_tty_config };
dontaudit getty_t self:capability sys_tty_config;
allow getty_t self:capability2 checkpoint_restore;
allow getty_t self:process { getpgid getsession setpgid signal_perms };
allow getty_t self:fifo_file rw_fifo_file_perms;
read_files_pattern(getty_t, getty_conf_t, getty_conf_t)
read_lnk_files_pattern(getty_t, getty_conf_t, getty_conf_t)
allow getty_t getty_lock_t:file manage_file_perms;
files_lock_filetrans(getty_t, getty_lock_t, file)
allow getty_t getty_log_t:file { append_file_perms create_file_perms setattr_file_perms };
logging_log_filetrans(getty_t, getty_log_t, file)
allow getty_t getty_runtime_t:dir watch;
allow getty_t getty_runtime_t:file watch;
manage_files_pattern(getty_t, getty_runtime_t, getty_runtime_t)
files_runtime_filetrans(getty_t, getty_runtime_t, file)
allow getty_t getty_tmp_t:file manage_file_perms;
allow getty_t getty_tmp_t:dir manage_dir_perms;
files_tmp_filetrans(getty_t, getty_tmp_t, { file dir })
kernel_read_kernel_sysctls(getty_t)
kernel_read_system_state(getty_t)
# these two needed for receiving faxes
corecmd_exec_bin(getty_t)
corecmd_exec_shell(getty_t)
dev_read_sysfs(getty_t)
files_read_etc_runtime_files(getty_t)
files_read_etc_files(getty_t)
files_search_spool(getty_t)
files_dontaudit_search_var_lib(getty_t)
fs_search_auto_mountpoints(getty_t)
fs_getattr_cgroup(getty_t)
fs_search_cgroup_dirs(getty_t)
# for error condition handling
fs_getattr_xattr_fs(getty_t)
mcs_process_set_categories(getty_t)
mls_file_read_all_levels(getty_t)
mls_file_write_all_levels(getty_t)
# Chown, chmod, read and write ttys.
term_use_all_ttys(getty_t)
term_use_unallocated_ttys(getty_t)
term_setattr_all_ttys(getty_t)
term_setattr_unallocated_ttys(getty_t)
term_setattr_console(getty_t)
auth_rw_login_records(getty_t)
auth_use_nsswitch(getty_t)
init_rw_utmp(getty_t)
locallogin_domtrans(getty_t)
logging_send_syslog_msg(getty_t)
miscfiles_read_localization(getty_t)
ifdef(`distro_gentoo',`
# Gentoo default /etc/issue makes agetty
# do a DNS lookup for the hostname
sysnet_dns_name_resolve(getty_t)
files_search_var_lib(getty_t)
')
ifdef(`distro_ubuntu',`
optional_policy(`
unconfined_domain(getty_t)
')
')
tunable_policy(`console_login',`
# Support logging in from /dev/console
term_use_console(getty_t)
',`
term_dontaudit_use_console(getty_t)
')
optional_policy(`
mta_send_mail(getty_t)
')
optional_policy(`
nscd_use(getty_t)
')
optional_policy(`
ppp_domtrans(getty_t)
')
|