diff options
author | Xin Ouyang <Xin.Ouyang@windriver.com> | 2013-01-07 17:50:00 +0800 |
---|---|---|
committer | Xin Ouyang <Xin.Ouyang@windriver.com> | 2013-01-09 10:15:58 +0800 |
commit | 4766a54dd801733b3b56f103609163e52ad0b115 (patch) | |
tree | 09b2d9365463aab0d9039150c0ce13294ff202f5 | |
parent | 8c0725155db1a7c14cb3ea1b281a21c3a92af88e (diff) | |
download | meta-selinux-4766a54dd801733b3b56f103609163e52ad0b115.tar.gz |
refpolicy: add user_tty_device_t into customizable_types
Add user_tty_device_t as a customizable_type, so that restorecon -R
/dev will not complain about it or modify the security labels.
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
-rw-r--r-- | recipes-security/refpolicy/files/customizable_types | 1 | ||||
-rw-r--r-- | recipes-security/refpolicy/refpolicy_common.inc | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/recipes-security/refpolicy/files/customizable_types b/recipes-security/refpolicy/files/customizable_types new file mode 100644 index 0000000..527d835 --- /dev/null +++ b/recipes-security/refpolicy/files/customizable_types | |||
@@ -0,0 +1 @@ | |||
user_tty_device_t | |||
diff --git a/recipes-security/refpolicy/refpolicy_common.inc b/recipes-security/refpolicy/refpolicy_common.inc index bbbbfc3..cb72b21 100644 --- a/recipes-security/refpolicy/refpolicy_common.inc +++ b/recipes-security/refpolicy/refpolicy_common.inc | |||
@@ -1,8 +1,14 @@ | |||
1 | PRINC = "1" | ||
2 | |||
1 | SECTION = "base" | 3 | SECTION = "base" |
2 | LICENSE = "GPLv2" | 4 | LICENSE = "GPLv2" |
3 | 5 | ||
4 | LIC_FILES_CHKSUM = "file://${S}/COPYING;md5=393a5ca445f6965873eca0259a17f833" | 6 | LIC_FILES_CHKSUM = "file://${S}/COPYING;md5=393a5ca445f6965873eca0259a17f833" |
5 | 7 | ||
8 | # Specific config files for Poky | ||
9 | SRC_URI += "file://customizable_types \ | ||
10 | " | ||
11 | |||
6 | S = "${WORKDIR}/refpolicy" | 12 | S = "${WORKDIR}/refpolicy" |
7 | 13 | ||
8 | FILES_${PN} = "${sysconfdir}/selinux/${POLICY_NAME}/ \ | 14 | FILES_${PN} = "${sysconfdir}/selinux/${POLICY_NAME}/ \ |
@@ -66,4 +72,7 @@ EOF | |||
66 | # Create policy store and build the policy | 72 | # Create policy store and build the policy |
67 | semodule -p ${D} -s ${POLICY_NAME} -n -B | 73 | semodule -p ${D} -s ${POLICY_NAME} -n -B |
68 | rm -f ${D}${sysconfdir}/selinux/semanage.conf | 74 | rm -f ${D}${sysconfdir}/selinux/semanage.conf |
75 | |||
76 | cat ${WORKDIR}/customizable_types >> \ | ||
77 | ${D}${sysconfdir}/selinux/${POLICY_NAME}/contexts/customizable_types | ||
69 | } | 78 | } |