mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-14 18:48:33 +00:00
Update cheatsheets
This commit is contained in:
26
linux/runcon
Normal file
26
linux/runcon
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# runcon
|
||||
|
||||
> Run a program in a different SELinux security context.
|
||||
> With neither context nor command, print the current security context.
|
||||
> More information: <https://www.gnu.org/software/coreutils/runcon>.
|
||||
|
||||
- Determine the current domain:
|
||||
|
||||
`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}}`
|
||||
Reference in New Issue
Block a user