|
Chris PeBenito |
e181fe |
|
|
Chris PeBenito |
960373 |
policy_module(getty,1.0)
|
|
Chris PeBenito |
960373 |
|
|
Chris PeBenito |
4bf4ed |
########################################
|
|
Chris PeBenito |
4bf4ed |
#
|
|
Chris PeBenito |
4bf4ed |
# Declarations
|
|
Chris PeBenito |
4bf4ed |
#
|
|
Chris PeBenito |
4bf4ed |
|
|
Chris PeBenito |
e9a6fc |
type getty_t;
|
|
Chris PeBenito |
b470e3 |
type getty_exec_t;
|
|
Chris PeBenito |
c9428d |
init_domain(getty_t,getty_exec_t)
|
|
Chris PeBenito |
c9428d |
domain_wide_inherit_fd(getty_t)
|
|
Chris PeBenito |
b470e3 |
|
|
Chris PeBenito |
b470e3 |
type getty_etc_t;
|
|
Chris PeBenito |
b470e3 |
typealias getty_etc_t alias etc_getty_t;
|
|
Chris PeBenito |
b470e3 |
|
|
Chris PeBenito |
b470e3 |
type getty_log_t;
|
|
Chris PeBenito |
c9428d |
logging_log_file(getty_log_t)
|
|
Chris PeBenito |
b470e3 |
|
|
Chris PeBenito |
38e24a |
type getty_tmp_t;
|
|
Chris PeBenito |
c9428d |
files_tmp_file(getty_tmp_t)
|
|
Chris PeBenito |
38e24a |
|
|
Chris PeBenito |
b470e3 |
########################################
|
|
Chris PeBenito |
b470e3 |
#
|
|
Chris PeBenito |
b470e3 |
# Getty local policy
|
|
Chris PeBenito |
b470e3 |
#
|
|
Chris PeBenito |
b470e3 |
|
|
Chris PeBenito |
b470e3 |
# Use capabilities.
|
|
Chris PeBenito |
b470e3 |
allow getty_t self:capability { dac_override chown sys_resource sys_tty_config };
|
|
Chris PeBenito |
b470e3 |
# fbgetty needs fsetid for some reason
|
|
Chris PeBenito |
b470e3 |
#allow getty_t self:capability fsetid;
|
|
Chris PeBenito |
b470e3 |
|
|
Chris PeBenito |
b470e3 |
allow getty_t self:process { getpgid getsession };
|
|
Chris PeBenito |
b470e3 |
|
|
Chris PeBenito |
dd8229 |
allow getty_t getty_etc_t:dir r_dir_perms;
|
|
Chris PeBenito |
dd8229 |
allow getty_t getty_etc_t:file r_file_perms;
|
|
Chris PeBenito |
c9428d |
files_create_etc_config(getty_t,getty_etc_t,{ file dir })
|
|
Chris PeBenito |
b470e3 |
|
|
Chris PeBenito |
b470e3 |
allow getty_t getty_tmp_t:file { getattr create read setattr write setattr unlink };
|
|
Chris PeBenito |
b470e3 |
allow getty_t getty_tmp_t:dir { getattr search create read setattr write setattr unlink rmdir };
|
|
Chris PeBenito |
c9428d |
files_create_tmp_files(getty_t,getty_tmp_t,{ file dir })
|
|
Chris PeBenito |
4bf4ed |
|
|
Chris PeBenito |
b470e3 |
allow getty_t getty_log_t:file { getattr append setattr };
|
|
Chris PeBenito |
b470e3 |
|
|
Chris PeBenito |
b470e3 |
kernel_read_hardware_state(getty_t)
|
|
Chris PeBenito |
b470e3 |
|
|
Chris PeBenito |
4600e0 |
# for error condition handling
|
|
Chris PeBenito |
0fd9dc |
fs_getattr_xattr_fs(getty_t)
|
|
Chris PeBenito |
b470e3 |
|
|
Chris PeBenito |
4600e0 |
# Chown, chmod, read and write ttys.
|
|
Chris PeBenito |
0fd9dc |
term_use_all_user_ttys(getty_t)
|
|
Chris PeBenito |
0fd9dc |
term_use_unallocated_tty(getty_t)
|
|
Chris PeBenito |
0fd9dc |
term_setattr_all_user_ttys(getty_t)
|
|
Chris PeBenito |
0fd9dc |
term_setattr_unallocated_ttys(getty_t)
|
|
Chris PeBenito |
0fd9dc |
term_setattr_console(getty_t)
|
|
Chris PeBenito |
b470e3 |
|
|
Chris PeBenito |
c9428d |
auth_rw_login_records(getty_t)
|
|
Chris PeBenito |
d115b2 |
|
|
Chris PeBenito |
c9428d |
corecmd_search_bin(getty_t)
|
|
Chris PeBenito |
b470e3 |
|
|
Chris PeBenito |
c9428d |
files_rw_generic_pids(getty_t)
|
|
Chris PeBenito |
c9428d |
files_manage_generic_lock_files(getty_t)
|
|
Chris PeBenito |
c9428d |
files_read_etc_runtime_files(getty_t)
|
|
Chris PeBenito |
c9428d |
files_read_generic_etc_files(getty_t)
|
|
Chris PeBenito |
b470e3 |
|
|
Chris PeBenito |
c9428d |
init_rw_script_pid(getty_t)
|
|
Chris PeBenito |
c9428d |
init_use_script_pty(getty_t)
|
|
Chris PeBenito |
b470e3 |
|
|
Chris PeBenito |
c9428d |
libs_use_ld_so(getty_t)
|
|
Chris PeBenito |
c9428d |
libs_use_shared_libs(getty_t)
|
|
Chris PeBenito |
efd8ed |
|
|
Chris PeBenito |
c9428d |
locallogin_domtrans(getty_t)
|
|
Chris PeBenito |
b470e3 |
|
|
Chris PeBenito |
c9428d |
logging_send_syslog_msg(getty_t)
|
|
Chris PeBenito |
b470e3 |
|
|
Chris PeBenito |
4600e0 |
miscfiles_read_localization(getty_t)
|