aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2021-03-17libselinux-python: Fix build error due to missing target configgatesgarthAnatol Belski
This fixes the error below: gcc: error: unrecognized command line option ‘-fmacro-prefix-map=/path/to/build/libselinux-python/3.0-r0=/usr/src/debug/libselinux-python/3.0-r0’ Without inheriting the config, supposedly a wrong compiler is used. Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com> Signed-off-by: Joe MacDonald <joe@deserted.net>
2020-11-09Final branch for gatesgarthJoe MacDonald
Signed-off-by: Joe MacDonald <joe@deserted.net>
2020-10-24conf/layer.conf: Bump to gatesgarthAnibal Limon
Signed-off-by: Aníbal Limón <anibal.limon@linaro.org> Signed-off-by: Joe MacDonald <joe@deserted.net>
2020-09-23refpolicy: update file context for ifconfigYi Zhao
The ifconfig was moved from sbin to bin with oe-core commit: c9caff40ff61c08e24a84922f8d7c8e9cdf8883e. Update the file context for it. Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Joe MacDonald <joe@deserted.net>
2020-09-23selinux-*.service: install to sysinit.targetYi Zhao
The selinux-init/autorelabel/labeldev services have a constraint of Before=sysinit.arget. So it is better to install them to sysinit.target rather than multi-user.target. Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Joe MacDonald <joe@deserted.net>
2020-09-23selinux-*.bb: fix typosYi Zhao
Fixes: ${PN}_RDEPENDS -> RDEPENDS_${PN} Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Joe MacDonald <joe@deserted.net>
2020-09-23net-tools: drop patchYi Zhao
The netstat-selinux-support.patch has been merged upstream. So drop it. Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Joe MacDonald <joe@deserted.net>
2020-09-18dhcp: remove bbappend fileChen Qi
dhcp has been removed, thus removing its bbappend file. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Joe MacDonald <joe@deserted.net>
2020-09-18audit: Backport gcc10 fix for common defaultAlex Kiernan
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Joe MacDonald <joe@deserted.net>
2020-09-18setools: Add native supportOleksii Miroshko
Enable using setools for analyzing the built SELinux policy during the build. Signed-off-by: Oleksii Miroshko <miroshko@gmail.com> Signed-off-by: Joe MacDonald <joe@deserted.net>
2020-07-14refpolicy: update to 20200229+gitYi Zhao
* Drop obsolete and unused patches. * Rebase patches. * Add patches to make systemd and sysvinit can work with all policy types. Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Joe MacDonald <joe@deserted.net>
2020-07-14sysklogd: set correct security context for /var/log in initscriptYi Zhao
We don't need to set security context for /dev/log after syslogd daemon startup because it is already set by udev. We just need to set the correct security context for symbolic link /var/log before syslogd startup. Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Joe MacDonald <joe@deserted.net>
2020-07-14audit: set correct security context for /var/log/auditYi Zhao
By default /var/log is a symbolic link of /var/volatile/log. But restorecon does not follow symbolic links then we will encounter the following error when set /var/log/audit directory: $ /sbin/restorecon -F /var/log/audit /sbin/restorecon: SELinux: Could not get canonical path for /var/log/audit restorecon: Permission denied. Use readlink to find the real path before set security context. Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Joe MacDonald <joe@deserted.net>
2020-07-14refpolicy: remove version 2.20190201Yi Zhao
There is no need to maintain two versions of repolicy. Drop this version and only keep the git version. Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Joe MacDonald <joe@deserted.net>
2020-07-13checkpolicy: remove unused te_assertionsMingli Yu
Backport a patch to remove unused te_assertions to fix the build failure on fedora 32. Fixes: | /build/tmp-glibc/hosttools/ld: policy_define.o:(.bss+0x28): multiple definition of `te_assertions'/build/tmp-glibc/hosttools/ld: policy_define.o:(.bss+0x28): multiple definition of `te_assertions'; y.tab.o:(.bss+0x18): first defined here | collect2: error: ld returned 1 exit status | make: *** [Makefile:33: checkpolicy] Error 1 Signed-off-by: Mingli Yu <mingli.yu@windriver.com> Signed-off-by: Joe MacDonald <joe@deserted.net>
2020-06-15libsepol: fix build errors on Fedora 32Yi Zhao
Backport 2 patches to fix the build errors on Fedora 32. Fixes: [snip] ../cil/src/cil_verify.lo:(.bss+0x4f0): multiple definition of `CIL_KEY_CONS_T3'; ../cil/src/cil_verify.lo:(.bss+0x4f8): multiple definition of `CIL_KEY_CONS_T2'; ../cil/src/cil_verify.lo:(.bss+0x500): multiple definition of `CIL_KEY_CONS_T1'; ../cil/src/cil_verify.lo:(.bss+0x508): multiple definition of `cil_mem_error_handler'; [snip] Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Joe MacDonald <joe@deserted.net>
2020-04-30libselinux-python: Fix one invalid linkChangqing Li
when host arch and target arch are different, the extension suffix of host is different with target one, so there will be a invalid link. Fix by update the way to create the link. Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Joe MacDonald <joe@deserted.net>
2020-04-15semodule-utils: upgrade to 3.0 (20191204)Yi Zhao
Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2020-04-15selinux-gui: upgrade to 3.0 (20191204)Yi Zhao
Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2020-04-15selinux-sandbox: upgrade to 3.0 (20191204)Yi Zhao
Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2020-04-15selinux-dbus: upgrade to 3.0 (20191204)Yi Zhao
Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2020-04-15selinux-python: upgrade to 3.0 (20191204)Yi Zhao
Refresh fix-sepolicy-install-path.patch. Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2020-04-15restorecond: upgrade to 3.0 (20191204)Yi Zhao
Fix typo in patch. Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2020-04-15mcstrans: upgrade to 3.0 (20191204)Yi Zhao
Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2020-04-15policycoreutils: upgrade to 3.0 (20191204)Yi Zhao
Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2020-04-15secilc: upgrade to 3.0 (20191204)Yi Zhao
License-Update: fix misspellings Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2020-04-15checkpolicy: upgrade to 3.0 (20191204)Yi Zhao
Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2020-04-15libsemanage: upgrade to 3.0 (20191204)Yi Zhao
* Refresh libsemanage-allow-to-disable-audit-support.patch * Fix typos in patches. Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2020-04-15libselinux-python: upgrade to 3.0 (20191204)Yi Zhao
* Inherit python3native as the libselinux uses python distutils to install selinux python bindings now. * Add a patch to fix python modules install path for multilib. Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2020-04-15libselinux: upgrade to 3.0 (20191204)Yi Zhao
* Backport a patch to fix build failure with musl. * Fix typos in patches. Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2020-04-15libsepol: upgrade to 3.0 (20191204)Yi Zhao
Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2020-04-15selinux: upgrade inc files to 3.0 (20191204)Yi Zhao
Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2020-04-15setools: upgrade 4.2.2 -> 4.3.0Yi Zhao
Remove __pycache__ directories when do_install. Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2020-04-07bind: install volatiles file with correct nameYi Zhao
Install volatiles file as 04_bind rather than volatiles.04_bind. Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2020-04-07eudev: remove udev-cache and sync the initscript to latest oe-core versionYi Zhao
The udev-cache has been remove in oe-core commit 048f4149b8438c521e8b65a3c96d850a9b4a3e5b. So we can also remove it. Also sync the initscript to latest oe-core version. Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2020-04-07sysklogd: sync the initscript to latest oe-core versionYi Zhao
The sysklogd has been updated to 2.1.1 in oe-core and the klogd was removed from this version since syslogd performs logging of kernel messages. So we update the initscript to adapt it. Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2020-04-03clean up getVar() usageJoe MacDonald
83eac4de updated the usage of getVar() in classes/selinux.bbclass to leave out the default expand parameter. This is consistent with the usage in the core layers. Bring all other calls to getVar() in the layer into alignment with this approach. Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2020-04-03layer.conf: update LAYERSERIES_COMPAT for dunfellYi Zhao
Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2020-04-03selinux.bbclass: remove True option in getVar()Yi Zhao
The getVar() defaults to expanding by default, thus remove the True option from all getVar() calls. Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2020-02-26linux-yocto: drop 4.x bbappendYi Zhao
The linux-yocto 4.x recipes have been dropped in oe-core. We can remove the bbappend. Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2020-02-19audit: add clock_settime64 syscallMingli Yu
On 32bit system, After upgrade glibc to 2.31 # strace -o /tmp/test.log date -s 09:16:45 # tail -f /tmp/test.log close(3) = 0 stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=114, ...}) = 0 clock_settime64(CLOCK_REALTIME, {tv_sec=1582103805, tv_nsec=0}) = 0 fstat64(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(0x4, 0x40), ...}) = 0 ioctl(1, TCGETS, {B115200 opost isig icanon echo ...}) = 0 write(1, "Wed Feb 19 09:16:45 UTC 2020\n", 29) = 29 close(1) = 0 close(2) = 0 exit_group(0) = ? +++ exited with 0 +++ It means the clock_settime64 syscall is used, so add the syscall. Signed-off-by: Mingli Yu <mingli.yu@windriver.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2020-01-30findutils: make append genericJeremy Puhlman
Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2020-01-30python: move appends to a dynamic-layerJeremy Puhlman
Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2019-12-30audit: fix host contamination for swigYi Zhao
The audit build uses swig to generate a python wrapper. But there is a hardcoded include directory in auditswig.i, which causes header files on the host to be used when building. This will cause build error on some old systems. e.g. on CentOS7 with buildtools: audit_wrap.c: In function '_wrap_audit_rule_flags_set': audit_wrap.c:5018:19: error: dereferencing pointer to incomplete type 'struct audit_rule' 5018 if (arg1) (arg1)->flags = arg2; ^~ Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2019-12-30selinux-initsh.inc: install selinux-init.sh and selinux-labeldev.sh when ↵Yi Zhao
using systemd The commit 5fd3c5b71edb99659aeb5cb5903088d84517382e introduced an issue that selinux-init.sh and selinux-labeldev.sh are not installed when using systemd which will cause the selinux-ini.service and selinux-labeldev.service fail to startup. Move the do_install codes from selinux-autorelabel to selinux-initsh.inc to make sure install these scripts when using systemd. Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2019-12-24MAINTAINERS: update maintainerYi Zhao
Add Yi Zhao as the maintainer. Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2019-12-24refpolicy: switch to python3Yi Zhao
* Switch to python3 * Update policy-version to 31 to match selinux 2.9 Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2019-12-24refpolicy: add UPSTREAM_CHECK_GITTAGREGEXYi Zhao
Add UPSTREAM_CHECK_GITTAGREGEX to make devtool check-upgrade-status works. Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2019-12-24libsemanage: fix race issue in parallel buildYi Zhao
The install-pywarp target doesn't depend on swigify target because the semanage.py is not generated by swigify target but pywrap target. Here is the dependency chain: install-pywrap -> pywrap -> $(SWIGSO) -> $(SWIGLOBJ) -> $(SWIGCOUT) -> semanage.py But in the recipe, the swigify target is added explicitly in do_install: do_install_append() { oe_runmake install-pywrap swigify \ [snip] } This target will regenerate the semanage.py when do_install. So there will be a potential race issue in parallel build. The install-pywrap target is trying to install semanage.py when swigify target is generating the file. Then an empty semanage.py will be installed. Remove the target swigify to fix this issue. Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2019-12-24libselinux-python: fix race issue in parallel buildYi Zhao
The install-pywarp target doesn't depend on swigify target because the selinux.py is not generated by swigify target but pywrap target. Here is the dependency chain: install-pywrap -> pywrap -> $(SWIGFILES) -> $(SWIGPYOUT) -> $(SWIGCOUT) -> selinux.py But in the recipe, the swigify target is added explicitly in do_install: do_install_append() { oe_runmake install-pywrap swigify \ [snip] } This target will regenerate the selinux.py when do_install. So there will be a potential race issue in parallel build. The install-pywrap target is trying to install selinux.py when swigify target is generating the file. Then an empty selinux.py will be installed. Remove the target swigify to fix this issue. Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>