summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXin Ouyang <Xin.Ouyang@windriver.com>2013-01-07 17:50:00 +0800
committerXin Ouyang <Xin.Ouyang@windriver.com>2013-01-09 10:15:58 +0800
commit4766a54dd801733b3b56f103609163e52ad0b115 (patch)
tree09b2d9365463aab0d9039150c0ce13294ff202f5
parent8c0725155db1a7c14cb3ea1b281a21c3a92af88e (diff)
downloadmeta-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_types1
-rw-r--r--recipes-security/refpolicy/refpolicy_common.inc9
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 @@
1PRINC = "1"
2
1SECTION = "base" 3SECTION = "base"
2LICENSE = "GPLv2" 4LICENSE = "GPLv2"
3 5
4LIC_FILES_CHKSUM = "file://${S}/COPYING;md5=393a5ca445f6965873eca0259a17f833" 6LIC_FILES_CHKSUM = "file://${S}/COPYING;md5=393a5ca445f6965873eca0259a17f833"
5 7
8# Specific config files for Poky
9SRC_URI += "file://customizable_types \
10 "
11
6S = "${WORKDIR}/refpolicy" 12S = "${WORKDIR}/refpolicy"
7 13
8FILES_${PN} = "${sysconfdir}/selinux/${POLICY_NAME}/ \ 14FILES_${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}