|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
465510 |
policy_module(getty,1.1.3)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
# Declarations
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# real declaration moved to mls until
|
|
Chris PeBenito |
17de1b |
# range_transition works in loadable modules
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
17de1b |
type getty_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
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 |
17de1b |
allow getty_t self:process { getpgid getsession signal_perms };
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
allow getty_t getty_etc_t:dir r_dir_perms;
|
|
Chris PeBenito |
17de1b |
allow getty_t getty_etc_t:file r_file_perms;
|
|
Chris PeBenito |
17de1b |
allow getty_t getty_etc_t:lnk_file { getattr read };
|
|
Chris PeBenito |
17de1b |
files_etc_filetrans(getty_t,getty_etc_t,{ file dir })
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
allow getty_t getty_lock_t:file create_file_perms;
|
|
Chris PeBenito |
17de1b |
files_lock_filetrans(getty_t,getty_lock_t,file)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
allow getty_t getty_log_t:file create_file_perms;
|
|
Chris PeBenito |
17de1b |
logging_log_filetrans(getty_t,getty_log_t,file)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
allow getty_t getty_tmp_t:file create_file_perms;
|
|
Chris PeBenito |
17de1b |
allow getty_t getty_tmp_t:dir create_dir_perms;
|
|
Chris PeBenito |
17de1b |
files_tmp_filetrans(getty_t,getty_tmp_t,{ file dir })
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
allow getty_t getty_var_run_t:file create_file_perms;
|
|
Chris PeBenito |
17de1b |
allow getty_t getty_var_run_t:dir rw_dir_perms;
|
|
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 |
17de1b |
mls_file_read_up(getty_t)
|
|
Chris PeBenito |
17de1b |
mls_file_write_down(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 |
17de1b |
corecmd_search_sbin(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 |
17de1b |
ifdef(`targeted_policy',`
|
|
Chris PeBenito |
17de1b |
term_dontaudit_use_unallocated_ttys(getty_t)
|
|
Chris PeBenito |
17de1b |
term_dontaudit_use_generic_ptys(getty_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
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 |
17de1b |
udev_read_db(getty_t)
|
|
Chris PeBenito |
17de1b |
')
|