matchpathcon, secon: add page (#12841)

* matchpathcon: add page

* secon: add page

* Explicitly state "absolute path"

Co-authored-by: Juri Dispan <juri.dispan@posteo.net>

---------

Co-authored-by: Juri Dispan <juri.dispan@posteo.net>
This commit is contained in:
cyqsimon
2024-05-27 20:00:22 +08:00
committed by GitHub
parent c8fcd5f52b
commit 2f3a08f8c0
2 changed files with 42 additions and 0 deletions

25
pages/linux/secon.md Normal file
View File

@@ -0,0 +1,25 @@
# secon
> Get the SELinux security context of a file, pid, current execution context, or a context specification.
> See also: `semanage`, `runcon`, `chcon`.
> More information: <https://manned.org/man/secon>.
- Get the security context of the current execution context:
`secon`
- Get the current security context of a process:
`secon --pid {{1}}`
- Get the current security context of a file, resolving all intermediate symlinks:
`secon --file {{path/to/file_or_directory}}`
- Get the current security context of a symlink itself (i.e. do not resolve):
`secon --link {{path/to/symlink}}`
- Parse and explain a context specification:
`secon {{system_u:system_r:container_t:s0:c899,c900}}`