121 lines
2.7 KiB
Plaintext
121 lines
2.7 KiB
Plaintext
|
|
policy_module(getty,1.1.0)
|
|
|
|
########################################
|
|
#
|
|
# Declarations
|
|
#
|
|
|
|
# real declaration moved to mls until
|
|
# range_transition works in loadable modules
|
|
gen_require(`
|
|
type getty_t;
|
|
')
|
|
type getty_exec_t;
|
|
init_domain(getty_t,getty_exec_t)
|
|
domain_interactive_fd(getty_t)
|
|
|
|
type getty_etc_t;
|
|
typealias getty_etc_t alias etc_getty_t;
|
|
files_config_file(getty_etc_t)
|
|
|
|
type getty_lock_t;
|
|
files_lock_file(getty_lock_t)
|
|
|
|
type getty_log_t;
|
|
logging_log_file(getty_log_t)
|
|
|
|
type getty_tmp_t;
|
|
files_tmp_file(getty_tmp_t)
|
|
|
|
type getty_var_run_t;
|
|
files_pid_file(getty_var_run_t)
|
|
|
|
########################################
|
|
#
|
|
# Getty local policy
|
|
#
|
|
|
|
# Use capabilities.
|
|
allow getty_t self:capability { dac_override chown sys_resource sys_tty_config fowner fsetid };
|
|
dontaudit getty_t self:capability sys_tty_config;
|
|
allow getty_t self:process { getpgid getsession signal_perms };
|
|
|
|
allow getty_t getty_etc_t:dir r_dir_perms;
|
|
allow getty_t getty_etc_t:file r_file_perms;
|
|
allow getty_t getty_etc_t:lnk_file { getattr read };
|
|
files_filetrans_etc(getty_t,getty_etc_t,{ file dir })
|
|
|
|
allow getty_t getty_lock_t:file create_file_perms;
|
|
files_filetrans_lock(getty_t,getty_lock_t)
|
|
|
|
allow getty_t getty_log_t:file create_file_perms;
|
|
logging_filetrans_log(getty_t,getty_log_t)
|
|
|
|
allow getty_t getty_tmp_t:file create_file_perms;
|
|
allow getty_t getty_tmp_t:dir create_dir_perms;
|
|
files_filetrans_tmp(getty_t,getty_tmp_t,{ file dir })
|
|
|
|
allow getty_t getty_var_run_t:file create_file_perms;
|
|
allow getty_t getty_var_run_t:dir rw_dir_perms;
|
|
files_filetrans_pid(getty_t,getty_var_run_t)
|
|
|
|
kernel_list_proc(getty_t)
|
|
kernel_read_proc_symlinks(getty_t)
|
|
|
|
dev_read_sysfs(getty_t)
|
|
|
|
fs_search_auto_mountpoints(getty_t)
|
|
# for error condition handling
|
|
fs_getattr_xattr_fs(getty_t)
|
|
|
|
mls_file_read_up(getty_t)
|
|
mls_file_write_down(getty_t)
|
|
|
|
# Chown, chmod, read and write ttys.
|
|
term_use_all_user_ttys(getty_t)
|
|
term_use_unallocated_ttys(getty_t)
|
|
term_setattr_all_user_ttys(getty_t)
|
|
term_setattr_unallocated_ttys(getty_t)
|
|
term_setattr_console(getty_t)
|
|
term_dontaudit_use_console(getty_t)
|
|
|
|
auth_rw_login_records(getty_t)
|
|
|
|
corecmd_search_bin(getty_t)
|
|
corecmd_search_sbin(getty_t)
|
|
|
|
files_rw_generic_pids(getty_t)
|
|
files_read_etc_runtime_files(getty_t)
|
|
files_read_etc_files(getty_t)
|
|
|
|
init_rw_utmp(getty_t)
|
|
init_use_script_ptys(getty_t)
|
|
init_dontaudit_use_script_ptys(getty_t)
|
|
|
|
libs_use_ld_so(getty_t)
|
|
libs_use_shared_libs(getty_t)
|
|
|
|
locallogin_domtrans(getty_t)
|
|
|
|
logging_send_syslog_msg(getty_t)
|
|
|
|
miscfiles_read_localization(getty_t)
|
|
|
|
ifdef(`targeted_policy',`
|
|
term_dontaudit_use_unallocated_ttys(getty_t)
|
|
term_dontaudit_use_generic_ptys(getty_t)
|
|
')
|
|
|
|
optional_policy(`nscd',`
|
|
nscd_socket_use(getty_t)
|
|
')
|
|
|
|
optional_policy(`ppp',`
|
|
ppp_domtrans(getty_t)
|
|
')
|
|
|
|
optional_policy(`udev',`
|
|
udev_read_db(getty_t)
|
|
')
|