Ce contenu n'est pas disponible dans la langue sélectionnée.
3.2. SELinux Contexts for Processes
Use the
ps -eZ command to view the SELinux context for processes. For example:
- Open a terminal, such as
. - Run the
passwdcommand. Do not enter a new password. - Open a new tab, or another terminal, and run the
ps -eZ | grep passwdcommand. The output is similar to the following:unconfined_u:unconfined_r:passwd_t:s0-s0:c0.c1023 13212 pts/1 00:00:00 passwd
unconfined_u:unconfined_r:passwd_t:s0-s0:c0.c1023 13212 pts/1 00:00:00 passwdCopy to Clipboard Copied! Toggle word wrap Toggle overflow - In the first tab/terminal, press
Ctrl+Cto cancel thepasswdapplication.
In this example, when the
passwd application (labeled with the passwd_exec_t type) is executed, the user's shell process transitions to the passwd_t domain. Remember that the type defines a domain for processes, and a type for files.
Use the
ps -eZ command to view the SELinux contexts for running processes. The following is a truncated example of the output, and may differ on your system:
The
system_r role is used for system processes, such as daemons. Type Enforcement then separates each domain.