|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
12e9ea |
policy_module(getty,1.4.1)
|
|
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 |
17de1b |
init_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 |
c0868a |
read_files_pattern(getty_t,getty_etc_t,getty_etc_t)
|
|
Chris PeBenito |
c0868a |
read_lnk_files_pattern(getty_t,getty_etc_t,getty_etc_t)
|
|
Chris PeBenito |
17de1b |
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 |
17de1b |
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 |
17de1b |
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 |
17de1b |
files_tmp_filetrans(getty_t,getty_tmp_t,{ file dir })
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
c0868a |
manage_files_pattern(getty_t,getty_var_run_t,getty_var_run_t)
|
|
Chris PeBenito |
17de1b |
files_pid_filetrans(getty_t,getty_var_run_t,file)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
kernel_list_proc(getty_t)
|
|
Chris PeBenito |
17de1b |
kernel_read_proc_symlinks(getty_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
dev_read_sysfs(getty_t)
|
|
Chris PeBenito |
17de1b |
|
|
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 |
17de1b |
term_use_all_user_ttys(getty_t)
|
|
Chris PeBenito |
17de1b |
term_use_unallocated_ttys(getty_t)
|
|
Chris PeBenito |
17de1b |
term_setattr_all_user_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 |
corecmd_search_bin(getty_t)
|
|
Chris PeBenito |
6b19be |
corecmd_read_bin_symlinks(getty_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
files_rw_generic_pids(getty_t)
|
|
Chris PeBenito |
17de1b |
files_read_etc_runtime_files(getty_t)
|
|
Chris PeBenito |
17de1b |
files_read_etc_files(getty_t)
|
|
Chris PeBenito |
465510 |
files_search_spool(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 |
libs_use_ld_so(getty_t)
|
|
Chris PeBenito |
17de1b |
libs_use_shared_libs(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 |
bf469d |
dontaudit getty_t self:udp_socket create_socket_perms;
|
|
Chris PeBenito |
bf469d |
|
|
Chris PeBenito |
692952 |
corenet_dontaudit_all_recvfrom_unlabeled(getty_t)
|
|
Chris PeBenito |
bf469d |
corenet_dontaudit_udp_sendrecv_generic_if(getty_t)
|
|
Chris PeBenito |
bf469d |
corenet_dontaudit_udp_sendrecv_all_nodes(getty_t)
|
|
Chris PeBenito |
bf469d |
corenet_dontaudit_udp_sendrecv_dns_port(getty_t)
|
|
Chris PeBenito |
bf469d |
corenet_dontaudit_sendrecv_dns_client_packets(getty_t)
|
|
Chris PeBenito |
bf469d |
|
|
Chris PeBenito |
bf469d |
sysnet_dontaudit_read_config(getty_t)
|
|
Chris PeBenito |
bf469d |
')
|
|
Chris PeBenito |
bf469d |
|
|
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 |
')
|