|
Chris PeBenito |
29af4c |
policy_module(getty, 1.8.0)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
# Declarations
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
e070dd |
type getty_t;
|
|
Chris PeBenito |
17de1b |
type getty_exec_t;
|
|
Chris PeBenito |
3f67f7 |
init_domain(getty_t, getty_exec_t)
|
|
Chris PeBenito |
3e5987 |
init_system_domain(getty_t, getty_exec_t)
|
|
Chris PeBenito |
17de1b |
domain_interactive_fd(getty_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
type getty_etc_t;
|
|
Chris PeBenito |
17de1b |
typealias getty_etc_t alias etc_getty_t;
|
|
Chris PeBenito |
17de1b |
files_config_file(getty_etc_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
type getty_lock_t;
|
|
Chris PeBenito |
17de1b |
files_lock_file(getty_lock_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
type getty_log_t;
|
|
Chris PeBenito |
17de1b |
logging_log_file(getty_log_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
type getty_tmp_t;
|
|
Chris PeBenito |
17de1b |
files_tmp_file(getty_tmp_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
type getty_var_run_t;
|
|
Chris PeBenito |
17de1b |
files_pid_file(getty_var_run_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
# Getty local policy
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# Use capabilities.
|
|
Chris PeBenito |
465510 |
allow getty_t self:capability { dac_override chown setgid sys_resource sys_tty_config fowner fsetid };
|
|
Chris PeBenito |
17de1b |
dontaudit getty_t self:capability sys_tty_config;
|
|
Chris PeBenito |
6b19be |
allow getty_t self:process { getpgid setpgid getsession signal_perms };
|
|
Chris PeBenito |
6b19be |
allow getty_t self:fifo_file rw_fifo_file_perms;
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
3f67f7 |
read_files_pattern(getty_t, getty_etc_t, getty_etc_t)
|
|
Chris PeBenito |
3f67f7 |
read_lnk_files_pattern(getty_t, getty_etc_t, getty_etc_t)
|
|
Chris PeBenito |
3f67f7 |
files_etc_filetrans(getty_t, getty_etc_t,{ file dir })
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
c0868a |
allow getty_t getty_lock_t:file manage_file_perms;
|
|
Chris PeBenito |
3f67f7 |
files_lock_filetrans(getty_t, getty_lock_t, file)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
c0868a |
allow getty_t getty_log_t:file manage_file_perms;
|
|
Chris PeBenito |
3f67f7 |
logging_log_filetrans(getty_t, getty_log_t, file)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
c0868a |
allow getty_t getty_tmp_t:file manage_file_perms;
|
|
Chris PeBenito |
c0868a |
allow getty_t getty_tmp_t:dir manage_dir_perms;
|
|
Chris PeBenito |
3f67f7 |
files_tmp_filetrans(getty_t, getty_tmp_t, { file dir })
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
3f67f7 |
manage_files_pattern(getty_t, getty_var_run_t, getty_var_run_t)
|
|
Chris PeBenito |
3f67f7 |
files_pid_filetrans(getty_t, getty_var_run_t, file)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
b60df9 |
kernel_read_system_state(getty_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
b60df9 |
# these two needed for receiving faxes
|
|
Chris PeBenito |
b60df9 |
corecmd_exec_bin(getty_t)
|
|
Chris PeBenito |
b60df9 |
corecmd_exec_shell(getty_t)
|
|
Chris PeBenito |
5b5300 |
|
|
Chris PeBenito |
17de1b |
dev_read_sysfs(getty_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
5b5300 |
files_rw_generic_pids(getty_t)
|
|
Chris PeBenito |
5b5300 |
files_read_etc_runtime_files(getty_t)
|
|
Chris PeBenito |
5b5300 |
files_read_etc_files(getty_t)
|
|
Chris PeBenito |
5b5300 |
files_search_spool(getty_t)
|
|
Chris PeBenito |
5b5300 |
|
|
Chris PeBenito |
17de1b |
fs_search_auto_mountpoints(getty_t)
|
|
Chris PeBenito |
17de1b |
# for error condition handling
|
|
Chris PeBenito |
17de1b |
fs_getattr_xattr_fs(getty_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
mcs_process_set_categories(getty_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
f8233a |
mls_file_read_all_levels(getty_t)
|
|
Chris PeBenito |
f8233a |
mls_file_write_all_levels(getty_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# Chown, chmod, read and write ttys.
|
|
Chris PeBenito |
c3c753 |
term_use_all_ttys(getty_t)
|
|
Chris PeBenito |
17de1b |
term_use_unallocated_ttys(getty_t)
|
|
Chris PeBenito |
c3c753 |
term_setattr_all_ttys(getty_t)
|
|
Chris PeBenito |
17de1b |
term_setattr_unallocated_ttys(getty_t)
|
|
Chris PeBenito |
17de1b |
term_setattr_console(getty_t)
|
|
Chris PeBenito |
17de1b |
term_dontaudit_use_console(getty_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
auth_rw_login_records(getty_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
init_rw_utmp(getty_t)
|
|
Chris PeBenito |
17de1b |
init_use_script_ptys(getty_t)
|
|
Chris PeBenito |
17de1b |
init_dontaudit_use_script_ptys(getty_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
locallogin_domtrans(getty_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
logging_send_syslog_msg(getty_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
miscfiles_read_localization(getty_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
bf469d |
ifdef(`distro_gentoo',`
|
|
Chris PeBenito |
bf469d |
# Gentoo default /etc/issue makes agetty
|
|
Chris PeBenito |
bf469d |
# do a DNS lookup for the hostname
|
|
Chris PeBenito |
91d6c9 |
sysnet_dns_name_resolve(getty_t)
|
|
Chris PeBenito |
bf469d |
')
|
|
Chris PeBenito |
bf469d |
|
|
Chris PeBenito |
ee6608 |
ifdef(`distro_redhat',`
|
|
Chris PeBenito |
ee6608 |
# getty requires sys_admin #209426
|
|
Chris PeBenito |
ee6608 |
allow getty_t self:capability sys_admin;
|
|
Chris PeBenito |
ee6608 |
')
|
|
Chris PeBenito |
ee6608 |
|
|
Chris PeBenito |
12cf80 |
ifdef(`distro_ubuntu',`
|
|
Chris PeBenito |
12cf80 |
optional_policy(`
|
|
Chris PeBenito |
12cf80 |
unconfined_domain(getty_t)
|
|
Chris PeBenito |
12cf80 |
')
|
|
Chris PeBenito |
12cf80 |
')
|
|
Chris PeBenito |
12cf80 |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
mta_send_mail(getty_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
nscd_socket_use(getty_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
ppp_domtrans(getty_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
6b19be |
rhgb_dontaudit_use_ptys(getty_t)
|
|
Chris PeBenito |
6b19be |
')
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
6b19be |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
udev_read_db(getty_t)
|
|
Chris PeBenito |
17de1b |
')
|