Commit Graph

603 Commits

Author SHA1 Message Date
Wenzong Fan
7351dfc00d dhcp: sync init-server with oe-core
oe-core commit:

  a162416119ec9deee9fef53455d1281abe573681
  dhcpd: create dhcpd user for dhcp dameon

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-09-22 11:34:07 -04:00
Wenzong Fan
fea3e1d19e selinux: update policy-version to 30
Both selinux 2.5 and kernel 4.8 support Max Policy Version 30.

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-09-22 11:34:06 -04:00
Shrikant Bobade
b72d0a06a8 refpolicy-minimum: systemd: fix for syslog
syslog & getty related allow rules required to fix the syslog mixup with
boot log, while using systemd as init manager.

Signed-off-by: Shrikant Bobade <shrikant_bobade@mentor.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-09-01 14:30:47 -04:00
Shrikant Bobade
6a93c5045a refpolicy-minimum: systemd: fix for systemd tmp-files services
fix for systemd tmp files setup services:
systemd-journal-flush.service & systemd-logind.service.

Signed-off-by: Shrikant Bobade <shrikant_bobade@mentor.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-09-01 14:30:47 -04:00
Shrikant Bobade
ad4ca6ad63 refpolicy-minimum: systemd: fix for login & journal service
1. fix for systemd services: login & journal wile using refpolicy-minimum
and systemd as init manager.
2. fix login duration after providing root password.

Signed-off-by: Shrikant Bobade <shrikant_bobade@mentor.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-09-01 14:30:47 -04:00
Shrikant Bobade
01556456a0 refpolicy-minimum: systemd: mount: enable required refpolicy booleans
enable required refpolicy booleans for these modules mount:
allow_mount_anyfile & systemd:systemd_tmpfiles_manage_all

Signed-off-by: Shrikant Bobade <shrikant_bobade@mentor.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-09-01 14:30:47 -04:00
Shrikant Bobade
0e03715dfe refpolicy-minimum: init: fix reboot with systemd as init manager.
add allow rule to fix avc denial during system reboot.

Signed-off-by: Shrikant Bobade <shrikant_bobade@mentor.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-09-01 14:30:47 -04:00
Shrikant Bobade
95922a23cb refpolicy-minimum: locallogin: add allow rules for type local_login_t
add allow rules for locallogin module avc denials.

Signed-off-by: Shrikant Bobade <shrikant_bobade@mentor.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-09-01 14:30:47 -04:00
Shrikant Bobade
2b022c1f4b refpolicy-minimum: systemd: mount: logging: authlogin: add allow rules
add allow rules for avc denails for systemd, mount, logging & authlogin
modules. without this change we are  getting avc. denials from these
modules.

Signed-off-by: Shrikant Bobade <shrikant_bobade@mentor.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-09-01 14:30:46 -04:00
Shrikant Bobade
6cd54990a2 refpolicy-minimum: audit: logging: getty: audit related allow rules
add allow rules for audit.log file & resolve dependent avc denials.

Signed-off-by: Shrikant Bobade <shrikant_bobade@mentor.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-09-01 14:30:46 -04:00
Shrikant Bobade
34ab910f64 refpolicy-minimum: systemd:unconfined:lib: add systemd services allow rules
systemd allow rules for systemd service file operations: start, stop, restart
& allow rule for unconfined systemd service.

without this change we are geting avc denials and access denied to perform
operations on service file.

Signed-off-by: Shrikant Bobade <shrikant_bobade@mentor.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-09-01 14:30:46 -04:00
Shrikant Bobade
d3c54a1a5a refpolicy_common.inc: add refpolicy minimum banner at selinux config.
Signed-off-by: Shrikant Bobade <shrikant_bobade@mentor.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-09-01 14:30:46 -04:00
Shrikant Bobade
9b0f006319 selinux-labeldev: add systemd service file support
add systemd service file for handling selinux labeldev, this change improves
handling of systemd service functionality like:status check, debug etc.
compared to sysvinit compatibility mode scripts.

Signed-off-by: Shrikant Bobade <shrikant_bobade@mentor.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-09-01 14:30:46 -04:00
Shrikant Bobade
cd7bae3a99 selinux-autorelabel: add systemd service file support
add systemd service file for handling selinux autorelabel, this change
improves handling of systemd service functionality like:status check,
re-run, debug etc. compared to sysvinit compatibility mode scripts.

Signed-off-by: Shrikant Bobade <shrikant_bobade@mentor.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-09-01 14:30:46 -04:00
Shrikant Bobade
754f33c105 selinux-init: add systemd service file support
add systemd service file for handling selinux initialization, this change
improves handling of systemd service functionality like:status check, debug
etc. compared to sysvinit compatibility mode scripts.

Signed-off-by: Shrikant Bobade <shrikant_bobade@mentor.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-09-01 14:30:46 -04:00
Shrikant Bobade
52337bbcfd selinux-initsh.inc: add systemd support
add support for systemd service file and handling of script required by
systemd service file.

Signed-off-by: Shrikant Bobade <shrikant_bobade@mentor.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-09-01 14:30:46 -04:00
Wang Xin
0ef21d071f audit: 2.5 -> 2.6.6
1) Upgrade audit from 2.5 to 2.6.6.
2) Modify audit-python.patch, since the data has changed.

Signed-off-by: Wang Xin <wangxin2015.fnst@cn.fujitsu.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-09-01 14:30:46 -04:00
Joe MacDonald
33c7585bc5 augeas: Move to meta-python optional layer
Augeas lives in meta-python, but meta-selinux shouldn't specifically
require meta-python in every build, so make the bbappend optional using
the standard mechanism already present in the layer.conf.

Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-08-09 09:31:01 -04:00
Wenzong Fan
bb478a426a refpolicy-targeted: remove duplicate type rules
Remove duplicate type rules from init_t to init_script_file_type,
they have been included by systemd policies. This also fixes the
errors while installing modules for refpolicy-targeted if systemd
support is enabled:

| Conflicting type rules
| Binary policy creation failed at line 327 of \
  .../tmp/work/qemux86-poky-linux/refpolicy-targeted/git-r0/image\
  /var/lib/selinux/targeted/tmp/modules/100/init/cil
| Failed to generate binary
| semodule:  Failed!

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-08-08 13:03:58 -04:00
Joe MacDonald
d0f889259b refpolicy: remove virtual prefix for runtime providers
In keeping with the approach of only providing a single default policy at
runtime, we were originally using a virtual/refpolicy dependency and
filling it with one of our specific refpolicy implementations.  This works
well enough for some package systems, but fails for others (specifically
deb, possibly more).

Since the intent was to only have one present in the default image anyway,
we'll just throw out the 'virtual/' part of the RPROVIDES and related
dependencies across the board.

Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-07-07 10:38:32 -04:00
Shrikant Bobade
655db117a2 README: update with systemd & virtual/refpolicy details
add init manager user guidelines and examples for using refpolicy with
perticular version and type.

Signed-off-by: Shrikant Bobade <shrikant_bobade@mentor.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-07-04 15:42:36 -04:00
Joe MacDonald
9f1bb489ac e2fsprogs: Update bbappend
e2fsprogs has been updated with oe-core commit
f221f331704c0bdfc7c1dd361e666ce2158fe282  Update our bbappend accordingly.

Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
Signed-off-by: Philip Tricca <flihp@twobit.us>
2016-06-22 04:58:03 -07:00
Shrikant Bobade
7cc59002c9 iproute2: fix qa warning by using with-selinux
WARNING: iproute2-4.6.0-r0 do_package_qa: QA Issue: iproute2-ss rdepends on
libselinux, but it isn't a build dependency, missing libselinux in DEPENDS
or PACKAGECONFIG? [build-deps]

Signed-off-by: Shrikant Bobade <shrikant_bobade@mentor.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-06-16 10:33:18 -04:00
Shrikant Bobade
e944d15812 packagegroup-selinux-policycoreutils: add policycoreutils-hll
we need policycoreutils-hll to insert custom policy module/package, without
it semodule install fail with error:

libsemanage.semanage_pipe_data: Unable to execute /usr/libexec/selinux/hll/
pp : No such file or directory
libsemanage.semanage_direct_commit: Failed to compile hll files into cil
files. (No such file or directory).
semodule:  Failed!

Signed-off-by: Shrikant Bobade <shrikant_bobade@mentor.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-06-16 10:33:18 -04:00
Robert Yang
cd4fd06f54 sepolgen: inherit python-dir
Fixed:
sepolgen-1.2.3: sepolgen: Files/directories were installed but not shipped in any package:
  /usr
  /usr/lib
  /usr/lib/python
  /usr/lib/python/site-packages
  /usr/lib/python/site-packages/sepolgen
  /usr/lib/python/site-packages/sepolgen/lex.py
  /usr/lib/python/site-packages/sepolgen/matching.py
  /usr/lib/python/site-packages/sepolgen/sepolgeni18n.py
  /usr/lib/python/site-packages/sepolgen/__init__.py
  /usr/lib/python/site-packages/sepolgen/classperms.py
  /usr/lib/python/site-packages/sepolgen/refparser.py
  /usr/lib/python/site-packages/sepolgen/module.py
  /usr/lib/python/site-packages/sepolgen/objectmodel.py
  /usr/lib/python/site-packages/sepolgen/interfaces.py
  /usr/lib/python/site-packages/sepolgen/access.py
  /usr/lib/python/site-packages/sepolgen/output.py
  /usr/lib/python/site-packages/sepolgen/refpolicy.py
  /usr/lib/python/site-packages/sepolgen/defaults.py
  /usr/lib/python/site-packages/sepolgen/audit.py
  /usr/lib/python/site-packages/sepolgen/yacc.py
  /usr/lib/python/site-packages/sepolgen/util.py
  /usr/lib/python/site-packages/sepolgen/policygen.py
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
sepolgen: 22 installed and not shipped files. [installed-vs-shipped]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-06-16 10:33:18 -04:00
Robert Yang
979688dfe9 libsemanage: inherit python-dir
Fixed:
semanageswig_wrap.c:147:21: fatal error: Python.h: No such file or directory

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-06-16 10:33:18 -04:00
Shrikant Bobade
ad8800c114 eudev: add wildcard version
eudev version at poky updated to v3.2 from v3.1.5, so moving it to use
wildcard in order to fix the parsing error.

Signed-off-by: Shrikant Bobade <shrikant_bobade@mentor.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-06-16 10:33:18 -04:00
Shrikant Bobade
a3929be705 refpolicy_common.inc: enable conditional systemd support
refpolicy now introduced systemd support using POLICY_SYSTEMD variable,
with systemd enabled setup we need the refpolicy with systemd support, so
enable systemd support based on DISTRO_FEATURES.

Signed-off-by: Shrikant Bobade <shrikant_bobade@mentor.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-05-27 13:30:49 -04:00
Shrikant Bobade
9620f5121a refpolicy-minimum_2.20151208: add systemd dependent policy modules
with systemd enabled refpolicy-minimum build breaks due to missing dependent
policy modules, so add the dependent modules: clock, systemd, udev
conditionally based on DISTRO_FEATURES.

dependent systemd policy modules needed to fix these errors:

* Failed to resolve 'adjtime_t' in typeattributeset statement at line 138 of
 .. modules/100/init/cil

* Failed to resolve 'systemd_kmod_conf_t' in typeattributeset statement at
line 141 of.. moules/100/init/cil

* Failed to resolve 'udev_t' in typeattributeset statement at line 143 of
modules/100/init/cil semodule:  Failed!

Signed-off-by: Shrikant Bobade <shrikant_bobade@mentor.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-05-27 13:30:49 -04:00
Shrikant Bobade
78249555b4 refpolicy-minimum_git: add systemd dependent policy modules
with systemd enabled refpolicy-minimum build breaks due to missing dependent
policy modules, so add the dependent modules: clock, systemd, udev
conditionally based on DISTRO_FEATURES.

dependent systemd policy modules needed to fix these errors:

* Failed to resolve 'adjtime_t' in typeattributeset statement at line 138 of
.. modules/100/init/cil

* Failed to resolve 'systemd_kmod_conf_t' in typeattributeset statement at
line 141 of.. moules/100/init/cil

* Failed to resolve 'udev_t' in typeattributeset statement at line 143 of
modules/100/init/cil semodule:  Failed!

Signed-off-by: Shrikant Bobade <shrikant_bobade@mentor.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-05-27 13:30:49 -04:00
Shrikant Bobade
eadc6e6da3 libselinux_git: fix warnings of unavailable patches
Drop unavailable patches entry to fix the warning, even we are using
libselinux v2.5 these warnings pop-up during recipes parsing.

WARNING:..libselinux_git.bb: Unable to get checksum for libselinux SRC_URI
entry libselinux-get-pywrap-depends-on-selinux.py.patch: file could not be
found
WARNING:..libselinux_git.bb: Unable to get checksum for libselinux SRC_URI
entry libselinux-mount-procfs-before-check.patch: file could not be found

Signed-off-by: Shrikant Bobade <shrikant_bobade@mentor.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-05-27 13:30:49 -04:00
Wenzong Fan
c063abf694 refpolicy_common: Use POLICY_NAME instaed of POLICY_TYPE for SELINUXTYPE in config.
Signed-off-by: Philip Tricca <flihp@twobit.us>
2016-04-20 05:24:28 +00:00
Wenzong Fan
3eab039fd0 refpolicy-minimum: port changes for prepare_policy_store
Apply the changes to refpolicy-minimum_2.20151208.bb:

  commit bfaf278116
  Author: Wenzong Fan <wenzong.fan@windriver.com>
  Date:   Tue Oct 27 06:25:04 2015 -0400

    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>

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
2016-04-17 06:11:42 +00:00
Philip Tricca
a9e8f834d7 refpolicy_common: Sanity test DEFAULT_ENFORCING value and set default.
Use the anonymous python function to be sure the value set for
'SELINUX' in the config file is something useful. In the event that
DEFAULT_ENFORCING isn't set to one of the 3 permissible values we
set it to 'permissive'.

Signed-off-by: Philip Tricca <flihp@twobit.us>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-04-04 12:55:56 -04:00
Philip Tricca
8094407fd7 Integrate selinux-config into refpolicy_common.
With the virutal package there's no need for a separate recipe to build
the config. This can be generated and included as part of the policy
package.

Signed-off-by: Philip Tricca <flihp@twobit.us>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-04-04 12:55:56 -04:00
Philip Tricca
14c84b182b refpolicy: Setup virtual/refpolicy provider.
This allows us to provide a default policy through the
PREFERRED_PROVIDER mechanism for each of the example distro configs.
Consumers of meta-selinux will be able to override this at the config
level instead of having to depend on a specific policy package. We do
lose the ability install more than one policy package but this falls
in line with the embedded nature of the project.

Signed-off-by: Philip Tricca <flihp@twobit.us>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-04-04 12:55:56 -04:00
Philip Tricca
fc122bb653 refpolicy: Remove 2.20140311 release.
Signed-off-by: Philip Tricca <flihp@twobit.us>
2016-03-21 04:08:13 +00:00
Philip Tricca
a0b7bd26bb refpolicy: Replace 2.2014120 with release 2.20151208.
This was mostly straight forward. Had to refresh a single patch:
poky-policy-fix-new-SELINUXMNT-in-sys.patch

Signed-off-by: Philip Tricca <flihp@twobit.us>
2016-03-21 03:21:32 +00:00
Stephen Smalley
39b93f8588 libselinux: procattr fixes
selinux upstream commits c7cf5d8aa061b9616bf9d5e91139ce4fb40f532c
and f77021d720f12767576c25d751c75cacd7478614

Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Philip Tricca <flihp@twobit.us>
2016-03-17 02:37:55 +00:00
Stephen Smalley
b78255b9be libselinux: Only mount /proc if necessary
selinux upstream commit 5a8d8c499b2ef80eaa7b5abe2ec68d7101e613bf

Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Philip Tricca <flihp@twobit.us>
2016-03-17 02:37:00 +00:00
Stephen Smalley
5f0182e2e1 refpolicy: Add support for the SYSTEMD build.conf option.
refpolicy has introduced a new build.conf option, SYSTEMD=y,
to enable rules specific to using systemd as the init system.
In particular, without setting this option, rules for direct
domain transitions from init_t to daemon domains are not included
in the policy.  Define a POLICY_SYSTEMD variable in the refpolicy
common include file that can be set elsewhere to enable this support.

Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Philip Tricca <flihp@twobit.us>
2016-03-17 02:36:16 +00:00
Stephen Smalley
fad5528d09 refpolicy: update for change in libsemanage 2.5
libsemanage 2.5 renamed /var/lib/selinux/tmp to /var/lib/selinux/final;
update the refpolicy recipe accordingly.

Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Philip Tricca <flihp@twobit.us>
2016-03-17 02:35:46 +00:00
Stephen Smalley
85aa491a79 Delete include files for 20140506 and 20150202 releases.
These include files are no longer used by any .bb files.

Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Philip Tricca <flihp@twobit.us>
2016-03-17 02:35:28 +00:00
Stephen Smalley
12be51e1b9 secilc: Add recipe
SELinux Common Intermediate Language (CIL) policy compiler

Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Philip Tricca <flihp@twobit.us>
2016-03-17 02:34:05 +00:00
Stephen Smalley
d881686c3c sepolgen: uprev to 1.2.3 (20160223)
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Philip Tricca <flihp@twobit.us>
2016-03-17 02:33:33 +00:00
Stephen Smalley
05c431d6ce policycoreutils: uprev to 2.5 (20160223)
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Philip Tricca <flihp@twobit.us>
2016-03-17 02:30:11 +00:00
Stephen Smalley
25aaf83109 checkpolicy: uprev to 2.5 (20160223)
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Philip Tricca <flihp@twobit.us>
2016-03-17 02:29:15 +00:00
Stephen Smalley
338893a7a5 libsemanage: uprev to 2.5 (20160223)
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Philip Tricca <flihp@twobit.us>
2016-03-17 02:27:56 +00:00
Stephen Smalley
81c08f019b libselinux: uprev to 2.5 (20160223)
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Philip Tricca <flihp@twobit.us>
2016-03-17 02:25:04 +00:00
Stephen Smalley
06d8dac053 libsepol: uprev to 2.5 (release 20160223)
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Philip Tricca <flihp@twobit.us>
2016-03-17 02:22:31 +00:00