diff options
author | Xin Ouyang <Xin.Ouyang@windriver.com> | 2012-06-15 17:57:53 +0800 |
---|---|---|
committer | Xin Ouyang <Xin.Ouyang@windriver.com> | 2012-06-15 17:58:54 +0800 |
commit | 1fb5922d15574cb4675f44e434391dd0cf93b79f (patch) | |
tree | 8a310760dc84efbb208f4573483e43d85d19e9bf | |
parent | c911fda243f62cbbd6decee144e011e11a619aea (diff) | |
download | meta-selinux-1fb5922d15574cb4675f44e434391dd0cf93b79f.tar.gz |
selinux: Add bb for default selinux config.
Now, the default policy is "mls".
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
-rw-r--r-- | recipes-security/selinux/selinux-config_0.1.bb | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/recipes-security/selinux/selinux-config_0.1.bb b/recipes-security/selinux/selinux-config_0.1.bb new file mode 100644 index 0000000..c0ed158 --- /dev/null +++ b/recipes-security/selinux/selinux-config_0.1.bb | |||
@@ -0,0 +1,33 @@ | |||
1 | DEFAULT_POLICY = "mls" | ||
2 | |||
3 | SUMMARY = "SELinux configuration" | ||
4 | DESCRIPTION = "\ | ||
5 | This is the configuration files for SELinux on WRLinux system. \ | ||
6 | " | ||
7 | |||
8 | SECTION = "base" | ||
9 | LICENSE = "MIT" | ||
10 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" | ||
11 | PR = "r0" | ||
12 | |||
13 | CONFFILES_${PN} += "${sysconfdir}/selinux/config" | ||
14 | |||
15 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
16 | |||
17 | do_install () { | ||
18 | echo "\ | ||
19 | # This file controls the state of SELinux on the system. | ||
20 | # SELINUX= can take one of these three values: | ||
21 | # enforcing - SELinux security policy is enforced. | ||
22 | # permissive - SELinux prints warnings instead of enforcing. | ||
23 | # disabled - No SELinux policy is loaded. | ||
24 | SELINUX=enforcing | ||
25 | # SELINUXTYPE= can take one of these two values: | ||
26 | # standard - Standard Security protection. | ||
27 | # mls - Multi Level Security protection. | ||
28 | SELINUXTYPE=${DEFAULT_POLICY} | ||
29 | " > ${WORKDIR}/config | ||
30 | install -d ${D}/${sysconfdir}/selinux | ||
31 | install -m 0644 ${WORKDIR}/config ${D}/${sysconfdir}/selinux/ | ||
32 | } | ||
33 | |||