summaryrefslogtreecommitdiffstats
path: root/recipes-security/selinux/policycoreutils.inc
diff options
context:
space:
mode:
authorWenzong Fan <wenzong.fan@windriver.com>2017-09-04 22:59:46 -0700
committerMark Hatle <mark.hatle@windriver.com>2017-09-13 19:48:51 -0500
commitd8d6ac6a5de6cc37e61ed48ea3a91c138bc4d213 (patch)
tree3c6bcc776b80577b20288a49fc177911c4f0c2a9 /recipes-security/selinux/policycoreutils.inc
parent9b70823774000acf803f0400b3cc7216e6116c99 (diff)
downloadmeta-selinux-d8d6ac6a5de6cc37e61ed48ea3a91c138bc4d213.tar.gz
mcstrans: add package 2.7 (20170804)
Move policycoreutils/mcstrans to mcstrans: * Move and rebase patches: - mcstrans-de-bashify.patch - 0001-mcstrans-fix-the-init-script.patch * Remove useless patch: - enable-mcstrans.patch * Cleanup policycoreutils_2.7.bb and policycoreutils.inc. Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> Update policycoreutils_git.bb Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Diffstat (limited to 'recipes-security/selinux/policycoreutils.inc')
-rw-r--r--recipes-security/selinux/policycoreutils.inc76
1 files changed, 1 insertions, 75 deletions
diff --git a/recipes-security/selinux/policycoreutils.inc b/recipes-security/selinux/policycoreutils.inc
index fe01004..e8f6e5f 100644
--- a/recipes-security/selinux/policycoreutils.inc
+++ b/recipes-security/selinux/policycoreutils.inc
@@ -10,7 +10,6 @@ LICENSE = "GPLv2+"
10SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ 10SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
11 file://policycoreutils-fixfiles-de-bashify.patch \ 11 file://policycoreutils-fixfiles-de-bashify.patch \
12 file://policycoreutils-sandbox-de-bashify.patch \ 12 file://policycoreutils-sandbox-de-bashify.patch \
13 file://mcstrans-de-bashify.patch \
14 " 13 "
15 14
16PAM_SRC_URI = "file://pam.d/newrole \ 15PAM_SRC_URI = "file://pam.d/newrole \
@@ -21,9 +20,7 @@ DEPENDS += "libsepol libselinux libsemanage libcap gettext-native"
21EXTRA_DEPENDS = "libcap-ng libcgroup setools" 20EXTRA_DEPENDS = "libcap-ng libcgroup setools"
22DEPENDS += "${@['', '${EXTRA_DEPENDS}']['${PN}' != '${BPN}-native']}" 21DEPENDS += "${@['', '${EXTRA_DEPENDS}']['${PN}' != '${BPN}-native']}"
23 22
24inherit selinux systemd pythonnative update-rc.d 23inherit selinux pythonnative
25
26PROVIDES += "mcstrans"
27 24
28DEPENDS += "${@target_selinux(d, 'libpam audit')}" 25DEPENDS += "${@target_selinux(d, 'libpam audit')}"
29 26
@@ -144,31 +141,8 @@ PACKAGES =+ "\
144 ${PN}-sestatus \ 141 ${PN}-sestatus \
145 ${PN}-setfiles \ 142 ${PN}-setfiles \
146 ${PN}-setsebool \ 143 ${PN}-setsebool \
147 mcstrans \
148 mcstrans-doc \
149 system-config-selinux \ 144 system-config-selinux \
150" 145"
151PKGV_mcstrans = "0.3.2"
152PKGV_mcstrans-doc = "0.3.2"
153SUMMARY_mcstrans = "Daemon to translate SELinux MCS/MLS sensitivity labels"
154DESCRIPTION_mcstrans = "\
155 Security-enhanced Linux is a feature of the Linux kernel and a number \
156 of utilities with enhanced security functionality designed to add \
157 mandatory access controls to Linux. The Security-enhanced Linux \
158 kernel contains new architectural components originally developed to \
159 improve the security of the Flask operating system. These \
160 architectural components provide general support for the enforcement \
161 of many kinds of mandatory access control policies, including those \
162 based on the concepts of Type EnforcementĀ®, Role-based Access \
163 Control, and Multi-level Security. \
164 \
165 mcstrans provides an translation daemon to translate SELinux categories \
166 from internal representations to user defined representation. \
167 "
168SUMMARY_mcstrans-doc = "${SUMMARY_mcstrans} man pages and examples"
169DESCRIPTION_mcstrans-doc = "${DESCRIPTION_mcstrans} \
170 This package contains man pages and examples. \
171 "
172FILES_${PN}-audit2allow = "\ 146FILES_${PN}-audit2allow = "\
173 ${bindir}/audit2allow \ 147 ${bindir}/audit2allow \
174 ${bindir}/audit2why \ 148 ${bindir}/audit2why \
@@ -240,22 +214,6 @@ FILES_${PN}-setsebool += "\
240 ${sbindir}/setsebool \ 214 ${sbindir}/setsebool \
241 ${datadir}/bash-completion/completions/setsebool \ 215 ${datadir}/bash-completion/completions/setsebool \
242" 216"
243FILES_mcstrans = "\
244 ${base_sbindir}/mcstransd \
245 ${sbindir}/untranscon \
246 ${sbindir}/transcon \
247 ${sysconfdir}/init.d/mcstrans \
248 ${systemd_unitdir}/system/mcstrans.service \
249 ${sysconfdir}/default/volatiles/volatiles.80_mcstrans \
250 ${sysconfdir}/tmpfiles.d/setrans.conf \
251"
252
253FILES_mcstrans-doc = "\
254 /usr/share/man/man8/mcstransd.8 \
255 /usr/share/man/man8/mcs.8 \
256 /usr/share/man/man8/setrans.conf.8 \
257 ${datadir}/mcstrans \
258"
259 217
260FILES_system-config-selinux = " \ 218FILES_system-config-selinux = " \
261 ${bindir}/sepolgen \ 219 ${bindir}/sepolgen \
@@ -304,23 +262,6 @@ do_install_prepend() {
304 export SEMODULE_PATH=${sbindir} SYSTEMDDIR=${D}/${systemd_unitdir} 262 export SEMODULE_PATH=${sbindir} SYSTEMDDIR=${D}/${systemd_unitdir}
305} 263}
306 264
307do_install_append_class-target() {
308 install -m 755 mcstrans/utils/untranscon ${D}${sbindir}/
309 install -m 755 mcstrans/utils/transcon ${D}${sbindir}/
310
311 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
312 install -d ${D}${sysconfdir}/tmpfiles.d
313 echo "d ${localstatedir}/run/setrans - - - -" \
314 > ${D}${sysconfdir}/tmpfiles.d/setrans.conf
315 else
316 install -d ${D}${sysconfdir}/default/volatiles
317 echo "d root root 0755 /var/run/setrans none" \
318 >${D}${sysconfdir}/default/volatiles/volatiles.80_mcstrans
319 fi
320 install -d ${D}${datadir}/mcstrans
321 cp -r mcstrans/share/* ${D}${datadir}/mcstrans/.
322}
323
324do_install_virtclass-native() { 265do_install_virtclass-native() {
325 for PCU_CMD in ${PCU_NATIVE_CMDS} ; do 266 for PCU_CMD in ${PCU_NATIVE_CMDS} ; do
326 oe_runmake -C $PCU_CMD install \ 267 oe_runmake -C $PCU_CMD install \
@@ -342,18 +283,3 @@ do_install_append_class-target() {
342 # $ semanage permissive [OPTS] 283 # $ semanage permissive [OPTS]
343 install -d ${D}${localstatedir}/lib/selinux 284 install -d ${D}${localstatedir}/lib/selinux
344} 285}
345
346SYSTEMD_SERVICE_mcstrans = "mcstrans.service"
347INITSCRIPT_PACKAGES = "mcstrans"
348INITSCRIPT_NAME_mcstrans = "mcstrans"
349INITSCRIPT_PARAMS_mcstrans = "defaults"
350
351pkg_postinst_mcstrans () {
352 if [ -z "$D" ]; then
353 if command -v systemd-tmpfiles >/dev/null; then
354 systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/setrans.conf
355 elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
356 ${sysconfdir}/init.d/populate-volatile.sh update
357 fi
358 fi
359}