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 ff3138
init_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_log_t;
Chris PeBenito b470e3
logging_make_log_file(getty_log_t)
Chris PeBenito b470e3
Chris PeBenito 38e24a
type getty_tmp_t;
Chris PeBenito 38e24a
files_make_temporary_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 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 4bf4ed
files_create_private_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 4bf4ed
files_create_private_tmp_data(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 763c44
fs_get_persistent_fs_attributes(getty_t)
Chris PeBenito b470e3
Chris PeBenito 4600e0
# Chown, chmod, read and write ttys.
Chris PeBenito 129318
terminal_use_all_private_physical_terminals(getty_t)
Chris PeBenito 129318
terminal_use_general_physical_terminal(getty_t)
Chris PeBenito 129318
terminal_set_all_private_physical_terminal_attributes(getty_t)
Chris PeBenito 129318
terminal_set_general_physical_terminal_attributes(getty_t)
Chris PeBenito 4600e0
terminal_set_console_attributes(getty_t)
Chris PeBenito b470e3
Chris PeBenito d115b2
authlogin_modify_login_records(getty_t)
Chris PeBenito d115b2
Chris PeBenito d115b2
corecommands_search_general_programs_directory(getty_t)
Chris PeBenito b470e3
Chris PeBenito 4600e0
files_modify_system_runtime_data(getty_t)
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 d115b2
init_script_modify_runtime_data(getty_t)
Chris PeBenito d115b2
init_script_use_pseudoterminal(getty_t)
Chris PeBenito b470e3
Chris PeBenito efd8ed
libraries_use_dynamic_loader(getty_t)
Chris PeBenito efd8ed
libraries_use_shared_libraries(getty_t)
Chris PeBenito efd8ed
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)