Commit Graph

668 Commits

Author SHA1 Message Date
Joe MacDonald
c9169cef60 python-ipy: update SRC_URI to use https
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2020-01-06 09:03:24 -05:00
Mark Hatle
d855c624f3 setools: Fix build failures on 64-bit machines
Bring in a patch from https://github.com/vorlonofportland/setools,
commit id 790d7a538f515d27d2390f1ef56c9871b107a346.

Fixes an issue where setools fails with:

    error: '%04zd' directive output may be truncated writing between 4 and 10 bytes into a region of size 5 [-Werror=format-truncation=]
    snprintf(buff, 9, "@ttr%04zd", i + 1);

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2017-09-15 16:12:49 -05:00
Mark Hatle
907e373e40 policycoreutils: Update fixfile
The functional call may not always work as specified, be sure to include the
() to make sure the shell knows this is a function.

Also add both findutils and grep as necessary for fixfiles to run properly
in a minimal environment.  Busybox is not adequate at this time.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2017-09-14 16:12:25 -05:00
Mark Hatle
bca5c61150 refpolicy: Add '/bin/bash.bash', an update-alternative to the policy
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2017-09-14 16:12:25 -05:00
Mark Hatle
dddf26565e packagegroups: Fix LIC_FILES_CHKSUM
Resolve warning:

${COREBASE}/LICENSE is not a valid license file, please use '${COMMON_LICENSE_DIR}/MIT' for a MIT License file in LIC_FILES_CHKSUM.

Also remove the obsolete PR number.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2017-09-14 16:12:25 -05:00
Mark Hatle
6733785db6 README: Add information about running the system
We want to give the users some basic information to be able to run the
compiled system with SE Linux enabled, but not in enforcing mode.  This will
allow a knowledgable user to update the reference policy for their
configuration.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2017-09-14 16:12:25 -05:00
Mark Hatle
4fefe83c32 Refactor to conform to YP Compat requirements
Change the references to check for the distribution flag of 'selinux' being
set before taking any action within the bbappends.  This prevents the
signature from being modified.

Also remove PR changes, as they are no longer allowed.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2017-09-14 08:29:01 -05:00
Mark Hatle
694b8d1f1a README: Update and remove references to distros, replace w/ DISTRO_FEATURES
Remove distros, instead of specifying an oe or poky example distribution,
we are moving to enabling the components using DISTRO_FEATURES.  This will
make it easier for a user to enable selinux on a custom distribution, or on
a project specific basis.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2017-09-14 08:29:01 -05:00
Mark Hatle
8bd72dfb5a refpolicy-git: Update to lastest git version
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2017-09-14 08:29:01 -05:00
Wenzong Fan
2c7c0e957f selinux-python: add setools to RDEPENDS
Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2017-09-14 08:29:01 -05:00
Wenzong Fan
96b54b481b packagegroup-*: sync package names
Some new packages added after SELinux uprev to 2.7, sync the package
names accordingly:

  policycoreutils-audit2allow      -> selinux-python-audit2allow
  policycoreutils-chcat            -> selinux-python-chcat
  policycoreutils-python           -> selinux-python
  policycoreutils-semanage         -> selinux-python-semanage
  policycoreutils-sandbox          -> selinux-sandbox
  policycoreutils-sepolgen-ifgen   -> selinux-python-sepolgen-ifgen
  policycoreutils-sepolicy         -> selinux-python-sepolicy,
                                      selinux-dbus
  policycoreutils-semodule-deps    -> semodule-utils-semodule-deps
  policycoreutils-semodule-expand  -> semodule-utils-semodule-expand
  policycoreutils-semodule-link    -> semodule-utils-semodule-link
  policycoreutils-semodule-package -> semodule-utils-semodule-package
  system-config-selinux            -> selinux-gui
  sepolgen                         -> selinux-python-sepolgen

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2017-09-14 08:29:01 -05:00
Wenzong Fan
fdf76122b6 setools: uprev to 4.1.1
SETools v4 is a rewrite of SETools in Python, details refer to:
https://github.com/TresysTechnology/setools/wiki/Changes-Since-SETools-v3

Changes for upreving:
* removed setools_3.3.8.bb and all useless patch
* add patches to fix cross-compiling issues:
  - setools4-fixes-for-cross-compiling.patch
  - setools4-fix-cross-compiling-errors-for-powerpc-mips.patch

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>

Per discussion w/ Wenzong, added meta-python as a dependency and enabled
the RDEPENDS within the new setools_4.1.1.bb

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2017-09-14 08:28:09 -05:00
Wenzong Fan
fe8bc0740b refpolicy_common: depends on semodule-utils-native
Those tools have been moved from policycoreutils to semodule-utils:
  semodule_deps, semodule_expand, semodule_link, semodule_package

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2017-09-13 19:48:51 -05:00
Wenzong Fan
493b567483 policycoreutils: fixes for 2.7 uprev
Remove setools from DEPENDS/RDEPENDS, it was required by sepolicy,
sepolgen, semanage which have been moved to python/*.

Rebase patch:
  - policycoreutils-fixfiles-de-bashify.patch

Drop useless patch:
  - policycoreutils-loadpolicy-symlink.patch

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>

Update policycoreutils_git.bb

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2017-09-13 19:48:51 -05:00
Wenzong Fan
a1f9832b79 selinux-gui: add package 2.7 (20170804)
Move policycoreutils/gui to gui and cleanup policycoreutils.inc.

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2017-09-13 19:48:51 -05:00
Wenzong Fan
28b961cbbd selinux-dbus: add package 2.7 (20170804)
Move policycoreutils/sepolicy/dbus to dbus.

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2017-09-13 19:48:51 -05:00
Wenzong Fan
17cda5af69 semodule-utils: add package 2.7 (20170804)
Move policycoreutils/semodule_* to semodule-utils/*:
  - policycoreutils/semodule_deps    -> semodule-utils/semodule_deps
  - policycoreutils/semodule_expand  -> semodule-utils/semodule_expand
  - policycoreutils/semodule_link    -> semodule-utils/semodule_link
  - policycoreutils/semodule_package -> semodule-utils/semodule_package

* Cleanup policycoreutils.inc

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2017-09-13 19:48:51 -05:00
Wenzong Fan
1d3df562b7 selinux-python: add package 2.7 (20170804)
Move packages to python/*:
  - policycoreutils/semanage       -> python/semanage
  - policycoreutils/audit2allow    -> python/audit2allow
  - policycoreutils/sepolgen-ifgen -> python/audit2allow/sepolgen-ifgen
  - policycoreutils/sepolicy       -> python/sepolicy
  - policycoreutils/scripts/chcat  -> python/chcat
  - sepolgen -> python/sepolgen

* Move and rebase patches:
  - policycoreutils-fix-TypeError-for-seobject.py.patch
  - policycoreutils-fix-sepolicy-install-path.patch
  - policycoreutils-process-ValueError-for-sepolicy-seobject.patch

* Cleanup policycoreutils.inc and policycoreutils_2.7.bb

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>

Update policycoreutils_git.bb

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2017-09-13 19:48:51 -05:00
Wenzong Fan
a5b5f5b328 selinux-sandbox: add package 2.7 (20170804)
Move policycoreutils/sandbox to sandbox:

* Move and rebase patch:
  - policycoreutils-sandbox-de-bashify.patch

* Cleanup policycoreutils.inc

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2017-09-13 19:48:51 -05:00
Wenzong Fan
9a07ac8424 restorecond: add package 2.7 (20170804)
Move policycoreutils/restorecond to restorecond:

* Move and rebase patch:
  - policycoreutils-make-O_CLOEXEC-optional.patch

* Cleanup policycoreutils_2.7.bb.

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>

Update policycoreutils_git.bb

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2017-09-13 19:48:51 -05:00
Wenzong Fan
d8d6ac6a5d 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>
2017-09-13 19:48:51 -05:00
Wenzong Fan
9b70823774 sepolgen: remove package
The package has been moved to selinux-python/sepolgen.

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2017-09-13 19:48:50 -05:00
Wenzong Fan
c9186be1b8 policycoreutils: uprev to 2.7 (20170804)
Uprev the recipe file as is.

Some packages have been moved out from policycoreutils, they will be
added as new packages and the policycoreutils.inc need to be cleaned
up from later commits accordingly.

Moved packages:
    From:                            To:
  - policycoreutils/gui              gui
  - policycoreutils/mcstrans         mcstrans
  - policycoreutils/restorecond      restorecond
  - policycoreutils/sandbox          sandbox
  - policycoreutils/sepolicy/dbus    dbus
  - policycoreutils/semodule_deps    semodule-utils/semodule_deps
  - policycoreutils/semodule_expand  semodule-utils/semodule_expand
  - policycoreutils/semodule_link    semodule-utils/semodule_link
  - policycoreutils/semodule_package semodule-utils/semodule_package
  - policycoreutils/semanage         python/semanage
  - policycoreutils/audit2allow      python/audit2allow
  - policycoreutils/sepolgen-ifgen   python/audit2allow/sepolgen-ifgen
  - policycoreutils/sepolicy         python/sepolicy
  - policycoreutils/scripts/chcat    python/chcat

Released package list refer to:
  https://github.com/SELinuxProject/selinux/wiki/Releases

Cleanup the patch file that have been removed in 2.6:
  - policycoreutils-fts_flags-FTS_NOCHDIR.patch

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>

Update policycoreutils_git.bb

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2017-09-13 19:48:50 -05:00
Wenzong Fan
f838032d00 secilc: uprev to 2.7 (20170804)
Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2017-09-13 19:48:50 -05:00
Wenzong Fan
43adb0c69a checkpolicy: uprev to 2.7 (20170804)
Remove patch that included by new version:
  - checkpolicy-Do-not-link-against-libfl.patch

Specify LIBSEPOLA to fix build error:
  make[1]: *** No rule to make target `/usr/lib/libsepol.a'

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>

Update checkpolicy_git.bb

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2017-09-13 19:48:39 -05:00
Wenzong Fan
b00974f7b4 libsemanage: uprev to 2.7 (20170804)
Remove patches that included by new version:
  - 0001-libsemanage-simplify-string-utilities-functions.patch
  - 0002-libsemanage-add-semanage_str_replace-utility-functio.patch
  - 0003-libsemanage-genhomedircon-drop-ustr-dependency.patch
  - 0004-libsemanage-remove-ustr-library-from-Makefiles-READM.patch
  - libsemanage-fix-path-len-limit.patch

Rebase patch:
  - libsemanage-allow-to-disable-audit-support.patch

Set PYCEXT and PYSITEDIR to generate the _semanage.so and install it
to ${libdir}/python${PYTHON_BASEVERSION}/site-packages.

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>

Update libsemanage_git to match.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2017-09-13 19:48:38 -05:00
Wenzong Fan
375dfa6201 libselinux: uprev to 2.7 (20170804)
Specify LIBSEPOLA to fix build error:
  make[1]: *** No rule to make target `/usr/lib/libsepol.a',
  needed by `python-2.7audit2why.so'.  Stop.

Add python-importlib to RDEPENDS_${PN}-python.

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>

Update libselinux_git.bb

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2017-09-13 19:48:28 -05:00
Wenzong Fan
3aafa96bb3 libsepol: uprev to 2.7 (20170804)
Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>

Update libsepol_git.bb

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2017-09-13 19:48:12 -05:00
Wenzong Fan
40a581df13 selinux: uprev include file to 20170804
Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2017-09-13 16:56:37 -05:00
Mark Hatle
232bfebc92 systemd: Remove inherit enable-selinux, obsolete
The PACKAGECONFIG and related settings are in oe-core.  Doing it here will
trigger a bug related to lack of 'initscripts-sushell' rdepends.

based on the change:

   From: Jackie Huang <jackie.huang@windriver.com>

   The selinux PACKAGECONFIG is properly handled in
   the recipe in oe-core, no need to inherit the
   enable-selinux bbclass.

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2017-09-13 16:35:19 -05:00
Kai Kang
beaaa37217 attr: fix ptest failures when selinux enabled
When selinux is enabled, a file has a default attribute
"security.selinux" and the output of getfattr shows:

  # file: here
  security.selinux="system_u:object_r:lib_t:s0"

That always causes more output of command getfattr than expected.

Filter out selinux related attribute info, and if the file has only
selinux attribute info, remove its whole output.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
2017-09-08 13:20:27 -05:00
susanbian
2aadc0d5fb audit 2.7.1 -> 2.7.6
Upgrade audit from 2.7.1 to 2.7.6

Signed-off-by: susanbian <bianyq@cn.fujitsu.com>
2017-09-08 13:19:47 -05:00
Jackie Huang
eeb2c2f35e audit: fix the wrong packaging for auditd.service
auditd.service should be packaged in 'auditd' instead
of 'audit' since the required binaries and config files
are all in 'auditd'.

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
2017-09-08 13:19:45 -05:00
Zhixiong Chi
827b305e04 initscripts: use the 'i' option for restorecon command
Use the 'i' option for restorecon command to ignore the files that
don't exist when building project.

Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
2017-09-08 13:19:24 -05:00
Jackie Huang
24cce7bd23 refpolicy: fix a typo in RDEPENDS
Underscore ("_") should be used for variable overrides.

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2017-09-08 13:13:27 -05:00
Wenlin Kang
f1f08609fc openssh: set ChallengeResponseAuthentication to no
The patch fixes the login fails for ssh -o Batchmode=yes when passwords is
empty and without authorized_keys file even if set "PermitEmptyPasswords yes"
in sshd_config file.

Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2017-09-08 13:11:51 -05:00
Dengke Du
49394d2544 rpm: modify the rpm bbappend file to suitable for rpm4
Changed in V5:
	Let the subject more clear.

Changed in V4:
	Make the comments more clear.
Changed in V3:
	Rebase the patch on the latest master branch.

Delete the does not exist files when run task do_package.

Signed-off-by: Dengke Du <dengke.du@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2017-05-16 07:55:51 -04:00
Joe MacDonald
449804470f refpolicy-git: clean up fallout from stable uprev
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2017-05-04 14:23:12 -04:00
Joe MacDonald
db1f0fe50d refpolicy: Update to 20170204 release
This updates all of the common policies.  standard, minimum, mls and
targeted.

Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2017-05-04 11:57:48 -04:00
Joe MacDonald
0cfdbb47aa refpolicy: update git recipes
The targeted, mls and minimum recipes had fallen far behind the upstream
refpolicy repository.  Refresh all patches and discard ones that are
obviously no longer needed.  This should not have any functional change on
the policies.

Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2017-05-03 21:05:44 -04:00
Joe MacDonald
849cd74b5f selinux-image: enable image labelling
selinux images attempt to label the filesystem image at creation time.
This depends on a native setfiles, though, which isn't guaranteed to be
present without the DEPEND addition.

If the 'setfiles' call fails, that shouldn't be fatal, though, it can
always be run at first boot time, as is commonly done with desktop and
server distros.

Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2017-05-02 21:21:44 -04:00
Wenzong Fan
5809730ec5 selinux-init: start service after local-fs.target
Fixing labels after local-fs.target to make sure all mounted
filesystems labeled correctly.

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2017-05-02 10:32:22 -04:00
Alexandru Moise
99f4fc444d refpolicy-mls: user native bzip2 instead of host
The behavior of b{zip,unzip}2 an vary from host to host with
regards to a number of things such as return value or permissions.

We should always use the native bzip2 package to keep the behavior
deterministic. This change prevents a warning at do_package_qa
task of refpolicy-mls package.

Signed-off-by: Alexandru Moise <alexandru.moise@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2017-05-02 10:29:41 -04:00
Doug Goldstein
f782a9b794 removed ustr as a required RDEPEND
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2017-05-02 09:21:35 -04:00
Doug Goldstein
41bb218dae removed ustr package as it is unused
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2017-05-02 09:21:35 -04:00
Doug Goldstein
9ac187d71c libsemanage: remove dependency on ustr
Use the upstream patches to remove the dependency on ustr which no
longer builds with new versions of GCC and the author is unresponsive
and the site hosting the code is down.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2017-05-02 09:21:35 -04:00
Joe MacDonald
60ec38e8fa minimum build changes
Not intended as a final patch, this is just a quick hack for master-next
to enable building meta-selinux on current yocto base images.

Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2017-04-27 14:57:27 -04:00
Tim Orling
3b5e6bd92e audit: update to v2.7.1
Added swig-native to DEPENDS

Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2017-02-24 12:00:27 -06:00
Robert Yang
715942d85d policycoreutils: add gettext-native to DEPENDS
Fixed:
msgfmt -o af.mo af.po
make[1]: msgfmt: Command not found
make[1]: *** [af.mo] Error 127

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2017-02-24 12:00:27 -06:00
Robert Yang
8b0a262869 libsemanage: add swig-native to DEPENDS
Fixed:
swig -Wall -python -o semanageswig_wrap.c -outdir ./ semanageswig_python.i
make[1]: swig: Command not found

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2017-02-24 12:00:27 -06:00