Skip to Content
Red Hat Enterprise Linux Server Cookbook
book

Red Hat Enterprise Linux Server Cookbook

by William Leemans
December 2015
Intermediate to advanced
250 pages
4h 41m
English
Packt Publishing
Content preview from Red Hat Enterprise Linux Server Cookbook

Creating SELinux policies

In some cases, you'll need to create a new SELinux policy—for instance, when installing a piece of software from source. Although I do not recommend installing software from source on enterprise systems, this is sometimes your only option for company-developed software.

It is then time to create your own SELinux policy.

Getting ready

For this recipe, you need to have policycoreutils-python installed.

How to do it…

We'll use the denied entries in the audit.log log file to build our SELinux policy with audit2allow.

In this recipe, we'll use the same example as in the previous recipe: the SELinux context of /var/www/html/index.html that is changed to system_u:object_r:user_home_t:s0. Perform the following steps:

  1. First, create a ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

CentOS 7 Server Deployment Cookbook

CentOS 7 Server Deployment Cookbook

Timothy Boronczyk

Publisher Resources

ISBN: 9781784392017