69 lines
1.9 KiB
Plaintext
69 lines
1.9 KiB
Plaintext
# Copyright (C) 2005 Tresys Technology, LLC
|
|
|
|
policy_module(getty,1.0)
|
|
|
|
type getty_t;
|
|
type getty_exec_t;
|
|
domain_make_init_domain(getty_t,getty_exec_t)
|
|
domain_make_file_descriptors_widely_inheritable(getty_t)
|
|
|
|
type getty_etc_t;
|
|
typealias getty_etc_t alias etc_getty_t;
|
|
|
|
type getty_log_t;
|
|
logging_make_log_file(getty_log_t)
|
|
|
|
type getty_tmp_t;
|
|
files_make_temporary_file(getty_tmp_t)
|
|
|
|
########################################
|
|
#
|
|
# Getty local policy
|
|
#
|
|
|
|
# Use capabilities.
|
|
allow getty_t self:capability { dac_override chown sys_resource sys_tty_config };
|
|
# fbgetty needs fsetid for some reason
|
|
#allow getty_t self:capability fsetid;
|
|
|
|
allow getty_t self:process { getpgid getsession };
|
|
|
|
allow getty_t getty_etc_t:dir { getattr search read };
|
|
allow getty_t getty_etc_t:file { getattr read };
|
|
|
|
allow getty_t getty_tmp_t:file { getattr create read setattr write setattr unlink };
|
|
allow getty_t getty_tmp_t:dir { getattr search create read setattr write setattr unlink rmdir };
|
|
allow getty_t getty_log_t:file { getattr append setattr };
|
|
|
|
kernel_read_hardware_state(getty_t)
|
|
|
|
# for error condition handling
|
|
filesystem_get_persistent_filesystem_attributes(getty_t)
|
|
|
|
# Chown, chmod, read and write ttys.
|
|
terminal_use_all_terminals(getty_t)
|
|
terminal_set_console_attributes(getty_t)
|
|
|
|
init_script_use_pseudoterminal(getty_t)
|
|
|
|
files_modify_system_runtime_data(getty_t)
|
|
files_create_private_config(getty_t,getty_etc_t,{ file dir })
|
|
files_create_private_tmp_data(getty_t,getty_tmp_t,{ file dir })
|
|
files_manage_system_lock_files(getty_t)
|
|
files_read_runtime_system_config(getty_t)
|
|
files_read_general_system_config(getty_t)
|
|
|
|
authlogin_modify_login_records(getty_t)
|
|
|
|
locallogin_transition(getty_t)
|
|
|
|
logging_send_system_log_message(getty_t)
|
|
|
|
miscfiles_read_localization(getty_t)
|
|
|
|
# TODO: to allow w to display everyone...
|
|
#bool user_ttyfile_stat false;
|
|
#if (user_ttyfile_stat) {
|
|
#allow userdomain ttyfile:chr_file getattr;
|
|
#}
|