|
Chris PeBenito |
31b7c0 |
#DESC Admin - Domains for administrators.
|
|
Chris PeBenito |
31b7c0 |
#
|
|
Chris PeBenito |
31b7c0 |
#################################
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
# sysadm_t is the system administrator domain.
|
|
Chris PeBenito |
31b7c0 |
type sysadm_t, domain, privlog, privowner, admin, userdomain, web_client_domain, privhome, etc_writer, privmodule, nscd_client_domain
|
|
Chris PeBenito |
31b7c0 |
ifdef(`direct_sysadm_daemon', `, priv_system_role, privrangetrans')
|
|
Chris PeBenito |
31b7c0 |
; dnl end of sysadm_t type declaration
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
allow privhome home_root_t:dir { getattr search };
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
# system_r is authorized for sysadm_t for single-user mode.
|
|
Chris PeBenito |
31b7c0 |
role system_r types sysadm_t;
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
general_proc_read_access(sysadm_t)
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
# sysadm_t is also granted permissions specific to administrator domains.
|
|
Chris PeBenito |
31b7c0 |
admin_domain(sysadm)
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
# for su
|
|
Chris PeBenito |
31b7c0 |
allow sysadm_t userdomain:fd use;
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
ifdef(`separate_secadm', `', `
|
|
Chris PeBenito |
31b7c0 |
security_manager_domain(sysadm_t)
|
|
Chris PeBenito |
31b7c0 |
')
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
# Add/remove user home directories
|
|
Chris PeBenito |
31b7c0 |
file_type_auto_trans(sysadm_t, home_root_t, user_home_dir_t, dir)
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
limited_user_role(secadm)
|
|
Chris PeBenito |
31b7c0 |
typeattribute secadm_t admin;
|
|
Chris PeBenito |
31b7c0 |
role secadm_r types secadm_t;
|
|
Chris PeBenito |
31b7c0 |
security_manager_domain(secadm_t)
|
|
Chris PeBenito |
31b7c0 |
r_dir_file(secadm_t, { var_t var_log_t })
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
typeattribute secadm_tty_device_t admin_tty_type;
|
|
Chris PeBenito |
31b7c0 |
typeattribute secadm_devpts_t admin_tty_type;
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
bool allow_ptrace false;
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
if (allow_ptrace) {
|
|
Chris PeBenito |
31b7c0 |
can_ptrace(sysadm_t, domain)
|
|
Chris PeBenito |
31b7c0 |
}
|