package/libsepol: set default policy version
authorAdam Duskett <aduskett@gmail.com>
Mon, 3 Feb 2020 13:29:51 +0000 (05:29 -0800)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Mon, 3 Feb 2020 15:49:33 +0000 (16:49 +0100)
commit55784bcbfa77671359a6e7a98a6a73bf8cc73126
treeeefd78645ff82551e1d57f9f02ee08053072f86b
parent45bd1e73a9297239bc318df2d57ecb70a4fc7bb5
package/libsepol: set default policy version

If a policy is built that is newer than the kernel can support, the
libsepol will fail to load that policy.

Indeed, a user can manually select the policy version in the config
as-is. However, it is not a friendly solution. The best solution available
is to set a default policy version based off of the toolchain header kernel
version. While a user may have a toolchain that has older kernel headers than
the built kernel, it is still better than setting the default to the maximum
available version that SELinux can support.

The following defaults policy versions are as follows for the given toolchain
headers:

31 >= 4.13
30 >= 4.3
29 >= 3.14
28 >= 3.5
26 >= 2.6
default 25

Note: Version 27 was never released.

Signed-off-by: Adam Duskett <aduskett@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/libsepol/Config.in