|
Chris PeBenito |
e181fe |
|
|
Chris PeBenito |
d3d270 |
policy_module(getty,1.1.0)
|
|
Chris PeBenito |
960373 |
|
|
Chris PeBenito |
4bf4ed |
########################################
|
|
Chris PeBenito |
4bf4ed |
#
|
|
Chris PeBenito |
4bf4ed |
# Declarations
|
|
Chris PeBenito |
4bf4ed |
#
|
|
Chris PeBenito |
4bf4ed |
|
|
Chris PeBenito |
77f6e2 |
# real declaration moved to mls until
|
|
Chris PeBenito |
77f6e2 |
# range_transition works in loadable modules
|
|
Chris PeBenito |
77f6e2 |
gen_require(`
|
|
Chris PeBenito |
77f6e2 |
type getty_t;
|
|
Chris PeBenito |
77f6e2 |
')
|
|
Chris PeBenito |
b470e3 |
type getty_exec_t;
|
|
Chris PeBenito |
c9428d |
init_domain(getty_t,getty_exec_t)
|
|
Chris PeBenito |
15722e |
domain_interactive_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 |
9bbc75 |
files_config_file(getty_etc_t)
|
|
Chris PeBenito |
b470e3 |
|
|
Chris PeBenito |
0907bd |
type getty_lock_t;
|
|
Chris PeBenito |
0907bd |
files_lock_file(getty_lock_t)
|
|
Chris PeBenito |
0907bd |
|
|
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 |
0907bd |
type getty_var_run_t;
|
|
Chris PeBenito |
0907bd |
files_pid_file(getty_var_run_t)
|
|
Chris PeBenito |
0907bd |
|
|
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 |
0907bd |
allow getty_t self:capability { dac_override chown sys_resource sys_tty_config fowner fsetid };
|
|
Chris PeBenito |
33acca |
dontaudit getty_t self:capability sys_tty_config;
|
|
Chris PeBenito |
e6a2ea |
allow getty_t self:process { getpgid getsession signal_perms };
|
|
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 |
33acca |
allow getty_t getty_etc_t:lnk_file { getattr read };
|
|
Chris PeBenito |
103fe2 |
files_etc_filetrans(getty_t,getty_etc_t,{ file dir })
|
|
Chris PeBenito |
b470e3 |
|
|
Chris PeBenito |
0907bd |
allow getty_t getty_lock_t:file create_file_perms;
|
|
Chris PeBenito |
1c1ac6 |
files_lock_filetrans(getty_t,getty_lock_t,file)
|
|
Chris PeBenito |
0907bd |
|
|
Chris PeBenito |
e6a2ea |
allow getty_t getty_log_t:file create_file_perms;
|
|
Chris PeBenito |
1c1ac6 |
logging_log_filetrans(getty_t,getty_log_t,file)
|
|
Chris PeBenito |
0907bd |
|
|
Chris PeBenito |
e6a2ea |
allow getty_t getty_tmp_t:file create_file_perms;
|
|
Chris PeBenito |
e6a2ea |
allow getty_t getty_tmp_t:dir create_dir_perms;
|
|
Chris PeBenito |
103fe2 |
files_tmp_filetrans(getty_t,getty_tmp_t,{ file dir })
|
|
Chris PeBenito |
4bf4ed |
|
|
Chris PeBenito |
0907bd |
allow getty_t getty_var_run_t:file create_file_perms;
|
|
Chris PeBenito |
e6a2ea |
allow getty_t getty_var_run_t:dir rw_dir_perms;
|
|
Chris PeBenito |
1c1ac6 |
files_pid_filetrans(getty_t,getty_var_run_t,file)
|
|
Chris PeBenito |
b470e3 |
|
|
Chris PeBenito |
33acca |
kernel_list_proc(getty_t)
|
|
Chris PeBenito |
33acca |
kernel_read_proc_symlinks(getty_t)
|
|
Chris PeBenito |
33acca |
|
|
Chris PeBenito |
8bd678 |
dev_read_sysfs(getty_t)
|
|
Chris PeBenito |
b470e3 |
|
|
Chris PeBenito |
33acca |
fs_search_auto_mountpoints(getty_t)
|
|
Chris PeBenito |
4600e0 |
# for error condition handling
|
|
Chris PeBenito |
0fd9dc |
fs_getattr_xattr_fs(getty_t)
|
|
Chris PeBenito |
b470e3 |
|
|
Chris PeBenito |
bf080a |
mls_file_read_up(getty_t)
|
|
Chris PeBenito |
bf080a |
mls_file_write_down(getty_t)
|
|
Chris PeBenito |
bf080a |
|
|
Chris PeBenito |
4600e0 |
# Chown, chmod, read and write ttys.
|
|
Chris PeBenito |
0fd9dc |
term_use_all_user_ttys(getty_t)
|
|
Chris PeBenito |
1815ba |
term_use_unallocated_ttys(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 |
33acca |
term_dontaudit_use_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 |
0907bd |
corecmd_search_sbin(getty_t)
|
|
Chris PeBenito |
b470e3 |
|
|
Chris PeBenito |
c9428d |
files_rw_generic_pids(getty_t)
|
|
Chris PeBenito |
c9428d |
files_read_etc_runtime_files(getty_t)
|
|
Chris PeBenito |
8fd367 |
files_read_etc_files(getty_t)
|
|
Chris PeBenito |
b470e3 |
|
|
Chris PeBenito |
68228b |
init_rw_utmp(getty_t)
|
|
Chris PeBenito |
1815ba |
init_use_script_ptys(getty_t)
|
|
Chris PeBenito |
1815ba |
init_dontaudit_use_script_ptys(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)
|
|
Chris PeBenito |
0907bd |
|
|
Chris PeBenito |
33acca |
ifdef(`targeted_policy',`
|
|
Chris PeBenito |
1815ba |
term_dontaudit_use_unallocated_ttys(getty_t)
|
|
Chris PeBenito |
1815ba |
term_dontaudit_use_generic_ptys(getty_t)
|
|
Chris PeBenito |
33acca |
')
|
|
Chris PeBenito |
33acca |
|
|
Chris PeBenito |
132880 |
optional_policy(`nscd',`
|
|
Chris PeBenito |
1815ba |
nscd_socket_use(getty_t)
|
|
Chris PeBenito |
34e722 |
')
|
|
Chris PeBenito |
34e722 |
|
|
Chris PeBenito |
132880 |
optional_policy(`ppp',`
|
|
Chris PeBenito |
e6a2ea |
ppp_domtrans(getty_t)
|
|
Chris PeBenito |
0907bd |
')
|
|
Chris PeBenito |
33acca |
|
|
Chris PeBenito |
132880 |
optional_policy(`udev',`
|
|
Chris PeBenito |
725926 |
udev_read_db(getty_t)
|
|
Chris PeBenito |
33acca |
')
|