Commit Graph

514 Commits

Author SHA1 Message Date
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
Shrikant Bobade
b76d7df552 refpolicy git: rebase patches with code base
During forward-port of these patches from refpolicy 20140311,
requires rebase with the refpolicy git repos head master
code base,in order to resolve the patch conflicts.

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
Shrikant Bobade
6a775bb8ed refpolicy git: update refpolicy to git repository
A straight update from refpolicy 2.20140311 to refpolicy git
repository for the core policy variants and forward-porting
of policy patches as appropriate.

This approach is useful for building refpolicy & refpolicy-contrib
directly from the git repos, rather than release tarballs.
It helps to check the refpolicy based on source commits by just
updating the git repo rev. as appropriate in refpolicy_git.inc

ref: https://github.com/TresysTechnology/refpolicy/wiki

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
Shrikant Bobade
e59f3b7d04 refpolicy-minimum: update base refpolicy 20141203
A simple forward-port of refpolicy-minimum to use the 20141203
base refpolicy.

Signed-off-by: Shrikant Bobade <shrikant_bobade@mentor.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-08-07 16:48:19 -04:00
Shrikant Bobade
46b344baa3 refpolicy-standard: update base refpolicy 20141203
A simple forward-port of refpolicy-standard to use the 20141203
base refpolicy.

Signed-off-by: Shrikant Bobade <shrikant_bobade@mentor.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-08-07 16:48:19 -04:00
Shrikant Bobade
73e5f9c82a refpolicy-mls: update base refpolicy 20141203
A simple forward-port of refpolicy-mls to use the 20141203
base refpolicy.

Signed-off-by: Shrikant Bobade <shrikant_bobade@mentor.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-08-07 16:48:19 -04:00
Shrikant Bobade
424e585a4d refpolicy-mcs: update base refpolicy 20141203
A simple forward-port of refpolicy-mcs to use the 20141203
base refpolicy.

Signed-off-by: Shrikant Bobade <shrikant_bobade@mentor.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-08-07 16:48:19 -04:00
Shrikant Bobade
c687df118d refpolicy-targeted: update base refpolicy 20141203
A simple forward-port of refpolicy-targeted to use the 20141203
base refpolicy.

Signed-off-by: Shrikant Bobade <shrikant_bobade@mentor.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-08-07 16:48:19 -04:00
Shrikant Bobade
e0ed069077 refpolicy 20141203: rebase patches with code base
During forward-port of these patches from refpolicy 2014120311,
requires rebase with the refpolicy 20141203 code base,
in order to resolve the patch conflicts.

Signed-off-by: Shrikant Bobade <shrikant_bobade@mentor.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-08-07 16:48:19 -04:00
Shrikant Bobade
e4c762e6bc refpolicy: update refpolicy to 20141203 release
A straight update from refpolicy 2.20140311 to 2.20141203 for the core
policy variants and forward-porting of policy patches as appropriate.

ref: https://github.com/TresysTechnology/refpolicy/wiki

Signed-off-by: Shrikant Bobade <shrikant_bobade@mentor.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-08-07 16:48:18 -04:00
Shrikant Bobade
f19f2bf82a README: update supported linux-yocto versions
README updated with the list of supported linux-yocto
versions and details to use it while preparing selinux
enabled images.

Signed-off-by: Shrikant Bobade <shrikant_bobade@mentor.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-08-07 16:48:18 -04:00
Shrikant Bobade
83c3ee0aae linux-yocto: enable selinux support for kernel v4.1
The default kernel is now v4.1. So we need the selinux support
for kernel v4.1, inorder to get selinux enabled images out of box.

Signed-off-by: Shrikant Bobade <shrikant_bobade@mentor.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-08-07 16:24:54 -04:00
Wenzong Fan
dba3728010 refpolicy: correct SELINUX_DEVEL_PATH
The sepolgen.conf should be installed with devel package to correct
the default value of SELINUX_DEVEL_PATH, Makefile will be searched from
that path while building policies on target.

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-08-07 16:11:55 -04:00
Wenzong Fan
96927432c4 policycoreutils: install /var/lib/selinux
This dir is required for running command:

$ semanage permissive [OPTS]

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-08-07 16:11:54 -04:00
Wenzong Fan
614b7a78e7 initscripts: fix contexts for /etc/resolv.conf, adjtime
Restore contexts for /etc/{resolv.conf, adjtime}, they are created
dynamically and the incorrect contexts maybe prevent some programs
from valid accessing.

  /etc/resolv.conf: etc_t:SystemHigh -> etc_t:SystemLow
  /etc/adjtime:     etc_t:SystemHigh -> adjtime_t:SystemLow

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-08-07 16:11:54 -04:00
Li xin
c8018efc6a audit: upgrade 2.3.2 -> 2.4.3
1) Remove audit-for-cross-compiling.patch and disable-ldap.patch
since it it not needed anymore.

2) Modify audit-python-configure.patch audit-python.patch
fix-swig-host-contamination.patch,since configure.ac and
Makefile.am has been changed in 2.4.3

3) Warning Fix:
-WARNING: QA Issue: audit: configure was passed unrecognised options: --without-ldap [unknown-configure-option]
-WARNING: QA Issue: audit: Files/directories were installed but not shipped in any package

Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-08-07 16:08:10 -04:00
Wenzong Fan
77130536eb udev: restorecon /run to allow mdadm creating /run/mdadm
This change bases on the factors during bootup:

a. the default type for /run is var_run_t;
b. the type for /run will be changed to tmpfs_t after tmpfs mounted;
c. the type for /run will be fixed after populate-volatile.sh run.

udev service is started in b->c period, fix the type for /run from
udev init script to remove:

  avc: denied { write } for pid=294 comm="mdadm" \
  name="/" dev="tmpfs" ino=10581 \
  scontext=system_u:system_r:mdadm_t:s0-s15:c0.c1023 \
  tcontext=system_u:object_r:tmpfs_t:s0 tclass=dir

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-08-07 15:17:52 -04:00
Joe MacDonald
54875dcb50 mcstrans: remove dependency on bash in initscript
There were no apparent bashisms in mcstrans.init, so remove the dependency
on bash.

Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-08-07 15:17:52 -04:00
Roy Li
4eeed5b532 policycoreutils: enable mcstransd
mcstransd is a daemon to translate SELinux MCS/MLS sensitivity labels,
policycoreutils includes mcstransd whose version is newer than that
from http://mcstrans.sourcearchive.com/

Signed-off-by: Roy Li <rongqing.li@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-08-07 14:51:31 -04:00
tprrt
aef47ac6a6 Fix setools building (-fPIC error)
Signed-off-by: tprrt <tprrt@tupi.fr>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-08-07 14:24:15 -04:00
Shrikant Bobade
607fb68d4b libpam: use wildcard for version and cleanup
use wildcard for version: adopting libpam upgrade from 1.1.6 to 1.2.1,
cleanup older recipe and remove patch sepermit-add-DESTDIR-prefix.patch
since the changes already available with latest source.

Signed-off-by: Shrikant Bobade <shrikant_bobade@mentor.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-08-07 14:24:15 -04:00
Shrikant Bobade
dee52032cf linux-yocto: enable selinux support for kernel v3.19
The default kernel is now v3.19. So we need the selinux support
for kernel v3.19, inorder to get selinux enabled images out of box.

Signed-off-by: Shrikant Bobade <Shrikant_Bobade@mentor.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-06-09 13:30:42 -04:00
Dmitry Eremin-Solenikov
2ebacbad21 selinux-config: fix the S directory not existant warning
Fix the warning reporing that ${S} directory does not exist by pointing
S to ${WORKDIR}.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-05-11 14:28:43 -04:00
Dmitry Eremin-Solenikov
88b236f054 selinux-config: allow to override 'enforcing' status of SELinux
Move the 'enforcing' setting to the DEFAULT_ENFORCING variable to allow
one to override that setting in a bbappend file.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-05-11 14:28:43 -04:00
Dmitry Eremin-Solenikov
22c3447a51 perf: conditionally add audit to the DEPENDS list
perf can make use of libaudit if it is present. So let's build perf with
audit if we are building a SELinux-enabled distribution.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-05-11 14:28:43 -04:00