2005-04-20 19:07:16 +00:00
|
|
|
|
2005-04-26 17:00:25 +00:00
|
|
|
policy_module(getty,1.0)
|
|
|
|
|
2005-05-31 19:52:57 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
2005-10-13 20:59:36 +00:00
|
|
|
# real declaration moved to mls until
|
|
|
|
# range_transition works in loadable modules
|
|
|
|
gen_require(`
|
|
|
|
type getty_t;
|
|
|
|
')
|
2005-04-19 20:42:32 +00:00
|
|
|
type getty_exec_t;
|
2005-06-13 17:35:46 +00:00
|
|
|
init_domain(getty_t,getty_exec_t)
|
|
|
|
domain_wide_inherit_fd(getty_t)
|
2005-04-19 20:42:32 +00:00
|
|
|
|
|
|
|
type getty_etc_t;
|
|
|
|
typealias getty_etc_t alias etc_getty_t;
|
2005-09-05 18:17:17 +00:00
|
|
|
files_type(getty_etc_t)
|
2005-04-19 20:42:32 +00:00
|
|
|
|
2005-09-13 13:06:07 +00:00
|
|
|
type getty_lock_t;
|
|
|
|
files_lock_file(getty_lock_t)
|
|
|
|
|
2005-04-19 20:42:32 +00:00
|
|
|
type getty_log_t;
|
2005-06-13 17:35:46 +00:00
|
|
|
logging_log_file(getty_log_t)
|
2005-04-19 20:42:32 +00:00
|
|
|
|
2005-05-11 19:21:40 +00:00
|
|
|
type getty_tmp_t;
|
2005-06-13 17:35:46 +00:00
|
|
|
files_tmp_file(getty_tmp_t)
|
2005-05-11 19:21:40 +00:00
|
|
|
|
2005-09-13 13:06:07 +00:00
|
|
|
type getty_var_run_t;
|
|
|
|
files_pid_file(getty_var_run_t)
|
|
|
|
|
2005-04-19 20:42:32 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Getty local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
# Use capabilities.
|
2005-09-13 13:06:07 +00:00
|
|
|
allow getty_t self:capability { dac_override chown sys_resource sys_tty_config fowner fsetid };
|
2005-10-21 21:35:25 +00:00
|
|
|
allow getty_t self:process { getpgid getsession signal_perms };
|
2005-04-19 20:42:32 +00:00
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
allow getty_t getty_etc_t:dir r_dir_perms;
|
|
|
|
allow getty_t getty_etc_t:file r_file_perms;
|
2005-06-13 17:35:46 +00:00
|
|
|
files_create_etc_config(getty_t,getty_etc_t,{ file dir })
|
2005-04-19 20:42:32 +00:00
|
|
|
|
2005-09-13 13:06:07 +00:00
|
|
|
allow getty_t getty_lock_t:file create_file_perms;
|
|
|
|
files_create_lock(getty_t,getty_lock_t)
|
|
|
|
|
2005-10-21 21:35:25 +00:00
|
|
|
allow getty_t getty_log_t:file create_file_perms;
|
|
|
|
logging_create_log(getty_t,getty_log_t)
|
2005-09-13 13:06:07 +00:00
|
|
|
|
2005-10-21 21:35:25 +00:00
|
|
|
allow getty_t getty_tmp_t:file create_file_perms;
|
|
|
|
allow getty_t getty_tmp_t:dir create_dir_perms;
|
2005-06-13 17:35:46 +00:00
|
|
|
files_create_tmp_files(getty_t,getty_tmp_t,{ file dir })
|
2005-05-31 19:52:57 +00:00
|
|
|
|
2005-09-13 13:06:07 +00:00
|
|
|
allow getty_t getty_var_run_t:file create_file_perms;
|
2005-10-21 21:35:25 +00:00
|
|
|
allow getty_t getty_var_run_t:dir rw_dir_perms;
|
2005-09-13 13:06:07 +00:00
|
|
|
files_create_pid(getty_t,getty_var_run_t)
|
2005-04-19 20:42:32 +00:00
|
|
|
|
2005-06-14 19:56:46 +00:00
|
|
|
dev_read_sysfs(getty_t)
|
2005-04-19 20:42:32 +00:00
|
|
|
|
2005-04-28 15:46:23 +00:00
|
|
|
# for error condition handling
|
2005-06-10 01:01:13 +00:00
|
|
|
fs_getattr_xattr_fs(getty_t)
|
2005-04-19 20:42:32 +00:00
|
|
|
|
2005-04-28 15:46:23 +00:00
|
|
|
# Chown, chmod, read and write ttys.
|
2005-06-10 01:01:13 +00:00
|
|
|
term_use_all_user_ttys(getty_t)
|
|
|
|
term_use_unallocated_tty(getty_t)
|
|
|
|
term_setattr_all_user_ttys(getty_t)
|
|
|
|
term_setattr_unallocated_ttys(getty_t)
|
|
|
|
term_setattr_console(getty_t)
|
2005-04-19 20:42:32 +00:00
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
auth_rw_login_records(getty_t)
|
2005-05-31 23:02:11 +00:00
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
corecmd_search_bin(getty_t)
|
2005-09-13 13:06:07 +00:00
|
|
|
corecmd_search_sbin(getty_t)
|
2005-04-19 20:42:32 +00:00
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
files_rw_generic_pids(getty_t)
|
|
|
|
files_read_etc_runtime_files(getty_t)
|
2005-06-29 14:26:41 +00:00
|
|
|
files_read_etc_files(getty_t)
|
2005-04-19 20:42:32 +00:00
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
init_rw_script_pid(getty_t)
|
|
|
|
init_use_script_pty(getty_t)
|
2005-04-19 20:42:32 +00:00
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
libs_use_ld_so(getty_t)
|
|
|
|
libs_use_shared_libs(getty_t)
|
2005-05-25 20:58:21 +00:00
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
locallogin_domtrans(getty_t)
|
2005-04-19 20:42:32 +00:00
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
logging_send_syslog_msg(getty_t)
|
2005-04-19 20:42:32 +00:00
|
|
|
|
2005-04-28 15:46:23 +00:00
|
|
|
miscfiles_read_localization(getty_t)
|
2005-09-13 13:06:07 +00:00
|
|
|
|
2005-10-24 14:15:29 +00:00
|
|
|
optional_policy(`nscd.te',`
|
|
|
|
nscd_use_socket(getty_t)
|
|
|
|
')
|
|
|
|
|
2005-10-21 21:35:25 +00:00
|
|
|
optional_policy(`ppp.te',`
|
|
|
|
ppp_domtrans(getty_t)
|
2005-09-13 13:06:07 +00:00
|
|
|
')
|