Commit Graph

216 Commits

Author SHA1 Message Date
Xin Ouyang
0dc23a15ad Update maintainer list.
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-06-14 17:33:26 +08:00
Xin Ouyang
9a1d9e8284 openssl: remove bbappend since oe-core merged
oe-core has used "-Wa,--noexecstack" in CFLAG not only for native
now, so the bbappend should be removed.

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/meta/recipes-connectivity/openssl/openssl.inc?id=4fb837687dd68363f25fbfc15207dd05d1369661

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-04-16 10:23:59 +08:00
Xin Ouyang
7b3f6a003c shadow/openssh: use pam_selinux only if target_selinux enabled
We add pam conf files for login/sshd to use pam_selinux module. When
selinux is not in DISTRO_FEATURES, pam-plugin-selinux would not be
built, this will cause runtime errors to not allow users to login in
on the console or ssh.
Use @target_selinux() to enable these pam conf files conditionally.

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-04-15 10:43:53 +08:00
Xin Ouyang
f63df30423 audit: use generated headers for cross compiling
Default audit Makefile will generate native executables in lib/ and
auparse/, which are named as gen_*_h and run on the hosts to create
*_tables.h/*tabs.h header files for the targets.

This is inappropriate for our cross compiling because they need
linux-libc-headers from the host.

Even worse, on some old hosts, build will fail because some .h files
in the old linux-libc-headers (<= 2.6.29) has incomplete DEFINE lists
for the audit system.

So add *tables.h/*tabs.h header files which are generated from
linux-libc-headers-3.4, and do not generate and run those native
executables.

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-04-02 16:57:55 +08:00
Xin Ouyang
52bdaacfe0 selinux.bbclass: nativesdk- prefix to fit oe-core danny.
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-03-21 11:34:50 +08:00
Jackie Huang
77e40abaf8 python-ipy: fix PN -> BPN in do_install for multilibs
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
2013-03-19 15:21:52 +08:00
Jackie Huang
ec49a4cabc ustr: fix PN -> BPN in do_install for multilibs
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
2013-03-19 15:21:50 +08:00
Xin Ouyang
7448b9eced refpolicy: oe-core /var/log symlink policy for apache
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-03-19 11:06:14 +08:00
Xin Ouyang
a2706ae154 refpolicy*: fix file contexts for many oe-core recipes
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-03-19 11:04:06 +08:00
Xin Ouyang
b7b8b3dcd4 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:16:00 +08:00
Xin Ouyang
fe4aaacf70 python,mesa-dri,gnupg: uprev to fit oe-core versions
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-03-15 13:42:39 +08:00
Wenzong Fan
1dce222f1e 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:39:50 +08:00
Xin Ouyang
eded5da1ef 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:30:06 +08:00
Xin Ouyang
0ae101d694 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:25 +08:00
Xin Ouyang
f3939db3ef 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-01 16:47:33 +08:00
Xin Ouyang
178d0fbbb3 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:18 +08:00
Xin Ouyang
db4bb99eb4 bind: use volatiles to create /var subdirs.
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-02-27 15:25:27 +08:00
Xin Ouyang
8025c76eb8 refpolicy: add selinux-config RDEPENDS
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-02-27 15:07:30 +08:00
Xin Ouyang
5d4de81ac2 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:22 +08:00
Xin Ouyang
2e06169375 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:13 +08:00
Xin Ouyang
20d4021bf9 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:20:08 +08:00
Xin Ouyang
c15248755c 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:18:31 +08:00
Xin Ouyang
aca822547a mesa-dri: inherit enable-selinux
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-31 13:33:57 +08:00
Xin Ouyang
e949a81e26 coreutils: inherit with-selinux
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-31 13:33:48 +08:00
Xin Ouyang
ce256e9e15 libxcb: inherit enable-selinux
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-31 13:33:39 +08:00
Xin Ouyang
1f493973db gnupg: inherit enable-selinux
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-31 13:33:31 +08:00
Xin Ouyang
32a321f8ac libcap-ng: remove old version
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-30 10:05:58 +08:00
wenzong.fan@windriver.com
5be5499088 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:28:50 +08:00
Xin Ouyang
dc26c78550 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:15 +08:00
Xin Ouyang
a1c573dada 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:27:59 +08:00
Xin Ouyang
760ab51657 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:09 +08:00
Xin Ouyang
db794bb486 refpolicy: file contexts for alternatives of shadow
CQID: WIND00399962

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-22 15:40:18 +08:00
Xin Ouyang
6832322f55 policycoreutils: inherit selinux
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-22 14:43:00 +08:00
Xin Ouyang
4692a1c8b5 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:43:53 +08:00
Xin Ouyang
5d4430dc89 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:15 +08:00
Xin Ouyang
12ea2fd4ac 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-17 16:57:11 +08:00
Xin Ouyang
f318aa1eca 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:16:10 +08:00
Xin Ouyang
659eff3f43 refpolicy: change hard-coded paches
- /etc -> ${sysconfdir}
 - /usr/share -> ${datadir}

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-09 10:16:08 +08:00
Xin Ouyang
69a70058a9 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-09 10:00:52 +08:00
Xin Ouyang
c5b0d54947 audit: enable auditd service for default runlevels
CQID: WIND00397456

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-07 11:14:41 +08:00
Xin Ouyang
44da84571e packages: inherit selinux
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-05 13:40:05 +08:00
Xin Ouyang
5d6c4f736f packages: inherit with-selinux
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-05 13:39:56 +08:00
Xin Ouyang
383acf125a packages: inherit enable-selinux
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-05 13:39:26 +08:00
Xin Ouyang
5bb5b617ae 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:36:44 +08:00
Xin Ouyang
fb4ced7ba1 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 12:58:14 +08:00
Xin Ouyang
1ce1b81c00 libsemanage: fix path length limits.
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2012-12-25 13:53:30 +08:00
Xin Ouyang
e4415049db sed: fix parallel compile error with libselinux
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2012-12-20 09:53:04 +08:00
Roy.Li
2f6f6d668b 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:14 +08:00
Xin Ouyang
f7db837389 libcgroup: fix hard coded /lib to ${base_libdir}
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2012-12-05 09:44:51 +08:00
Xin Ouyang
12416a6d67 checkpolicy+libsemanage: flex+bison native depends
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2012-11-30 16:44:14 +08:00