Commit Graph

538 Commits

Author SHA1 Message Date
Joe MacDonald
4c75d9cbcf MAINTAINERS: Update maintainers file
Adding Philip Tricca as a common layer maintainer and marking Pascal as
away.

Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-02-22 08:52:20 -05:00
Wenzong Fan
2188d5b09b audit: upgrade 2.4.3 -> 2.4.4
* rebase patch audit-python-configure.patch

* 2.4.4 includes CVE-2015-5186 and bug fixes, detials refer to:
  http://people.redhat.com/sgrubb/audit/ChangeLog

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-11-27 09:18:14 -05:00
George McCollister
d3efe54085 selinux-image: Fix RE error getting POL_TYPE
Change [:space:] to [[:space:]]. [:space:] is incorrect and is treated
as a list of characters. Prior to this change having a policy of
'standard' resulted in POL_TYPE being set to 'tandard'.

Change the regular expression to match from the beginning of the line
since correcting the [:space:] error causes the '# SELINUXTYPE= can
take one of these values:' line to match.

Signed-off-by: George McCollister <george.mccollister@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-11-27 09:18:14 -05:00
Philip Tricca
8864246d33 refpolicy-git: Refresh poky-policy-fix-new-SELINUXMNT-in-sys.patch.
Signed-off-by: Philip Tricca <flihp@twobit.us>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-11-27 09:18:14 -05:00
Philip Tricca
cfd6098067 selinux-init: Break handling of /.autorelabel out into separate script.
Fixup DESCRIPTION in old selinux-init recipe.
Exclude this autorelabel script from the minimal packagegroup.

Signed-off-by: Philip Tricca <flihp@twobit.us>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-11-27 09:18:14 -05:00
Philip Tricca
ac8450482d selinux-init: Break labeling of /dev out into separate script.
Remove selinux-init package from packagegroup-selinux-minimal.

Signed-off-by: Philip Tricca <flihp@twobit.us>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-11-27 09:18:14 -05:00
Philip Tricca
766bed8304 selinux-init: Move script logic into include.
This will be useful when we have other init scripts.

Signed-off-by: Philip Tricca <flihp@twobit.us>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-11-27 09:18:13 -05:00
Philip Tricca
fd41e8b702 selinux-config: Separate init script into new recipe.
Add runtime dependencies for init script.

Signed-off-by: Philip Tricca <flihp@twobit.us>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-11-27 09:18:13 -05:00
Wenzong Fan
bfaf278116 refpolicy-minimum: update prepare_policy_store
* update prepare_policy_store() for supporting SELinux 2.4 & CIL, the
  logic is from refpolicy_common.inc but with minimum set of policy
  modules;

* add extra policy modules that required by sysnetwork, without those
  modules the install process will fail with error:

    | Failed to resolve roletype statement at 62 of \
      .../image/var/lib/selinux/minimum/tmp/modules/100/sysnetwork/cil
    | Failed to resolve ast
    | semodule:  Failed!

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-11-27 09:18:13 -05:00
Wenzong Fan
4f5fea9bce refpolicy-targeted: rebase patches
rebase patches against latest git sources:

  * refpolicy-fix-optional-issue-on-sysadm-module.patch
  * refpolicy-unconfined_u-default-user.patch

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-11-27 09:18:13 -05:00
Robert Yang
924c55d38e libsepol: DEPENDS on flex-native
Fixed when build libsepol-native:
/bin/sh: 1: flex: not found

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-10-22 10:52:49 -04:00
Wenzong Fan
6d0c9ecd8d refpolicy: fix exit code issue of bzip2
'bzip2 -qt $moudle_name.pp' has different exit codes on different
distributions, for example:

* On Redhat/CentOS/Fedora, OpenSUSE:

  $ bzip2 -qt /tmp/tor.pp
  bzip2: /tmp/tor.pp: bad magic number (file not created by bzip2)
  $ echo $?
  0

This causes install errors:

  unzip2: /path/to/*.pp is not a bzip2 file.
  libsepol.module_package_read_offsets: module package header truncated
  Failed to read policy package

* Ubuntu has fixed it:

  $ bzip2 -qt /tmp/tor.pp
  bzip2: /tmp/tor.pp: bad magic number (file not created by bzip2)
  $ echo $?
  2

The difference involved by '-q' options, remove it would get the bzip2
works consistently. bzip2-native has the same issue, anyway it should
be fixed separately.

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-10-22 10:52:49 -04:00
Wenzong Fan
0eafe06e34 libcap-ng: remove package
libcap-ng 0.7.7 has been added to oe-core:
  ad509d7644803ff9386affefe2ec1a3664027074

No change need to port.

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-10-22 10:49:21 -04:00
Wenzong Fan
321848ab57 swig: remove package
swig 3.0.6 has been added to oe-croe:
  66923c6776da13bd4513a73c3f7c5e60d74eb0f3

No change need to port.

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-10-22 10:49:21 -04:00
Joe Slater
b00d2db9f0 refpolicy: SRCREV_FORMAT needed
Signed-off-by: Joe Slater <jslater@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-10-22 10:47:18 -04:00
Wenzong Fan
463f97bfd1 audit/auvirt: get inline functions work with both gnu89 & gnu11
After gcc upgraded to gcc5, and if the codes are compiled without
optimization (-O0), and the below error will happen:

  auvirt.c:484: undefined reference to `copy_str'
  auvirt.c:667: undefined reference to `is_resource'
  collect2: error: ld returned 1 exit status

gcc5 defaults to -std=gnu11 instead of -std=gnu89, and it requires that
exactly one C source file has the callable copy of the inline function.
Consider the following program:

  inline int
  foo (void)
  {
    return 42;
  }

  int
  main (void)
  {
    return foo ();
  }

The program above will not link with the C99 inline semantics, because
no out-of-line function foo is generated. To fix this, either mark the
function foo as static, or add the following declaration:

  static inline int foo (void);

More information refer to: https://gcc.gnu.org/gcc-5/porting_to.html

Note: using "extern inline" will fail to build with gcc4.x, so replace
inline with "static inline".

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-09-21 10:42:27 -04:00
Philip Tricca
dfa1054f33 refpolicy: Update policy install and bootstrap process for CIL.
The policy modules are now installed into /var/lib/selinux instead
of /etc/selinux.
Policies now have priorities. This is represented as part of the path
under /var/lib/selinux.
The new intermediate policy representation requires that we install
the policy package as 3 files (hll, cil & lang_ext) instead of just
the *.pp as before. The cil is generated from the hll (the pp file)
using the new 'pp' utility.
The base policy module now lives with all of the other modules.
policy.kern has gone away.

Signed-off-by: Philip Tricca <flihp@twobit.us>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-09-17 15:18:43 -04:00
Philip Tricca
e09eaef7a9 setools: Add patch to support 2.4 toolstack.
Signed-off-by: Philip Tricca <flihp@twobit.us>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-09-17 15:18:43 -04:00
Philip Tricca
100a1c0efc policycoreutuils: Bump version to 2.4.
This integrates the new hll tool for compiling pp files into cil.
The hack to stage pp into the sysroot is a bit weird but the libexec
dir seems to be something bitbake doesn't account for.
Had to pull one patch from upstream to build the MLS policy. This fixes
an error where the auditadm_r and secadm_r roles end up defined twice in
the CIL.

Signed-off-by: Philip Tricca <flihp@twobit.us>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-09-17 15:18:43 -04:00
Philip Tricca
bf7baf9d1a libsemanage: Bump version to 2.4.
Signed-off-by: Philip Tricca <flihp@twobit.us>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-09-17 15:18:43 -04:00
Philip Tricca
977f7a2562 checkpolicy: Bump version to 2.4.
Signed-off-by: Philip Tricca <flihp@twobit.us>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-09-17 15:18:43 -04:00
Philip Tricca
4655074dc3 libselinux: Bump version to 2.4.
Signed-off-by: Philip Tricca <flihp@twobit.us>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-09-17 15:18:43 -04:00
Philip Tricca
ef9c04d08b libsepol: Bump version to 2.4.
Signed-off-by: Philip Tricca <flihp@twobit.us>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-09-17 15:18:43 -04:00
Philip Tricca
f9a50b02aa Add common files for 20150202 SELinux userspace release.
Note the change in the URL from the last release. We were pulling source
tarballs generated by GitHub as part of its reponse to the addition of
tags. The SELinux project maintains their own releases on the wiki at:
https://github.com/SELinuxProject/selinux/wiki/Releases

Signed-off-by: Philip Tricca <flihp@twobit.us>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-09-17 15:18:43 -04:00
Joe MacDonald
8bbcf2bba7 net-tools: update bbappend for new base recipe
Commit bf362e4a8bb9fef3d16b81dea7b39a057e293ee4 in poky updates net-tools,
take this opportunity to convert this to a wildcard, since the bbappend
still seems to apply.

Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-09-08 15:59:54 -04:00
Joe Slater
7340a1d4d2 e2fsprogs: now depend on attr
Patches added by this bbappend make us depend on the attr
package.

Signed-off-by: Joe Slater <jslater@windriver.com>
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-09-08 15:59:11 -04:00
Philip Tricca
7ee048189d linux-libc-headers: Make headers available to native packages via BBCLASSEXTEND.
Signed-off-by: Philip Tricca <flihp@twobit.us>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-09-08 15:59:11 -04:00
Philip Tricca
a3b533e32a e2fsprogs: Add dependency on linux-libc-headers.
We require these headers for some constants that define the xattr
namespaces.

Signed-off-by: Philip Tricca <flihp@twobit.us>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-09-08 15:59:11 -04:00
Philip Tricca
4f81a46e31 Use the SELinux project release tarballs.
The SRC_URI used for the last SELinux userspace upgrade was the
wrong one. We were using the URI generated by GitHub when tags are
added to a repo. These are not the SELinux release tarballs.

The SELinux project generates and releases tarballs for each tool
and posts them to their GitHub wiki 'Releases' page:
https://github.com/SELinuxProject/selinux/wiki/Releases. This patch
fixes this URI, fixes the SELINUX_RELEASE variable that didn't get
updated during the last upgrade, removes the workaround for the 'S'
variable and fixes up the SRC_URI hashes.

Signed-off-by: Philip Tricca <flihp@twobit.us>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-09-08 15:59:11 -04:00
Robert Yang
b383d0cbad ustr: fix build error with gcc 5
Backport a patch from debian to fix errors as:
ustr-main.h:1062: multiple definition of `ustrp_setf_owner'

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-09-08 14:03:28 -04:00
Robert Yang
76cb970ddc audit: remove add-system-call-table-for-ARM.patch
There isn't lib/machinetabs.h any more, there isn't data structures like
"static const char machine_strings", either.

This fixed a do_patch error when arm.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-08-14 12:38:47 -04:00
Wenzong Fan
cd04049ee2 libcap-ng: upgrade 0.7.4 -> 0.7.7
* Port changes from meta-oe:

  commit bce4dba5546480c8e43c6442959ac7d0a4ef32f6
  Author: Li xin <lixin.fnst@cn.fujitsu.com>
  Date:   Thu Jul 23 15:29:31 2015 +0800

    libcap-ng: upgrade 0.7.4 -> 0.7.7

    Update python.patch,since the contents has been changed.

    Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
    Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>

* Remove patch CVE-2014-3215.patch that included by 0.7.7

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-08-14 12:38:41 -04:00
Wenzong Fan
61a2cc84af python-ipy: update 0.81 -> 0.83
* update SRC_URI checksums
* remove PKG-INFO that is not in 0.83

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-08-14 12:31:39 -04:00
Wenzong Fan
6a772ec037 libselinux: get pywrap depends on selinux.py
The selinux.py will be installed as selinux/__init__.py, just make sure
it has been generated completely while starting "make install-pywrap".

This fixes below errors that caused by an empty "selinux/__init__.py"
on target:

  $ /usr/sbin/semanage -h

  Traceback (most recent call last):
  File "/usr/sbin/semanage", line 30, in <module>
    import seobject
  File "/usr/lib64/python2.7/site-packages/seobject.py", line 27, in <module>
    import sepolicy
  File "/usr/lib64/python2.7/site-packages/sepolicy/__init__.py", line 226, in <module>
    def get_file_equiv_modified(fc_path = selinux.selinux_file_context_path()):
  AttributeError: 'module' object has no attribute 'selinux_file_context_path'

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-08-14 12:31:38 -04:00
Shrikant Bobade
37f08555b0 audit: fix qa warning, update config option
update config option '--with-armeb' to '--with-arm'
for audit qa warning fix.

Signed-off-by: Shrikant Bobade <shrikant_bobade@mentor.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-08-14 12:31:37 -04:00
Josep Puigdemont
e8f690371e selinux-config: make DEFAULT_POLICY and DEFAULT_ENFORCING configurable
Make DEFAULT_POLICY and DEFAULT_ENFORCING configurations more flexible.

Signed-off-by: Maxin B. John <maxin.john@enea.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-08-14 12:31:37 -04:00
Philip Tricca
1cd6086305 e2fsprogs: Implement xattr block cache with simple linked list.
Signed-off-by: Philip Tricca <flihp@twobit.us>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-08-08 16:43:23 -04:00
Philip Tricca
5cb8ef7d04 e2fsprogs: Add stub functions for an xattr cache and struct to hold the header and block data.
Signed-off-by: Philip Tricca <flihp@twobit.us>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-08-08 16:43:23 -04:00
Philip Tricca
22ade8fbe7 e2fsprogs: Copy xattr block from source file.
Signed-off-by: Philip Tricca <flihp@twobit.us>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-08-08 16:43:23 -04:00
Philip Tricca
b2ce05b5c1 e2fsprogs: Add xattr security prefix data to lib/ext2fs/ext2_ext_attr.h
Signed-off-by: Philip Tricca <flihp@twobit.us>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-08-08 16:43:23 -04:00
Philip Tricca
e9b28794f1 e2fsprogs: Insert calls to xattr module into mke2fs and build xattr code.
Signed-off-by: Philip Tricca <flihp@twobit.us>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-08-08 16:43:23 -04:00
Philip Tricca
6319e568d0 e2fsprogs: Add bbappend and stub for xattr module.
Signed-off-by: Philip Tricca <flihp@twobit.us>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-08-08 16:43:23 -04:00
Philip Tricca
56e952f43a selinux-image: Add new image class to label the rootfs, use it for selinux images.
Signed-off-by: Philip Tricca <flihp@twobit.us>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-08-08 16:43:23 -04:00
Philip Tricca
54e7104ef8 policycoreutils: Patch setfiles to add FTS_NOCHDIR to fts_flags.
Signed-off-by: Philip Tricca <flihp@twobit.us>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-08-08 16:43:23 -04:00
Shrikant Bobade
684ee9401f README : update supported refpolicy version details
README updated with the supported refpolicy version
details and information of refpolicy building from
git repository.

Signed-off-by: Shrikant Bobade <shrikant_bobade@mentor.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-08-07 17:34:26 -04:00
Shrikant Bobade
61b1c50859 refpolicy-minimum: update base refpolicy to git repo
A simple forward-port of refpolicy-minimum to use the
refpolicy from git repository.

Signed-off-by: Shrikant Bobade <shrikant_bobade@mentor.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-08-07 17:33:22 -04:00
Shrikant Bobade
aba7f91bff refpolicy-standard: update base refpolicy to git repo
A simple forward-port of refpolicy-standard to use the
refpolicy from git repository.

Signed-off-by: Shrikant Bobade <shrikant_bobade@mentor.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-08-07 17:33:22 -04:00
Shrikant Bobade
07aa29ce30 refpolicy-mls: update base refpolicy to git repo
A simple forward-port of refpolicy-mls to use the
refpolicy from git repository.

Signed-off-by: Shrikant Bobade <shrikant_bobade@mentor.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-08-07 17:33:22 -04:00
Shrikant Bobade
633eaa03b8 refpolicy-mcs: update base refpolicy to git repo
A simple forward-port of refpolicy-mcs to use the
refpolicy from git repository.

Signed-off-by: Shrikant Bobade <shrikant_bobade@mentor.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-08-07 17:33:22 -04:00
Shrikant Bobade
400c60cafb refpolicy-targeted: update base refpolicy to git repo
A simple forward-port of refpolicy-targeted to use the
refpolicy from git repository.

Signed-off-by: Shrikant Bobade <shrikant_bobade@mentor.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-08-07 17:33:21 -04:00