Go to file
Yi Zhao 43cb7c2d1b eudev: remove udev-cache and sync the initscript to latest oe-core version
The udev-cache has been remove in oe-core commit
048f4149b8438c521e8b65a3c96d850a9b4a3e5b. So we can also remove it.

Also sync the initscript to latest oe-core version.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2020-04-07 09:28:04 -04:00
classes selinux.bbclass: remove True option in getVar() 2020-04-03 08:39:07 -04:00
conf layer.conf: update LAYERSERIES_COMPAT for dunfell 2020-04-03 08:39:07 -04:00
dynamic-layers python: move appends to a dynamic-layer 2020-01-30 21:46:58 -05:00
recipes-connectivity openssh: update sshd_config 2019-04-14 17:07:16 -04:00
recipes-core eudev: remove udev-cache and sync the initscript to latest oe-core version 2020-04-07 09:28:04 -04:00
recipes-devtools python: move appends to a dynamic-layer 2020-01-30 21:46:58 -05:00
recipes-extended sysklogd: sync the initscript to latest oe-core version 2020-04-07 09:28:04 -04:00
recipes-graphics mesa: switch to meson build 2019-06-06 19:04:14 -04:00
recipes-kernel linux-yocto: drop 4.x bbappend 2020-02-26 08:11:16 -05:00
recipes-security clean up getVar() usage 2020-04-03 08:48:01 -04:00
recipes-support libpcre: do no create links when compiling for windows 2019-04-14 17:13:50 -04:00
MAINTAINERS MAINTAINERS: update maintainer 2019-12-24 09:30:38 -05:00
README refpolicy: update to 2.20190201 and git HEAD policies 2019-04-12 15:28:38 -04:00
SELinux-FAQ documentation: update guidance for runqemu 2013-09-25 10:52:12 -04:00

meta-selinux
============

This layer's purpose is enabling SE Linux support.

The majority of this layers work is accomplished in bbappend files, used to
enable SE Linux support in existing recipes.

A new recipes-security was added.  The purpose of this category is to add
software specific to system security.

Please see the MAINTAINERS file for information on contacting the maintainers
of this layer, as well as instructions for submitting patches.


Dependencies
------------

This layer depends on the openembedded-core metadata and the meta-python and
meta-oe layers from the meta-openembedded repository.


Maintenance
-----------
Please see the MAINTAINERS file for information on contacting the maintainers
of this layer, as well as instructions for submitting patches.


Building the meta-selinux layer
-------------------------------
In order to add selinux support to the poky build this layer should be added
to your projects bblayers.conf file.

By default the selinux components are disabled.  This conforms to the
Yocto Project compatible guideline that indicate that simply including a
layer should not change the system behavior.

In order to use the components in this layer you must add the 'selinux' to the
DISTRO_FEATURES.  In addition to selinux, you should be sure that acl, xattr and
pam are also present.
e.g. DISTRO_FEATURES_append = " acl xattr pam selinux"

You must also specify a preferred provider for the virtual/refpolicy.  The
included policies with this layer are simply reference policies and will need
to be tailored for your environment.  
* Enable the refpolicy-mls:
e.g. PREFERRED_PROVIDER_virtual/refpolicy ?= "refpolicy-mls"


Using different versions of refpolicy
-------------------------------------
To prepare selinux enabled images using different ver. of refpolicy,
we can choose supported releases of refpolicy
refer to available versions under recipes-security/refpolicy

We can use the refpolicy directly from git repository instead of release tarballs.
By default refpolicy from git builds head commit of master branch, we can update
SRCREV for refpolicy and refpolicy-contrib as appropriate at refpolicy_git.inc
to check refpolicy as per required commits.

* enable the preferred refpolicy-minimum:
PREFERRED_VERSION_refpolicy-minimum = "2.20151208"
PREFERRED_VERSION_refpolicy = "2.20151208"


Using different init manager
----------------------------
By default selinux enabled images coming up with "sysvinit" as init manager,
we can use "systemd" as an init manager using below changes to local.conf

* enable systemd as init manager changes to local.conf
DISTRO_FEATURES_remove = " sysvinit"
DISTRO_FEATURES_append = " systemd"
VIRTUAL-RUNTIME_init_manager = "systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED = ""


Starting up the system
----------------------
Most likely the reference policy selected will not just work "out of the box".

As always, if you update the reference policy to better work with OpenEmbedded
or Poky configurations, please submit the changes back to the project.

When using 'core-image-selinux', the system will boot and automatically setup
the policy by running the "fixfiles -f -F relabel" for you.  This is
implemented via the 'selinux-autorelabel' recipe.

The 'core-image-selinux-minimal' does not automatically relabel the system.
So you must boot using the parameters "selinux=1 enforcing=0", and then
manually perform the setup.  Running 'fixfiles -f -F relabel' is available
in this configuration.

After logging in you can verify selinux is present using:

$ sestatus

Output should include:
SELinux status:                 enabled
...
Current mode:                   enforcing
...

The above indicates that selinux is currently running, and if you are running
in an enforcing mode or not.


License
-------

All metadata is MIT licensed unless otherwise stated. Source code included
in tree for individual recipes is under the LICENSE stated in each recipe
(.bb file) unless otherwise stated.

This README document is Copyright (C) 2012 Wind River Systems, Inc.