Commit Graph

1051 Commits

Author SHA1 Message Date
Xin Ouyang
547150199a mesa-dri: inherit enable-selinux
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-31 13:44:51 +08:00
Xin Ouyang
0f2d1bcd4d coreutils: inherit with-selinux
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-31 13:42:35 +08:00
Xin Ouyang
615c38b394 libxcb: inherit enable-selinux
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-31 13:42:28 +08:00
Xin Ouyang
14749f3fe6 gnupg: inherit enable-selinux
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-31 13:40:00 +08:00
Xin Ouyang
66ef1caf8e libcap-ng: remove old version
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-30 10:06:28 +08:00
Xin Ouyang
21cfb8ba36 rpm: inherit with-selinux
We should also enable selinux only for target rpm, so inherit
with-selinux.

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-29 15:26:03 +08:00
Xin Ouyang
332be21065 setools: fix incorrect PYTHON_LDFLAGS.
PYTHON_LDFLAGS is considered as the full path of libpython2.7.so,
dirname of the .so file will be expanded into -L<DIR>. As a result,
current PYTHON_LDFLAGS cause this compile result:
 ${CC} ... -L-LXXX/tmp/sysroots/qemux86-64/usr/lib64
     -L-lapol -lqpol -o _sesearch.so
So "-lapol" is ignored, fix this.

CQID: WIND00400717

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-24 19:47:38 +08:00
Xin Ouyang
a1d632a26f refpolicy: policy fixes for seutils and auditd_log_t
Two patches to fix these two issue:
* Current policy has incomplete allow rules for selinux utils to
manage selinux config files and policy store.
* auditd_log_t(/var/log/audit/audit.log) is also placed in
var_log_t, so add related rules.

CQID: WIND00396415

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-23 11:10:17 +08:00
Xin Ouyang
b0f4055b70 refpolicy: file contexts for alternatives of shadow
CQID: WIND00399962

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-22 15:39:57 +08:00
Xin Ouyang
6079c073b6 policycoreutils: inherit selinux
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-22 14:43:13 +08:00
Xin Ouyang
2632759938 audit: admin tools&daemons install to base_sbindir
audit admin tools and daemons should install to base_sbindir, so
they can get correct security labels after selinux restorecon
command.

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-22 10:44:20 +08:00
Xin Ouyang
393e22b3c9 sed: inherit with-selinux for new version
sed-4.2.2 now has new configure option --with-selinux,
so inherit with-selinux bbclass.
Also, remove the patch since new version fix the issue.

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-19 16:34:17 +08:00
Xin Ouyang
becdc022eb packages: uprev bbappends to fit oe-core
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-19 16:34:14 +08:00
Xin Ouyang
f11604ac92 glib-2.0: config option should be --enable-selinux
--with-selinux is consided as unrecognized option while
do_configure, so change it to --enable-selinux,

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-18 15:01:04 +08:00
Xin Ouyang
8d481d76a9 python: disable exit handler to rw history file
oe-core adds a exit handler to rw python command history file
(~/.python-history). There are no allow rules for every user&role
to use create/read/write ~/.python-history, and it is also
improper to add rules because these rules would blow up the
user&role's scope of authority.

So disable the handler, if selinux enabled.

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-18 14:50:36 +08:00
Xin Ouyang
4766a54dd8 refpolicy: add user_tty_device_t into customizable_types
Add user_tty_device_t as a customizable_type, so that restorecon -R
/dev will not complain about it or modify the security labels.

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-09 10:15:58 +08:00
Xin Ouyang
8c0725155d refpolicy: change hard-coded paches
- /etc -> ${sysconfdir}
 - /usr/share -> ${datadir}

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-09 10:15:56 +08:00
Xin Ouyang
c6c13c4aa2 tinylogin: add passwd alternative
In meta-selinux layer, tinylogin links are installed as script
wrappers instead of symlinks to get their security labels.
So, they should use alternatives if there are same commands provided
by other packages.

passwd -> passwd.tinylogin
       -> passwd.shadow

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-07 18:07:00 +08:00
Xin Ouyang
1a556fd26c audit: enable auditd service for default runlevels
CQID: WIND00397456

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-07 10:50:16 +08:00
Xin Ouyang
098ad74b7c selinux.bbclass: nativesdk- prefix to fit oe-core master.
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-07 10:47:22 +08:00
Xin Ouyang
44f43e02bd packages: inherit selinux
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-05 14:00:29 +08:00
Xin Ouyang
d95d951a0e packages: inherit with-selinux
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-05 14:00:24 +08:00
Xin Ouyang
5abfe148ef packages: inherit enable-selinux
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-05 13:42:22 +08:00
Xin Ouyang
b493530bff layer: add selinux/audit bbclasses
Add bbclasses only for target packages to enable selinux support,
not native/nativesdk/cross/crosssdk pacakges.

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-05 13:14:00 +08:00
Xin Ouyang
17335d322c selinux packages: create include files.
Create include files for selinux userspace packages:
 * checkpolicy.inc
 * libselinux.inc
 * libsemanage.inc
 * libsepol.inc
 * policycoreutils.inc
 * sepolgen.inc

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-05 13:12:57 +08:00
Xin Ouyang
1f3b70427c libsemanage: fix path length limits.
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2012-12-25 11:20:42 +08:00
Xin Ouyang
104f048221 sed: fix parallel compile error with libselinux
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2012-12-19 19:00:02 +08:00
Xin Ouyang
1372e7b7d2 util-linux: fix build failures for version 2.22.1.
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2012-12-12 18:18:00 +08:00
Roy.Li
8012906613 policycoreutils: install init script under /etc/init.d/
Signed-off-by: Roy.Li <rongqing.li@windriver.com>
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2012-12-12 10:00:56 +08:00
Xin Ouyang
1c285bd0e7 libcgroup: remove the SRC_URI to fit oe-core
oe-core has fixed this by commit
    9a97367038a1e2431bf94211dabbc5aedbbee3bb

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2012-12-11 14:49:47 +08:00
Xin Ouyang
cd321edab3 glib-2.0,util-linux: uprev to oe-core version.
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2012-12-05 11:17:46 +08:00
Xin Ouyang
8fc66056eb libcgroup: fix hard coded /lib to ${base_libdir}
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2012-12-05 10:45:05 +08:00
Xin Ouyang
99d2fd6fbd checkpolicy+libsemanage: flex+bison native depends
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2012-11-29 15:04:19 +08:00
Xin Ouyang
71bed4c424 glib-2.0/psmisc: uprev to oe-core version
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2012-11-27 10:20:14 +08:00
Xin Ouyang
d72b55bc20 refpolicy: standard/mls policy should set UBAC=n
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2012-11-26 18:46:00 +08:00
Xin Ouyang
6398c194e3 refpolicy: fix policy to allow nfsd works.
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2012-11-26 18:45:48 +08:00
Xin Ouyang
d2711cfdb2 selinux-config: update the init script
Fix the hard-coded security type for /dev/null and /dev/console.
Check rootfs if support xattrs before do relabel.

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2012-11-19 11:06:05 +08:00
Xin Ouyang
43a177fe97 refpolicy*: make to use pythonnative
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2012-11-08 10:54:16 +08:00
Xin Ouyang
731966a462 udev: uprev to oe-core version 182.
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2012-11-07 14:22:00 +08:00
Xin Ouyang
130f05b4e5 libcgroup: add bbappend and remove bb files
libcgroup is placed in oe-core now.
http://git.openembedded.org/openembedded-core/commit/?id=6ef8e6f2f9b0583fa0881e0dfc52462405b21ede

So remove bb files from meta-selinux and add bbappend.

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2012-11-07 10:12:25 +08:00
Xin Ouyang
086f7391b4 policycoreutils: backport to remove empty po files
et, gl, and id .po files contained no translations.  This can cause
build errors.  Delete those puppies.

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2012-11-01 14:08:03 +08:00
Xin Ouyang
38fbdd436c kernel: default enable selinux for this layer.
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2012-10-18 11:07:45 +08:00
Xin Ouyang
8c50123a85 setools: add libxml2 DEPENDS.
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2012-10-18 11:07:45 +08:00
Xin Ouyang
7b8bc16b38 openssl: disable execstack in CFLAG
"-Wa,--noexecstack" will mark objects as requiring executable stack,
this is a dangerous CFLAG and would cause security issues.

So disable it as most distros did.

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2012-10-18 11:07:45 +08:00
Xin Ouyang
3b2088b2bd selinux-config: add init script
This script will be installed as 0selinux-init, in runlevel S and
sequence number 0. It will start before any other init script.

* relabel /dev for restorecon/fixfiles running
* rebuild policy and relabel the rootfs if /.autorelabel placed.
* relabel the rootfs if it is first booting.

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2012-10-18 11:07:45 +08:00
Xin Ouyang
ad05ee2495 document: add FAQ file for selinux
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2012-10-18 11:07:44 +08:00
Xin Ouyang
72ae047573 core-image-selinux: update task-* to packagegroup-*
oe-core has changed task-* recipes to packagegroup-*, so we should
follow this.

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2012-10-18 11:07:44 +08:00
Xin Ouyang
c8b060cb5d tinylogin: create script wrappers for selinux
Symlink can not execute will security contexts, so create script
wrappers for tinylogin commands instead of symlinks.

Also add tinylogin's login command as a alternative.

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2012-10-18 11:07:44 +08:00
Xin Ouyang
a11a0f7d08 lsof: version 4.86 for oe-core uprev.
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2012-10-18 11:07:44 +08:00
Xin Ouyang
6845442c3c udev: initscript restore security context for /dev
Poky/oe-core has set CONFIG_DEVTMPFS_MOUNT=y for kernel to mount
/dev with devtmpfs itself.

With MLS policy, kernel is running in s15:c0.c1023 level, so /dev
will be relabeled to this high level too.
This will cause processes running with low levels can not visit
/dev directory.

So, we just run restorecon /dev to fix this.

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2012-10-18 11:07:44 +08:00