Chris PeBenito 0fbfa5
#DESC User - Domains for ordinary users.
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
#################################
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# Booleans for user domains.
Chris PeBenito 0fbfa5
Chris PeBenito a1fcff
# Allow applications to read untrusted content
Chris PeBenito a1fcff
# If this is disallowed, Internet content has
Chris PeBenito a1fcff
# to be manually relabeled for read access to be granted
Chris PeBenito a1fcff
bool read_untrusted_content false;
Chris PeBenito a1fcff
Chris PeBenito a1fcff
# Allow applications to write untrusted content
Chris PeBenito a1fcff
# If this is disallowed, no Internet content
Chris PeBenito a1fcff
# will be stored.
Chris PeBenito a1fcff
bool write_untrusted_content false;
Chris PeBenito a1fcff
Chris PeBenito 0fbfa5
# Allow users to read system messages.
Chris PeBenito 0fbfa5
bool user_dmesg false;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# Support NFS home directories
Chris PeBenito 0fbfa5
bool use_nfs_home_dirs false;
Chris PeBenito 0fbfa5
Chris PeBenito 5493c2
# Allow making anonymous memory executable, e.g. 
Chris PeBenito 5493c2
# for runtime-code generation or executable stack.
Chris PeBenito 0fbfa5
bool allow_execmem false;
Chris PeBenito 0fbfa5
Chris PeBenito 5493c2
# Allow making the stack executable via mprotect.
Chris PeBenito 5493c2
# Also requires allow_execmem.
Chris PeBenito 5493c2
bool allow_execstack false;
Chris PeBenito 5493c2
Chris PeBenito 5493c2
# Allow making a modified private file mapping executable (text relocation).
Chris PeBenito 0fbfa5
bool allow_execmod false;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# Support SAMBA home directories
Chris PeBenito 0fbfa5
bool use_samba_home_dirs false;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# Allow users to run TCP servers (bind to ports and accept connection from
Chris PeBenito 0fbfa5
# the same domain and outside users)  disabling this forces FTP passive mode
Chris PeBenito 0fbfa5
# and may change other protocols 
Chris PeBenito 0fbfa5
bool user_tcp_server false;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# Allow system to run with NIS
Chris PeBenito 0fbfa5
bool allow_ypbind false;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# Allow system to run with kerberos
Chris PeBenito 0fbfa5
bool allow_kerberos false;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# Allow users to rw usb devices
Chris PeBenito 0fbfa5
bool user_rw_usb false;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# Allow users to control network interfaces (also needs USERCTL=true)
Chris PeBenito 0fbfa5
bool user_net_control false;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# Allow regular users direct mouse access 
Chris PeBenito 0fbfa5
bool user_direct_mouse false;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# Allow user to r/w noextattrfile (FAT, CDROM, FLOPPY)
Chris PeBenito 0fbfa5
bool user_rw_noexattrfile false;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# Allow reading of default_t files.
Chris PeBenito 0fbfa5
bool read_default_t false;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# Allow staff_r users to search the sysadm home dir and read
Chris PeBenito 0fbfa5
# files (such as ~/.bashrc)
Chris PeBenito 0fbfa5
bool staff_read_sysadm_file false;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
full_user_role(user)
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
ifdef(`user_canbe_sysadm', `
Chris PeBenito 0fbfa5
reach_sysadm(user)
Chris PeBenito 0fbfa5
role_tty_type_change(user, sysadm)
Chris PeBenito 0fbfa5
')
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
#  Do not add any rules referring to user_t to this file!  That will break
Chris PeBenito 0fbfa5
#  support for multiple user roles.
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# a role for staff that allows seeing all domains and control over the user_t
Chris PeBenito 0fbfa5
# domain
Chris PeBenito 0fbfa5
full_user_role(staff)
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
priv_user(staff)
Chris PeBenito 0fbfa5
# if adding new user roles make sure you edit the in_user_role macro in
Chris PeBenito 0fbfa5
# macros/user_macros.te to match
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# lots of user programs accidentally search /root, and also the admin often
Chris PeBenito 0fbfa5
# logs in as UID=0 domain=user_t...
Chris PeBenito 0fbfa5
dontaudit unpriv_userdomain { sysadm_home_dir_t staff_home_dir_t }:dir { getattr search };
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
# Allow the user roles to transition
Chris PeBenito 0fbfa5
# into each other.
Chris PeBenito 0fbfa5
role_tty_type_change(sysadm, user)
Chris PeBenito 0fbfa5
role_tty_type_change(staff, sysadm)
Chris PeBenito 0fbfa5
role_tty_type_change(sysadm, staff)
Chris PeBenito 5493c2
role_tty_type_change(sysadm, secadm)
Chris PeBenito 5493c2
role_tty_type_change(staff, secadm)
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# "ps aux" and "ls -l /dev/pts" make too much noise without this
Chris PeBenito 0fbfa5
dontaudit unpriv_userdomain ptyfile:chr_file getattr;
Chris PeBenito 0fbfa5
Chris PeBenito 5493c2
# to allow w to display everyone...
Chris PeBenito 5493c2
bool user_ttyfile_stat false;
Chris PeBenito 5493c2
Chris PeBenito 5493c2
if (user_ttyfile_stat) {
Chris PeBenito 5493c2
allow userdomain ttyfile:chr_file getattr;
Chris PeBenito 5493c2
}
Chris PeBenito 5493c2