Book Image

SELinux Cookbook

By : Sven Vermeulen
Book Image

SELinux Cookbook

By: Sven Vermeulen

Overview of this book

Table of Contents (17 chapters)
SELinux Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Creating a generic application domain


In some situations, it makes sense to create a generic application domain, even though multiple implementations exist for the same functionality. Examples are the Java domain (which works for all the popular Java™ implementations) and init domain. When this occurs, carefully consider whether the generic application domain will always be sufficient, or whether specific application domains might come into play later. When this isn't clear, make sure that the policy being developed is flexible enough to cater both situations.

How to do it…

In order to create a generic application policy that is still flexible with respect to potential specific policies that would be developed later, follow the upcoming set of steps:

  1. Identify the permissions that are (almost) always applicable to the functional domain, regardless of the implementation.

  2. Assign those permissions to a base implementation. For instance, for Java™ implementations, assign permissions as follows:

    attribute...