Commit Graph

218 Commits

Author SHA1 Message Date
Wenzong Fan
b385a892a2 meta-selinux: Add LAYERVERSION and LAYERDEPENDS
Add LAYERVERSION and LAYERDEPENDS to layer.conf

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
2013-03-15 13:19:08 +08:00
Xin Ouyang
ecf2c41951 sudo: uprev to 1.8.6p7 to fit oe-core
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-03-09 17:54:19 +08:00
Xin Ouyang
600f2b3a8f kernel: add linux-3.8 bbappend
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-03-09 17:54:13 +08:00
Xin Ouyang
23d99ebc3f kernel: remove 3.0 bbappend to fit oe-core
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-03-09 17:54:03 +08:00
Xin Ouyang
e5b9f49048 refpolicy: two patches for nfs-kernel-server
We still miss some rules for nfsd to bind on nfs ports, so add a patch
to fix this. oe-core changed nfsd to use portmap, so also fix file
contexts for portmap.

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-03-09 16:27:05 +08:00
Xin Ouyang
7ff7d24aad sudo: uprev to fit oe-core version
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-03-07 10:48:57 +08:00
Xin Ouyang
439f31c81e initscript: append restorecon lines instead of a final script
Current meta-selinux provides a populate-volatile.sh for adding
restorecon lines to the oe-core script.

If other meta layers would add a new populate-volatile.sh, it will
override the oe-core and meta-selinux ones and cause selinux issues.
So append restorecon lines to the original script instead of a
final script.

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-03-05 09:52:08 +08:00
Xin Ouyang
11d62e4a07 bind: restore rndc.key security context
rndc.key would be labeled with wrong named_zone_t inherited from
/etc/bind while creating, so restorecon on it.

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-03-02 14:26:34 +08:00
Xin Ouyang
e77a2aabb6 augeas: uprev to oe-core version
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-03-01 14:31:25 +08:00
Xin Ouyang
462d217039 swig: add native wrapper for SWIGLIB
Native swig will read datas from hard-coded SWIGLIB or the same
environment variable.

While using sstate, the hard-coded SWIGLIB will point to the project
that create original sstates. This would cause build issues, so add
a wrapper to set the environment variable SWIGLIB to a relative path
on current sysroot.

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-02-27 15:56:37 +08:00
Xin Ouyang
0c2d3c680b bind: use volatiles to create /var subdirs.
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-02-27 15:15:49 +08:00
Xin Ouyang
4f2f74b781 refpolicy: add selinux-config RDEPENDS
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-02-27 15:05:00 +08:00
Xin Ouyang
30dfd0cd94 refpolicy: fix file contexts for bind
Some files of bind are not installed to default pathes, fix the
security contexts for these files.

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-02-27 14:47:37 +08:00
Xin Ouyang
10754edb75 refpolicy: add rules for /var/cache symlink
/var/cache is a symlink in poky, so we need allow rules for files to
read lnk_file while doing search/list/delete/rw.. in /var/cache/
directory.

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-02-27 14:45:52 +08:00
Xin Ouyang
e558dba5db packages: uprev bbappends to fit oe-core
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-02-22 18:13:27 +08:00
Xin Ouyang
eaf80edec1 policycoreutils: target build alway need libcgroup&libcap-ng
Target package policycoreutils-sandbox always needs libcgroup and
libcap-ng, so it should not be conditional.

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-02-17 18:19:31 +08:00
Xin Ouyang
3570272cd7 libsemanage: fix incorrect path for nologin
shadow package of oe-core and Debian has installed nologin into
/usr/sbin, so fix this path.

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-02-17 18:19:01 +08:00
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