Commit Graph

911 Commits

Author SHA1 Message Date
Yi Zhao
a401f4b281 refpolicy: add file context for findfs alternative
Add file context for findfs alternative which is provided by util-linux.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2022-07-06 14:01:34 -04:00
Yi Zhao
4e17405f48 refpolicy: backport patches to fix policy issues for systemd 250
Backport the following patches to fix systemd-resolved and
systemd-netowrkd policy issues:
  systemd-systemd-resolved-is-linked-to-libselinux.patch
  sysnetwork-systemd-allow-DNS-resolution-over-io.syst.patch
  term-init-allow-systemd-to-watch-and-watch-reads-on-.patch
  systemd-add-file-transition-for-systemd-networkd-run.patch
  systemd-add-missing-file-context-for-run-systemd-net.patch
  systemd-add-file-contexts-for-systemd-network-genera.patch
  systemd-udev-allow-udev-to-read-systemd-networkd-run.patch

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2022-07-06 14:01:34 -04:00
Yi Zhao
9ddb77fb65 selinux-python: add RDEPENDES on python3-multiprocessing
Add RDEPENDS on python3-multiprocessing for selinux-python-sepolicy to
fix runtime error:

$ sepolicy
Traceback (most recent call last):
  File "/usr/bin/sepolicy", line 28, in <module>
    from multiprocessing import Pool
ModuleNotFoundError: No module named 'multiprocessing'

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2022-05-16 07:58:48 -04:00
Joe Slater
fe742953ed LICENSE: update to SPDX standard names
Use convert-spdx-licenses.py to update LICENSE names in recipes.

Signed-off-by: Joe Slater <joe.slater@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2022-04-19 15:47:57 -04:00
Ashish Sharma
ab4b57bba0 meta-selinux: Use SPDX style licensing format
WARNING: checkpolicy-3.3-r0 do_package_qa: QA Issue: Recipe LICENSE includes obsolete licenses GPLv2+ [obsolete-license] \
WARNING: setools-4.4.0-r0 do_package_qa: QA Issue: Recipe LICENSE includes obsolete licenses GPLv2 LGPLv2.1 [obsolete-license] \
WARNING: policycoreutils-3.3-r0 do_package_qa: QA Issue: Recipe LICENSE includes obsolete licenses GPLv2+ [obsolete-license] \
WARNING: refpolicy-standard-2.20210908+gitAUTOINC+23a8d103f3-r0.2 do_package_qa: QA Issue: Recipe LICENSE includes obsolete licenses GPLv2 [obsolete-license] \
WARNING: selinux-python-3.3-r0 do_package_qa: QA Issue: Recipe LICENSE includes obsolete licenses GPLv2+ [obsolete-license] \
WARNING: ecryptfs-utils-111-r0 do_package_qa: QA Issue: Recipe LICENSE includes obsolete licenses GPL-2.0 [obsolete-license] \
WARNING: nikto-2.1.6-r0 do_package_qa: QA Issue: Recipe LICENSE includes obsolete licenses GPLv2 [obsolete-license] \
WARNING: bastille-3.2.1-r0 do_package_qa: QA Issue: Recipe LICENSE includes obsolete licenses GPLv2 [obsolete-license] \
WARNING: suricata-6.0.4-r0 do_package_qa: QA Issue: Recipe LICENSE includes obsolete licenses GPLv2 [obsolete-license] \
WARNING: samhain-server-4.4.6-r0.7 do_package_qa: QA Issue: Recipe LICENSE includes obsolete licenses GPLv2 [obsolete-license] \
...

Signed-off-by: Ashish Sharma <asharma@mvista.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2022-04-19 15:35:08 -04:00
Jeremy Puhlman
a2e4d1459c Update compat to kirkstone
Signed-off-by: Jeremy A. Puhlman <jpuhlman@mvista.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2022-03-01 14:05:42 -05:00
Tim Orling
3fdd293127 prelink: drop bbappend
prelink has been dropped from oe-core [1], so the bbappend can no longer be
applied.

[1] https://git.openembedded.org/openembedded-core/commit/?id=23c0be78106f1d1e2bb9c724174a1bb8c56c2469

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2022-02-07 07:54:41 -05:00
Yi Zhao
d3902c8238 refpolicy: upgrade 20210203+git -> 20210908+git
* Update to latest git rev.
* Drop obsolete and useless patches.
* Rebase patches.
* Set POLICY_DISTRO from redhat to debian, which can reduce the amount
  of local patches.
* Set max kernel policy version from 31 to 33.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2022-01-18 16:49:58 -05:00
Yi Zhao
eb5b607d39 selinux: upgrade 3.2 -> 3.3
Drop backport CVE patches.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2021-12-08 16:08:35 -05:00
Yi Zhao
19089953e2 selinux: move selinux scripts to selinux-scripts
There are too many recipes in recipes-security/selinux. Keep the selinux
userspace recipes and move selinux scripts to selinux-scripts directory
to make the directory hierarchy clearer.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2021-12-08 16:08:34 -05:00
Yi Zhao
e16200c8eb selinux-python: add RDEPENDES on audit-python
Add RDEPENDS on audit-python for selinux-python-semanage.

Fixes:
$ semanage fcontext -a -t user_home_t "/web(/.*)?"
Traceback (most recent call last):
  File "/usr/sbin/semanage", line 975, in <module>
    do_parser()
  File "/usr/sbin/semanage", line 947, in do_parser
    args.func(args)
  File "/usr/sbin/semanage", line 329, in handleFcontext
    OBJECT.add(args.file_spec, args.type, args.ftype, args.range, args.seuser)
  File "/usr/lib/python3.9/site-packages/seobject.py", line 2485, in add
    self.__add(target, type, ftype, serange, seuser)
  File "/usr/lib/python3.9/site-packages/seobject.py", line 2481, in __add
    self.mylog.log_change("resrc=fcontext op=add %s ftype=%s tcontext=%s:%s:%s:%s"
      % (audit.audit_encode_nv_string("tglob", target, 0), ftype_to_audit[ftype],)
NameError: name 'audit' is not defined

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2021-12-08 16:08:34 -05:00
Joe MacDonald
b48fa45f56 selinux: inherit pkgconfig
Ensure the correct build options are passed during builds.

Signed-off-by: Joe MacDonald <joe@deserted.net>
2021-11-23 11:17:22 -05:00
Yi Zhao
aa46581a45 sysvinit: sync bbappend to 3.0
The sysvinit in oe-core has been upgraded to 3.0. Update the bbappend to
adapt it.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2021-11-22 12:23:16 -05:00
Yi Zhao
000d0719ad bind: remove volatile file
This file is not needed anymore as bind daemon will create them by
itself.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2021-11-22 12:23:16 -05:00
Yi Zhao
87d3c3dd74 recipes: update SRC_URI branch and protocols
Update SRC_URIs using git to include branch=master if no branch is set
and also to use protocol=https for github urls.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2021-11-22 12:23:16 -05:00
Mingli Yu
4d2bb085d2 coreutils/findutils/tar: remove pkgconfig from bbappend
When enable meta-gplv2 layer [1], there comes below error:
  ERROR: coreutils-6.9-r5 do_configure: QA Issue: coreutils: configure was passed unrecognised options: --without-selinux [unknown-configure-option]
  ERROR: coreutils-6.9-r5 do_configure: Fatal QA errors found, failing task.

It's because the old version of coreutils under meta-gplv2 layer
doesn't support the above configure option, so move the related
pkgconfig setting to the coreutils recipe under oe-core [2] which
supports the configure option to fix the gap.

And the findutils and tar also have the problem.

[1] http://git.yoctoproject.org/cgit/cgit.cgi/meta-gplv2/
[2] https://git.openembedded.org/openembedded-core/

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2021-09-29 22:29:59 -04:00
Yi Zhao
fbe470fa2e libsepol: Security fix for CVE-2021-36086
CVE-2021-36086:
The CIL compiler in SELinux 3.2 has a use-after-free in cil_reset_classpermission
(called from cil_reset_classperms_set and cil_reset_classperms_list).

Reference:
https://nvd.nist.gov/vuln/detail/CVE-2021-36086

Patch from:
c49a8ea095

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2021-09-29 22:29:59 -04:00
Armin Kuster
d42836c782 secilc: Security fix for CVE-2021-36087
Source: https://github.com/SELinuxProject/selinux
MR: 111869
Type: Security Fix
Disposition: Backport from bad0a746e9
ChangeID: b282a68f76e509f548fe6ce46349af56d09481c6
Description:

Affects: secilc <= 3.2

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2021-09-16 20:19:30 -04:00
Armin Kuster
54d3e98c17 libsepol: Security fix CVE-2021-36085
Source: https://github.com/SELinuxProject/selinux/
MR: 111857
Type: Security Fix
Disposition: Backport from 2d35fcc7e9
ChangeID: e50ae65189351ee618db2b278ba7105a5728e4c4
Description:

Affects: libsepol <= 3.2

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2021-09-16 20:19:30 -04:00
Armin Kuster
0957547857 libsepol: Security fix CVE-2021-36084
Source: https://github.com/SELinuxProject/selinux
MR: 111851
Type: Security Fix
Disposition: Backport from f34d3d30c8
ChangeID: 7fae27568e26ccbb18be3d2a1ce7332d42706f18
Description:

Affects: libsepol < 3.2

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2021-09-16 20:19:29 -04:00
Yi Zhao
a6595e22ab python3-networkx: drop bbappend
It is useless as setools-native build is disabled.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2021-08-29 21:34:22 -04:00
Yi Zhao
bb8c10de1f python3-decorator: drop bbappend
It is useless as setools-native build is disabled.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2021-08-29 21:34:22 -04:00
Yi Zhao
c6f6f7c6f0 setools: disable native/nativesdk build
Disable native/nativesdk build as they don't work for a long time.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2021-08-29 21:34:22 -04:00
Yi Zhao
1fda4b3a75 net-tools: fix selinux build
Simply adding EXTRA_OEMAKE doesn't work for selinux build. We need to
modify config files in do_configure.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2021-08-29 21:34:22 -04:00
Yi Zhao
4e07344695 sysklogd: sync the initscript to latest oe-core version
The sysklogd has been updated to 2.2.3 in oe-core. Update the initscript
to adapt it.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2021-08-29 21:34:22 -04:00
Yi Zhao
31325005e4 classes: drop redundant classes
There are some redundant classes: enable-selinux.bbclass,
with-selinux.bbclass, meson-enable-selinux.bbclass,
meson-selinux.bbclass, enable-audit.bbclass, with-audit.bbclass.
These classes only add PACKAGEOCNFIG[selinux]/[audit] to recipes. But
currently most recipes have added PACKAGECONFIG[selinux]/[audit] in
their bb files. We don't need these anymore. Only keep
enable-selinux.class and enable-audit.class to append
PACKAGECONFIG[selinux]/[audit] for recipes.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2021-08-29 21:34:22 -04:00
Yi Zhao
a101ac3dce python2: drop bbappend
This bbappend was added long time ago and it is useless now.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2021-08-29 21:34:22 -04:00
Yi Zhao
0c417aa70d lxc: drop bbappend
The PACKAGECONFIG[selinux] is enabled in lxc recipe.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2021-08-29 21:34:22 -04:00
Yi Zhao
0a83fab4d8 augeas: drop bbappend
The PACKAGECONFIG[selinux] is enabled in augeas recipe.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2021-08-29 21:34:22 -04:00
Yi Zhao
fe801fd2db logrotate: drop bbappend
The content of the bbappend is already contained in logrotate recipe.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2021-08-29 21:34:22 -04:00
Yi Zhao
57b730709e libpcre: drop bbappend
This bbappend was added long time ago and it is useless now.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2021-08-29 21:34:22 -04:00
Yi Zhao
cad53c28de libcgroup: drop bbappend
The content of the bbappend is already contained in libcgroup recipe.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2021-08-29 21:34:22 -04:00
Yi Zhao
654201e25d meta-selinux: convert to new override syntax
This is the result of automated script conversion:
poky/scripts/contrib/convert-overrides.py meta-selinux

Converting the metadata to use ":" as the override character instead of "_".

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2021-08-04 16:18:39 -04:00
Yi Zhao
d5b93baf57 layer.conf: set default refpolicy provider
Currently there is no default refpolicy provider and the user must
specify it in local.conf. Set the default refpolicy provider to
refpolicy-targeted in case the user doesn't set it.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2021-08-04 16:18:39 -04:00
Yi Zhao
967ac658f4 refpolicy: update file context for chfn/chsh
The util-linux has provided chfn and chsh since oe-core commit
804c6b5bd3d398d5ea2a45d6bcc23c76e328ea3f. Update the file context for
them.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2021-08-04 16:18:39 -04:00
Kai Kang
b7cf3fd557 layer.conf: set LAYERSERIES_COMPAT with honister
Set LAYERSERIES_COMPAT with honister in layer.conf which aligns with
oe-core.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2021-06-04 18:58:17 -04:00
Armin Kuster
29e586d1b4 audit: pkg now in meta-oe
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2021-05-14 09:26:05 -04:00
Armin Kuster
48038b45dc MAINTAINERS: update email address
Include example send-email

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2021-05-14 09:25:51 -04:00
Philip Tricca
2b8224580f MAINTAINERS: Remove myself.
I have been inactive for an extended period.

Signed-off-by: Philip Tricca <flihp@twobit.us>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2021-05-12 08:34:56 -04:00
Anibal Limon
5753d15225 conf/layer.conf: Add hardknott support
Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2021-03-27 00:40:37 -04:00
Yi Zhao
ac47a5e325 setools: upgrade 4.3.0 -> 4.4.0
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2021-03-17 09:39:50 -04:00
Yi Zhao
018714a521 semodule-utils: update to 3.2
Merge inc file into bb file.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2021-03-17 09:39:50 -04:00
Yi Zhao
f1cbb574f1 selinux-sandbox: update to 3.2
Merge inc file into bb file.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2021-03-17 09:39:50 -04:00
Yi Zhao
ab2fb5fea2 selinux-gui: update to 3.2
Merge inc file into bb file.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2021-03-17 09:39:50 -04:00
Yi Zhao
4944de23ac selinux-dbus: update to 3.2
Merge inc file into bb file.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2021-03-17 09:39:50 -04:00
Yi Zhao
d34981ff9c selinux-python: update to 3.2
Merge inc file into bb file.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2021-03-17 09:39:50 -04:00
Yi Zhao
42fc24c32b restorecond: update to 3.2
* Merge inc file into bb file.
* Drop obsolete patches:
  policycoreutils-make-O_CLOEXEC-optional.patch

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2021-03-17 09:39:50 -04:00
Yi Zhao
45e06de91f mcstrans: update to 3.2
Merge inc file into bb file.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2021-03-17 09:39:50 -04:00
Yi Zhao
74bbbc3277 policycoreutils: update to 3.2
Merge inc file into bb file.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2021-03-17 09:39:50 -04:00
Yi Zhao
39aa489098 secilc: update to 3.2
Merge inc file into bb file.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2021-03-17 09:39:50 -04:00