runcon
runcon CONTEXTO COMANDO [ARG...]
runcon [-c] [-u USUARIO] [-r ROL] [-t TIPO] [-l RANGO] COMANDO [ARG...]
Ejecutar comando con contexto de seguridad especificado bajo sistemas habilitados con SELinux.
Options
--compute,-c-
Calcular contexto de transición de proceso antes de modificar.
--user=<USER>,-u <USER>-
Establecer usuario USUARIO en el contexto de seguridad objetivo.
--role=<ROLE>,-r <ROLE>-
Establecer rol ROL en el contexto de seguridad objetivo.
--type=<TYPE>,-t <TYPE>-
Establecer tipo TIPO en el contexto de seguridad objetivo.
--range=<RANGE>,-l <RANGE>-
Establecer rango RANGO en el contexto de seguridad objetivo.
Ejecutar COMANDO con CONTEXTO completamente especificado, o con contexto de seguridad actual o transicionado modificado por uno o más de NIVEL, ROL, TIPO, y USUARIO.
Si ninguno de –compute, –type, –user, –role o –range está especificado, entonces el primer argumento se usa como el contexto completo.
Note que solo contextos cuidadosamente elegidos es probable que se ejecuten exitosamente.
Si ni CONTEXTO ni COMANDO está especificado, se imprime el contexto de seguridad actual.
Examples
Print the security context of the current execution context:
runcon
Specify the domain to run a command in:
runcon {{[-t|--type]}} {{domain}}_t {{command}}
Specify the context role to run a command with:
runcon {{[-r|--role]}} {{role}}_r {{command}}
Specify the full context to run a command with:
runcon {{user}}_u:{{role}}_r:{{domain}}_t {{command}}
The examples are provided by the tldr-pages project under the CC BY 4.0 License.
Please note that, as uutils is a work in progress, some examples might fail.