refpolicy: add ability to set default state.
authorAdam Duskett <Aduskett@gmail.com>
Sat, 20 May 2017 20:41:43 +0000 (16:41 -0400)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 6 Jun 2017 21:38:04 +0000 (23:38 +0200)
commit83875effcfe1d5d16f4e6e3dcacb1b402631bfa7
treee6a1ab0de30e311f5b39dc230c7255ecdda024f1
parentd54aa0e861850986d847338c9e6218bffde3d801
refpolicy: add ability to set default state.

SELinux requires a config file in /etc/selinux which controls the state
of SELinux on the system.

This config file has two options set in it:
SELINUX which set's the state of selinux on boot.
SELINUXTYPE which should equal the name of the policy.  In this case, the
default name is targeted.

This patch adds:
- A choice menu on Config.in that allows the user to select a default
  SELinux state.

- A basic config file that will be installed to
  target/etc/selinux and will set SELINUX= to the selected state.

Signed-off-by: Adam Duskett <Adamduskett@outlook.com>
Acked-by: Matt Weber <matthew.weber@rockwellcollins.com>
[Thomas:
 - rename option to BR2_PACKAGE_REFPOLICY_POLICY_STATE
 - qstrip the variable
 - drop unused REFPOLICY_NAME variable.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/refpolicy/Config.in
package/refpolicy/config [new file with mode: 0644]
package/refpolicy/refpolicy.mk