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