|
Chris PeBenito |
e181fe |
# Copyright (C) 2005 Tresys Technology, LLC
|
|
Chris PeBenito |
e181fe |
|
|
Chris PeBenito |
960373 |
policy_module(getty,1.0)
|
|
Chris PeBenito |
960373 |
|
|
Chris PeBenito |
e9a6fc |
type getty_t;
|
|
Chris PeBenito |
b470e3 |
type getty_exec_t;
|
|
Chris PeBenito |
219bcf |
domain_make_init_domain(getty_t,getty_exec_t)
|
|
Chris PeBenito |
e9a6fc |
domain_make_file_descriptors_widely_inheritable(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_tmp_t;
|
|
Chris PeBenito |
b470e3 |
files_make_file(getty_tmp_t)
|
|
Chris PeBenito |
b470e3 |
|
|
Chris PeBenito |
b470e3 |
type getty_log_t;
|
|
Chris PeBenito |
b470e3 |
logging_make_log_file(getty_log_t)
|
|
Chris PeBenito |
b470e3 |
|
|
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 |
b470e3 |
allow getty_t getty_etc_t:dir { getattr search read };
|
|
Chris PeBenito |
b470e3 |
allow getty_t getty_etc_t:file { getattr read };
|
|
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 |
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 |
4600e0 |
filesystem_get_persistent_filesystem_attributes(getty_t)
|
|
Chris PeBenito |
b470e3 |
|
|
Chris PeBenito |
4600e0 |
# Chown, chmod, read and write ttys.
|
|
Chris PeBenito |
4600e0 |
terminal_use_all_terminals(getty_t)
|
|
Chris PeBenito |
4600e0 |
terminal_set_console_attributes(getty_t)
|
|
Chris PeBenito |
b470e3 |
|
|
Chris PeBenito |
4600e0 |
init_script_use_pseudoterminal(getty_t)
|
|
Chris PeBenito |
b470e3 |
|
|
Chris PeBenito |
4600e0 |
files_modify_system_runtime_data(getty_t)
|
|
Chris PeBenito |
4600e0 |
files_create_private_config(getty_t,getty_etc_t,{ file dir })
|
|
Chris PeBenito |
4600e0 |
files_create_private_tmp_data(getty_t,getty_tmp_t,{ file dir })
|
|
Chris PeBenito |
033c80 |
files_manage_system_lock_files(getty_t)
|
|
Chris PeBenito |
b470e3 |
files_read_runtime_system_config(getty_t)
|
|
Chris PeBenito |
b470e3 |
files_read_general_system_config(getty_t)
|
|
Chris PeBenito |
b470e3 |
|
|
Chris PeBenito |
4600e0 |
authlogin_modify_login_records(getty_t)
|
|
Chris PeBenito |
b470e3 |
|
|
Chris PeBenito |
07efe9 |
locallogin_transition(getty_t)
|
|
Chris PeBenito |
b470e3 |
|
|
Chris PeBenito |
4600e0 |
logging_send_system_log_message(getty_t)
|
|
Chris PeBenito |
b470e3 |
|
|
Chris PeBenito |
4600e0 |
miscfiles_read_localization(getty_t)
|
|
Chris PeBenito |
b470e3 |
|
|
Chris PeBenito |
b470e3 |
# TODO: to allow w to display everyone...
|
|
Chris PeBenito |
b470e3 |
#bool user_ttyfile_stat false;
|
|
Chris PeBenito |
b470e3 |
#if (user_ttyfile_stat) {
|
|
Chris PeBenito |
b470e3 |
#allow userdomain ttyfile:chr_file getattr;
|
|
Chris PeBenito |
b470e3 |
#}
|