linux_wiki:list_and_identify_selinux_file_and_process_context

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revision Both sides next revision
linux_wiki:list_and_identify_selinux_file_and_process_context [2016/02/29 22:16]
billdozor created
linux_wiki:list_and_identify_selinux_file_and_process_context [2018/04/29 23:21]
billdozor [Install SELinux Man Pages]
Line 3: Line 3:
 **General Information** **General Information**
  
-About this page/how-to/script+Viewing selinux contexts
  
 ---- ----
 +
 +===== About Context Labels =====
  
 Three parts of a context label Three parts of a context label
Line 12: Line 14:
   * **Type** => Ends in "_t". There are many different context types and this part of SELinux **IS covered** on the RHCSA/RHCE exams.   * **Type** => Ends in "_t". There are many different context types and this part of SELinux **IS covered** on the RHCSA/RHCE exams.
  
-\\+---- 
 + 
 +===== Viewing Context Labels ===== 
 List selinux context List selinux context
 <code bash> <code bash>
Line 37: Line 42:
 </code> </code>
   * "Z" - adds a column of security data to output   * "Z" - adds a column of security data to output
 +
 +----
 +
 +===== Install SELinux Man Pages =====
 +
 +While not part of an objective, being able to do this could help you on the examine if you are not sure what SELinux context to apply.
 +
 +\\
 +To install application specific SELinux man pages...
 +
 +  * Check to see how many SELinux specific man pages are available<code bash>man -k _selinux</code>
 +    * If there are only a few, you need to install them.
 +  * sepolicy is the command needed to install, check what provides that<code bash>yum provides */sepolicy</code>
 +  * Install the required package<code bash>yum install policycoreutils-devel</code>
 +  * Install the SELinux man pages<code bash>sepolicy manpage -a -p /usr/share/man/man8</code>
 +  * Update the man database<code bash>mandb</code>
 +  * Check to ensure the new pages exist<code bash>man -k _selinux</code>
 +
 +----
 +
 +===== Install SEInfo Utility =====
 +
 +seinfo is a useful tool to discover available context types (among other things).
 +
 +See what package provides it<code bash>yum provides /*seinfo</code>
 +
 +Install the package<code bash>yum install setools-console</code>
 +
 +View all the context types that are nfs related<code bash>seinfo -t | grep nfs</code>
  
 ---- ----
  
  • linux_wiki/list_and_identify_selinux_file_and_process_context.txt
  • Last modified: 2019/05/25 23:50
  • (external edit)