diff options
author | Xin Ouyang <Xin.Ouyang@windriver.com> | 2013-01-07 17:25:34 +0800 |
---|---|---|
committer | Xin Ouyang <Xin.Ouyang@windriver.com> | 2013-01-09 10:15:56 +0800 |
commit | 8c0725155db1a7c14cb3ea1b281a21c3a92af88e (patch) | |
tree | 846635932e6d118f11be67f2a9708f569a762b3f | |
parent | c6c13c4aa20cf0fce21895d39e98b2b271f2706c (diff) | |
download | meta-selinux-8c0725155db1a7c14cb3ea1b281a21c3a92af88e.tar.gz |
refpolicy: change hard-coded paches
- /etc -> ${sysconfdir}
- /usr/share -> ${datadir}
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
-rw-r--r-- | recipes-security/refpolicy/refpolicy_common.inc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/recipes-security/refpolicy/refpolicy_common.inc b/recipes-security/refpolicy/refpolicy_common.inc index 9c3d050..bbbbfc3 100644 --- a/recipes-security/refpolicy/refpolicy_common.inc +++ b/recipes-security/refpolicy/refpolicy_common.inc | |||
@@ -44,26 +44,26 @@ do_install() { | |||
44 | DESTDIR=${D} | 44 | DESTDIR=${D} |
45 | 45 | ||
46 | # Prepare to create policy store | 46 | # Prepare to create policy store |
47 | mkdir -p ${D}/etc/selinux/ | 47 | mkdir -p ${D}${sysconfdir}/selinux/ |
48 | cat <<-EOF > ${D}/etc/selinux/semanage.conf | 48 | cat <<-EOF > ${D}${sysconfdir}/selinux/semanage.conf |
49 | module-store = direct | 49 | module-store = direct |
50 | [setfiles] | 50 | [setfiles] |
51 | path = ${STAGING_DIR_NATIVE}${base_sbindir_native}/setfiles | 51 | path = ${STAGING_DIR_NATIVE}${base_sbindir_native}/setfiles |
52 | args = -q -c \$@ \$< | 52 | args = -q -c \$@ \$< |
53 | [end] | 53 | [end] |
54 | EOF | 54 | EOF |
55 | mkdir -p ${D}/etc/selinux/${POLICY_NAME}/policy | 55 | mkdir -p ${D}${sysconfdir}/selinux/${POLICY_NAME}/policy |
56 | mkdir -p ${D}/etc/selinux/${POLICY_NAME}/modules/active/modules | 56 | mkdir -p ${D}${sysconfdir}/selinux/${POLICY_NAME}/modules/active/modules |
57 | mkdir -p ${D}/etc/selinux/${POLICY_NAME}/contexts/files | 57 | mkdir -p ${D}${sysconfdir}/selinux/${POLICY_NAME}/contexts/files |
58 | bzip2 -c ${D}/usr/share/selinux/${POLICY_NAME}/base.pp > \ | 58 | bzip2 -c ${D}${datadir}/selinux/${POLICY_NAME}/base.pp > \ |
59 | ${D}/etc/selinux/${POLICY_NAME}/modules/active/base.pp | 59 | ${D}${sysconfdir}/selinux/${POLICY_NAME}/modules/active/base.pp |
60 | for i in ${D}/usr/share/selinux/${POLICY_NAME}/*.pp; do | 60 | for i in ${D}${datadir}/selinux/${POLICY_NAME}/*.pp; do |
61 | if [ "`basename $i`" != "base.pp" ]; then | 61 | if [ "`basename $i`" != "base.pp" ]; then |
62 | bzip2 -c $i > ${D}/etc/selinux/${POLICY_NAME}/modules/active/modules/`basename $i`; | 62 | bzip2 -c $i > ${D}${sysconfdir}/selinux/${POLICY_NAME}/modules/active/modules/`basename $i`; |
63 | fi | 63 | fi |
64 | done | 64 | done |
65 | 65 | ||
66 | # Create policy store and build the policy | 66 | # Create policy store and build the policy |
67 | semodule -p ${D} -s ${POLICY_NAME} -n -B | 67 | semodule -p ${D} -s ${POLICY_NAME} -n -B |
68 | rm -f ${D}/etc/selinux/semanage.conf | 68 | rm -f ${D}${sysconfdir}/selinux/semanage.conf |
69 | } | 69 | } |