diff options
author | Wenzong Fan <wenzong.fan@windriver.com> | 2017-09-04 22:59:46 -0700 |
---|---|---|
committer | Mark Hatle <mark.hatle@windriver.com> | 2017-09-13 19:48:51 -0500 |
commit | d8d6ac6a5de6cc37e61ed48ea3a91c138bc4d213 (patch) | |
tree | 3c6bcc776b80577b20288a49fc177911c4f0c2a9 /recipes-security/selinux/policycoreutils.inc | |
parent | 9b70823774000acf803f0400b3cc7216e6116c99 (diff) | |
download | meta-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.inc | 76 |
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+" | |||
10 | SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ | 10 | SRC_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 | ||
16 | PAM_SRC_URI = "file://pam.d/newrole \ | 15 | PAM_SRC_URI = "file://pam.d/newrole \ |
@@ -21,9 +20,7 @@ DEPENDS += "libsepol libselinux libsemanage libcap gettext-native" | |||
21 | EXTRA_DEPENDS = "libcap-ng libcgroup setools" | 20 | EXTRA_DEPENDS = "libcap-ng libcgroup setools" |
22 | DEPENDS += "${@['', '${EXTRA_DEPENDS}']['${PN}' != '${BPN}-native']}" | 21 | DEPENDS += "${@['', '${EXTRA_DEPENDS}']['${PN}' != '${BPN}-native']}" |
23 | 22 | ||
24 | inherit selinux systemd pythonnative update-rc.d | 23 | inherit selinux pythonnative |
25 | |||
26 | PROVIDES += "mcstrans" | ||
27 | 24 | ||
28 | DEPENDS += "${@target_selinux(d, 'libpam audit')}" | 25 | DEPENDS += "${@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 | " |
151 | PKGV_mcstrans = "0.3.2" | ||
152 | PKGV_mcstrans-doc = "0.3.2" | ||
153 | SUMMARY_mcstrans = "Daemon to translate SELinux MCS/MLS sensitivity labels" | ||
154 | DESCRIPTION_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 | " | ||
168 | SUMMARY_mcstrans-doc = "${SUMMARY_mcstrans} man pages and examples" | ||
169 | DESCRIPTION_mcstrans-doc = "${DESCRIPTION_mcstrans} \ | ||
170 | This package contains man pages and examples. \ | ||
171 | " | ||
172 | FILES_${PN}-audit2allow = "\ | 146 | FILES_${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 | " |
243 | FILES_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 | |||
253 | FILES_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 | ||
260 | FILES_system-config-selinux = " \ | 218 | FILES_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 | ||
307 | do_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 | |||
324 | do_install_virtclass-native() { | 265 | do_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 | |||
346 | SYSTEMD_SERVICE_mcstrans = "mcstrans.service" | ||
347 | INITSCRIPT_PACKAGES = "mcstrans" | ||
348 | INITSCRIPT_NAME_mcstrans = "mcstrans" | ||
349 | INITSCRIPT_PARAMS_mcstrans = "defaults" | ||
350 | |||
351 | pkg_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 | } | ||