secadm_selinux

NAME
DESCRIPTION
BOOLEANS
MANAGED FILES
COMMANDS
AUTHOR
SEE ALSO

NAME

secadm_r − Security administrator role - Security Enhanced Linux Policy

DESCRIPTION

SELinux supports Roles Based Access Control (RBAC), some Linux roles are login roles, while other roles need to be transition into.

Note: Examples in this man page will use the staff_u SELinux user.

Non login roles are usually used for administrative tasks. For example, tasks that require root privileges. Roles control which types a user can run processes with. Roles often have default types assigned to them.

The default type for the secadm_r role is secadm_t.

The newrole program to transition directly to this role.

newrole -r secadm_r -t secadm_t

sudo is the preferred method to do transition from one role to another. You setup sudo to transition to secadm_r by adding a similar line to the /etc/sudoers file.

USERNAME ALL=(ALL) ROLE=secadm_r TYPE=secadm_t COMMAND

sudo will run COMMAND as staff_u:secadm_r:secadm_t:LEVEL

When using a a non login role, you need to setup SELinux so that your SELinux user can reach secadm_r role.

Execute the following to see all of the assigned SELinux roles:

semanage user -l

You need to add secadm_r to the staff_u user. You could setup the staff_u user to be able to use the secadm_r role with a command like:

$ semanage user -m -R ’staff_r system_r secadm_r’ staff_u

SELinux policy also controls which roles can transition to a different role. You can list these rules using the following command.

search --role_allow

SELinux policy allows the sysadm_r, staff_r, auditadm_r roles can transition to the secadm_r role.

BOOLEANS

SELinux policy is customizable based on least access required. secadm policy is extremely flexible and has several booleans that allow you to manipulate the policy and run secadm with the tightest access possible.

If you want to deny user domains applications to map a memory region as both executable and writable, this is dangerous and the executable should be reported in bugzilla, you must turn on the deny_execmem boolean. Enabled by default.

setsebool -P deny_execmem 1

If you want to deny any process from ptracing or debugging any other processes, you must turn on the deny_ptrace boolean. Enabled by default.

setsebool -P deny_ptrace 1

If you want to allow all domains to use other domains file descriptors, you must turn on the domain_fd_use boolean. Enabled by default.

setsebool -P domain_fd_use 1

If you want to allow all domains to have the kernel load modules, you must turn on the domain_kernel_load_modules boolean. Disabled by default.

setsebool -P domain_kernel_load_modules 1

If you want to allow all domains to execute in fips_mode, you must turn on the fips_mode boolean. Enabled by default.

setsebool -P fips_mode 1

If you want to enable reading of urandom for all domains, you must turn on the global_ssp boolean. Disabled by default.

setsebool -P global_ssp 1

If you want to allow httpd cgi support, you must turn on the httpd_enable_cgi boolean. Disabled by default.

setsebool -P httpd_enable_cgi 1

If you want to unify HTTPD handling of all content files, you must turn on the httpd_unified boolean. Disabled by default.

setsebool -P httpd_unified 1

If you want to allow confined applications to run with kerberos, you must turn on the kerberos_enabled boolean. Enabled by default.

setsebool -P kerberos_enabled 1

If you want to allow logging in and using the system from /dev/console, you must turn on the login_console_enabled boolean. Enabled by default.

setsebool -P login_console_enabled 1

If you want to determine whether calling user domains can execute Polipo daemon in the polipo_session_t domain, you must turn on the polipo_session_users boolean. Disabled by default.

setsebool -P polipo_session_users 1

If you want to disallow programs, such as newrole, from transitioning to administrative user domains, you must turn on the secure_mode boolean. Enabled by default.

setsebool -P secure_mode 1

If you want to allow regular users direct dri device access, you must turn on the selinuxuser_direct_dri_enabled boolean. Enabled by default.

setsebool -P selinuxuser_direct_dri_enabled 1

If you want to allow unconfined executables to make their stack executable. This should never, ever be necessary. Probably indicates a badly coded executable, but could indicate an attack. This executable should be reported in bugzilla, you must turn on the selinuxuser_execstack boolean. Enabled by default.

setsebool -P selinuxuser_execstack 1

If you want to allow users to connect to the local mysql server, you must turn on the selinuxuser_mysql_connect_enabled boolean. Disabled by default.

setsebool -P selinuxuser_mysql_connect_enabled 1

If you want to allow confined users the ability to execute the ping and traceroute commands, you must turn on the selinuxuser_ping boolean. Enabled by default.

setsebool -P selinuxuser_ping 1

If you want to allow users to connect to PostgreSQL, you must turn on the selinuxuser_postgresql_connect_enabled boolean. Disabled by default.

setsebool -P selinuxuser_postgresql_connect_enabled 1

If you want to allow user to r/w files on filesystems that do not have extended attributes (FAT, CDROM, FLOPPY), you must turn on the selinuxuser_rw_noexattrfile boolean. Enabled by default.

setsebool -P selinuxuser_rw_noexattrfile 1

If you want to allow user music sharing, you must turn on the selinuxuser_share_music boolean. Disabled by default.

setsebool -P selinuxuser_share_music 1

If you want to allow users to run TCP servers (bind to ports and accept connection from the same domain and outside users) disabling this forces FTP passive mode and may change other protocols, you must turn on the selinuxuser_tcp_server boolean. Disabled by default.

setsebool -P selinuxuser_tcp_server 1

If you want to allow user to use ssh chroot environment, you must turn on the selinuxuser_use_ssh_chroot boolean. Disabled by default.

setsebool -P selinuxuser_use_ssh_chroot 1

If you want to allow ssh logins as sysadm_r:sysadm_t, you must turn on the ssh_sysadm_login boolean. Disabled by default.

setsebool -P ssh_sysadm_login 1

If you want to support NFS home directories, you must turn on the use_nfs_home_dirs boolean. Disabled by default.

setsebool -P use_nfs_home_dirs 1

If you want to support SAMBA home directories, you must turn on the use_samba_home_dirs boolean. Disabled by default.

setsebool -P use_samba_home_dirs 1

If you want to allow the graphical login program to login directly as sysadm_r:sysadm_t, you must turn on the xdm_sysadm_login boolean. Enabled by default.

setsebool -P xdm_sysadm_login 1

If you want to allows clients to write to the X server shared memory segments, you must turn on the xserver_clients_write_xshm boolean. Disabled by default.

setsebool -P xserver_clients_write_xshm 1

If you want to support X userspace object manager, you must turn on the xserver_object_manager boolean. Enabled by default.

setsebool -P xserver_object_manager 1

MANAGED FILES

The SELinux process type secadm_t can manage files labeled with the following file types. The paths listed are the default paths for these file types. Note the processes UID still need to have DAC permissions.

anon_inodefs_t

auth_cache_t

/var/cache/coolkey(/.*)?

bluetooth_helper_tmp_t

bluetooth_helper_tmpfs_t

cache_home_t

/root/.cache(/.*)?

/home/[^/]*/.nv(/.*)?

/home/[^/]*/.cache(/.*)?

chrome_sandbox_tmpfs_t

config_home_t

/root/.kde(/.*)?

/root/.xine(/.*)?

/root/.config(/.*)?

/var/run/user/[^/]*/dconf(/.*)?

/root/.Xdefaults

/home/[^/]*/.kde(/.*)?

/home/[^/]*/.xine(/.*)?

/home/[^/]*/.config(/.*)?

/home/[^/]*/.cache/dconf(/.*)?

/home/[^/]*/.Xdefaults

data_home_t

/root/.local/share(/.*)?

/home/[^/]*/.local/share(/.*)?

default_context_t

/root/.default_contexts

file_context_t

httpd_user_content_t

/home/[^/]*/((www)|(web)|(public_html))(/.+)?

httpd_user_htaccess_t

/home/[^/]*/((www)|(web)|(public_html))(/.*)?/.htaccess

httpd_user_ra_content_t

/home/[^/]*/((www)|(web)|(public_html))(/.*)?/logs(/.*)?

httpd_user_rw_content_t

httpd_user_script_exec_t

/home/[^/]*/((www)|(web)|(public_html))/cgi-bin(/.+)?

iceauth_home_t

/root/.DCOP.*

/root/.ICEauthority.*

/home/[^/]*/.DCOP.*

/home/[^/]*/.ICEauthority.*

irc_home_t

/home/[^/]*/.irssi(/.*)?

/home/[^/]*/irclog(/.*)?

/home/[^/]*/.ircmotd

irc_tmp_t

irssi_home_t

mozilla_home_t

/root/.lyx(/.*)?

/root/.java(/.*)?

/root/.adobe(/.*)?

/root/.gnash(/.*)?

/root/.webex(/.*)?

/root/.galeon(/.*)?

/root/.spicec(/.*)?

/root/.IBMERS(/.*)?

/root/POkemon.*(/.*)?

/root/.mozilla(/.*)?

/root/.phoenix(/.*)?

/root/.icedtea(/.*)?

/root/.netscape(/.*)?

/root/.quakelive(/.*)?

/root/.ICAClient(/.*)?

/root/.macromedia(/.*)?

/root/.thunderbird(/.*)?

/root/.gcjwebplugin(/.*)?

/root/.grl-podcasts(/.*)?

/root/.cache/mozilla(/.*)?

/root/.icedteaplugin(/.*)?

/root/zimbrauserdata(/.*)?

/root/.config/chromium(/.*)?

/root/.juniper_networks(/.*)?

/root/.cache/icedtea-web(/.*)?

/root/abc

/root/.gnashpluginrc

/home/[^/]*/.lyx(/.*)?

/home/[^/]*/.java(/.*)?

/home/[^/]*/.adobe(/.*)?

/home/[^/]*/.gnash(/.*)?

/home/[^/]*/.webex(/.*)?

/home/[^/]*/.galeon(/.*)?

/home/[^/]*/.spicec(/.*)?

/home/[^/]*/.IBMERS(/.*)?

/home/[^/]*/POkemon.*(/.*)?

/home/[^/]*/.mozilla(/.*)?

/home/[^/]*/.phoenix(/.*)?

/home/[^/]*/.icedtea(/.*)?

/home/[^/]*/.netscape(/.*)?

/home/[^/]*/.quakelive(/.*)?

/home/[^/]*/.ICAClient(/.*)?

/home/[^/]*/.macromedia(/.*)?

/home/[^/]*/.thunderbird(/.*)?

/home/[^/]*/.gcjwebplugin(/.*)?

/home/[^/]*/.grl-podcasts(/.*)?

/home/[^/]*/.cache/mozilla(/.*)?

/home/[^/]*/.icedteaplugin(/.*)?

/home/[^/]*/zimbrauserdata(/.*)?

/home/[^/]*/.config/chromium(/.*)?

/home/[^/]*/.juniper_networks(/.*)?

/home/[^/]*/.cache/icedtea-web(/.*)?

/home/[^/]*/abc

/home/[^/]*/.gnashpluginrc

mpd_user_data_t

noxattrfs

all files on file systems which do not support extended attributes

pulseaudio_home_t

/root/.pulse(/.*)?

/root/.config/pulse(/.*)?

/root/.esd_auth

/root/.pulse-cookie

/home/[^/]*/.pulse(/.*)?

/home/[^/]*/.config/pulse(/.*)?

/home/[^/]*/.esd_auth

/home/[^/]*/.pulse-cookie

sandbox_file_t

sandbox_tmpfs_type

all sandbox content in tmpfs file systems

screen_home_t

/root/.screen(/.*)?

/home/[^/]*/.screen(/.*)?

/home/[^/]*/.screenrc

secadm_home_dir_t

secadm_home_t

selinux_login_config_t

semanage_store_t

/etc/share/selinux/mls(/.*)?

/etc/share/selinux/targeted(/.*)?

ssh_home_t

/var/lib/[^/]+/.ssh(/.*)?

/root/.ssh(/.*)?

/var/lib/one/.ssh(/.*)?

/var/lib/pgsql/.ssh(/.*)?

/var/lib/openshift/[^/]+/.ssh(/.*)?

/var/lib/amanda/.ssh(/.*)?

/var/lib/stickshift/[^/]+/.ssh(/.*)?

/var/lib/gitolite/.ssh(/.*)?

/var/lib/nocpulse/.ssh(/.*)?

/var/lib/gitolite3/.ssh(/.*)?

/var/lib/openshift/gear/[^/]+/.ssh(/.*)?

/root/.shosts

/home/[^/]*/.ssh(/.*)?

/home/[^/]*/.ansible/cp/.*

/home/[^/]*/.shosts

syslog_conf_t

/etc/syslog.conf

/etc/rsyslog.conf

/etc/rsyslog.d(/.*)?

unlabeled_t

usbfs_t

user_fonts_cache_t

/root/.fontconfig(/.*)?

/root/.fonts/auto(/.*)?

/root/.fonts.cache-.*

/home/[^/]*/.fontconfig(/.*)?

/home/[^/]*/.fonts/auto(/.*)?

/home/[^/]*/.fonts.cache-.*

user_fonts_config_t

/root/.fonts.d(/.*)?

/root/.fonts.conf

/home/[^/]*/.fonts.d(/.*)?

/home/[^/]*/.fonts.conf

user_fonts_t

/root/.fonts(/.*)?

/tmp/.font-unix(/.*)?

/home/[^/]*/.fonts(/.*)?

user_tmp_type

all user tmp files

var_t

/nsr(/.*)?

/var/.*

/srv/.*

/var

/srv

/var/tmp

xauth_home_t

/root/.xauth.*

/root/.Xauth.*

/root/.serverauth.*

/root/.Xauthority.*

/var/lib/pqsql/.xauth.*

/var/lib/pqsql/.Xauthority.*

/var/lib/nxserver/home/.xauth.*

/var/lib/nxserver/home/.Xauthority.*

/home/[^/]*/.xauth.*

/home/[^/]*/.Xauth.*

/home/[^/]*/.serverauth.*

/home/[^/]*/.Xauthority.*

xdm_tmp_t

/tmp/.X11-unix(/.*)?

/tmp/.ICE-unix(/.*)?

/tmp/.X0-lock

xserver_tmpfs_t

COMMANDS

semanage fcontext can also be used to manipulate default file context mappings.

semanage permissive can also be used to manipulate whether or not a process type is permissive.

semanage module can also be used to enable/disable/install/remove policy modules.

semanage boolean can also be used to manipulate the booleans

system-config-selinux is a GUI tool available to customize SELinux policy settings.

AUTHOR

This manual page was auto-generated using sepolicy manpage .

SEE ALSO

selinux(8), secadm(8), semanage(8), restorecon(8), chcon(1), sepolicy(8) , setsebool(8), secadm_dbusd_selinux(8), secadm_dbusd_selinux(8), secadm_gkeyringd_selinux(8), secadm_gkeyringd_selinux(8), secadm_mozilla_selinux(8), secadm_mozilla_selinux(8), secadm_screen_selinux(8), secadm_screen_selinux(8), secadm_seunshare_selinux(8), secadm_seunshare_selinux(8), secadm_ssh_agent_selinux(8), secadm_ssh_agent_selinux(8), secadm_wine_selinux(8), secadm_wine_selinux(8)