2019-10-29 06:45:37 +00:00
|
|
|
# runcon
|
|
|
|
|
|
|
|
> Run a program in a different SELinux security context.
|
2024-05-27 16:54:20 +01:00
|
|
|
> See also: `secon`.
|
2021-04-01 16:54:26 +01:00
|
|
|
> More information: <https://www.gnu.org/software/coreutils/runcon>.
|
2019-10-29 06:45:37 +00:00
|
|
|
|
2024-05-27 16:54:20 +01:00
|
|
|
- Print the security context of the current execution context:
|
2019-10-29 06:45:37 +00:00
|
|
|
|
|
|
|
`runcon`
|
|
|
|
|
|
|
|
- Specify the domain to run a command in:
|
|
|
|
|
|
|
|
`runcon -t {{domain}}_t {{command}}`
|
|
|
|
|
|
|
|
- Specify the context role to run a command with:
|
|
|
|
|
|
|
|
`runcon -r {{role}}_r {{command}}`
|
|
|
|
|
|
|
|
- Specify the full context to run a command with:
|
|
|
|
|
|
|
|
`runcon {{user}}_u:{{role}}_r:{{domain}}_t {{command}}`
|