Commit Graph

213 Commits

Author SHA1 Message Date
Jackie Huang
b76b660fbf python-ipy: fix PN -> BPN in do_install for multilibs
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
2013-03-19 15:22:03 +08:00
Jackie Huang
5fe6c3b509 ustr: fix PN -> BPN in do_install for multilibs
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
2013-03-19 15:22:01 +08:00
Xin Ouyang
fcf1b5dd20 refpolicy: oe-core /var/log symlink policy for apache
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-03-19 11:08:09 +08:00
Xin Ouyang
498fefc3df refpolicy*: fix file contexts for many oe-core recipes
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-03-19 11:08:06 +08:00
Xin Ouyang
16e416914b libcap-ng: fix the QA issue for libcap-ng.so*
Some binaries in base_sbindir have libcap-ng.so* depends, so move
libcap-ng.so* to avoid QA warnings.

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-03-19 10:15:45 +08:00
Xin Ouyang
47562b06a3 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:29:59 +08:00
Xin Ouyang
83ac3f261e openssl: uprev to fit oe-core version
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-03-07 10:50:15 +08:00
Xin Ouyang
ffbc1f7bec 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:54:35 +08:00
Xin Ouyang
3a2dc3d9ef 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:27:32 +08:00
Xin Ouyang
04d056666e 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 16:03:45 +08:00
Xin Ouyang
47e15f0ce8 bind: use volatiles to create /var subdirs.
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-02-27 15:25:09 +08:00
Xin Ouyang
a3c5555f43 refpolicy: add selinux-config RDEPENDS
Conflicts:
	recipes-security/refpolicy/refpolicy_common.inc

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-02-27 15:09:09 +08:00
Xin Ouyang
7578086a9a 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 15:07:45 +08:00
Xin Ouyang
3355498cd6 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 15:07:43 +08:00
Xin Ouyang
fff54d6aaf policycoreutils: target build alway need libcgroup&libcap-ng
Target package policycoreutils-sandbox always needs libcgroup and
libcap-ng, so it should not be conditional.

Conflicts:
	recipes-security/selinux/policycoreutils.inc

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-02-17 18:21:50 +08:00
Xin Ouyang
9c0318eff4 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:20:35 +08:00
Xin Ouyang
e12ce49173 mesa-dri: inherit enable-selinux
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-31 13:38:25 +08:00
Xin Ouyang
ae1852b611 coreutils: inherit with-selinux
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-31 13:38:25 +08:00
Xin Ouyang
41e7b13a10 libxcb: inherit enable-selinux
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-31 13:38:25 +08:00
Xin Ouyang
4b56d933b6 gnupg: inherit enable-selinux
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-31 13:38:25 +08:00
Xin Ouyang
652135713c libcap-ng: remove old version
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-30 10:07:37 +08:00
wenzong.fan@windriver.com
b839b051ca sed: backport configure option with-selinux
Backport configure option with-selinux from master. If the feature
selinux is enabled, sed should depend on iti; Otherwise sed doesn't
need to depend on selinux at all.

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-29 16:30:01 +08:00
Xin Ouyang
b2eae27b18 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-28 14:36:52 +08:00
Xin Ouyang
7d957310f7 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-28 10:28:30 +08:00
Xin Ouyang
7df5874e00 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:09:17 +08:00
Xin Ouyang
1a71f91707 refpolicy: file contexts for alternatives of shadow
CQID: WIND00399962

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-22 15:40:29 +08:00
Xin Ouyang
206c977d7e policycoreutils: inherit selinux
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-22 14:45:29 +08:00
Xin Ouyang
f5d0f93a74 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:45 +08:00
Xin Ouyang
23e356d51b 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:00:02 +08:00
Xin Ouyang
97b15df9c8 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:51:43 +08:00
Xin Ouyang
c94293cff7 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:39 +08:00
Xin Ouyang
9470c41a96 refpolicy: change hard-coded paches
- /etc -> ${sysconfdir}
 - /usr/share -> ${datadir}

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-09 10:15:32 +08:00
Xin Ouyang
6520121b0c 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

Merged from msster, Conflicts:
	recipes-core/tinylogin/tinylogin_1.4.bbappend

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-09 10:04:53 +08:00
Xin Ouyang
8131763250 audit: enable auditd service for default runlevels
CQID: WIND00397456

Conflicts:
	recipes-security/audit/audit_2.2.1.bb

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-07 11:15:57 +08:00
Xin Ouyang
486f95c218 packages: inherit selinux
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-05 13:29:30 +08:00
Xin Ouyang
d95e5f6c0f packages: inherit with-selinux
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-05 13:28:03 +08:00
Xin Ouyang
e9b9a716ef packages: inherit enable-selinux
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-05 13:24:23 +08:00
Xin Ouyang
3b2a6313c4 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:15:56 +08:00
Xin Ouyang
8a9b6df2b5 selinux packages: create include files.
Create include files for selinux userspace packages:
 * checkpolicy.inc
 * libselinux.inc
 * libsemanage.inc
 * libsepol.inc
 * policycoreutils.inc
 * sepolgen.inc

Merge from master/danny branch.

Conflicts:
	recipes-security/selinux/libselinux_2.1.9.bb
	recipes-security/selinux/libselinux_git.bb
	recipes-security/selinux/policycoreutils_2.1.10.bb
	recipes-security/selinux/policycoreutils_git.bb

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-05 13:10:54 +08:00
Xin Ouyang
2e5fd8c5f2 libsemanage: fix path length limits.
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2012-12-25 13:53:41 +08:00
Xin Ouyang
43d72a26eb sed: fix parallel compile error with libselinux
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2012-12-20 09:52:56 +08:00
Roy.Li
801351e0e5 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:02:25 +08:00
Xin Ouyang
414b605322 checkpolicy+libsemanage: flex+bison native depends
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2012-11-30 16:43:26 +08:00
Xin Ouyang
c2f1cbb32b refpolicy: standard/mls policy should set UBAC=n
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2012-11-27 09:54:19 +08:00
Xin Ouyang
0b87503fc3 refpolicy: fix policy to allow nfsd works.
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2012-11-27 09:53:47 +08:00
Xin Ouyang
953ea3bbda 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:09:24 +08:00
Xin Ouyang
a06e1a5ff5 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:24:20 +08:00
Xin Ouyang
3ea789b1bb libpam: 1.1.5 not need sepermit patch
We should drop sepermit-add-DESTDIR-prefix.patch for version 1.1.5.

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2012-10-18 11:34:19 +08:00
Xin Ouyang
b6ecdd6b2a denzil branch still has no 3.4 kernel.
Revert "kernel: bbappend to enable SELinux, v3.4."

This reverts commit 34d9c62f9f.
2012-10-18 11:34:17 +08:00
Xin Ouyang
5f652812de revert packagegroup to task for denzil branch.
Revert "core-image-selinux: update task-* to packagegroup-*"

This reverts commit cab3eba614aad0dcc90ed5598b3d6ad510a2f3f0.
2012-10-18 11:34:17 +08:00