diff options
author | Mark Hatle <mark.hatle@windriver.com> | 2012-01-30 13:30:33 -0600 |
---|---|---|
committer | Mark Hatle <mark.hatle@windriver.com> | 2012-01-30 13:30:33 -0600 |
commit | 703b5afd0bdc98e78121f6e7bce1c540a7f4fb6d (patch) | |
tree | eed573ff83398e27e5c306c47c1e669e515ed224 | |
parent | f7c408c0be5cd3ef9f0677c6825dea64824c50f4 (diff) | |
download | meta-selinux-703b5afd0bdc98e78121f6e7bce1c540a7f4fb6d.tar.gz |
audit: Add the auditing subsystem package
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-rw-r--r-- | recipes-security/audit/audit/audit-python.patch | 31 | ||||
-rw-r--r-- | recipes-security/audit/audit/disable-ldap.patch | 54 | ||||
-rw-r--r-- | recipes-security/audit/audit_2.1.3.bb | 44 |
3 files changed, 129 insertions, 0 deletions
diff --git a/recipes-security/audit/audit/audit-python.patch b/recipes-security/audit/audit/audit-python.patch new file mode 100644 index 0000000..78fce01 --- /dev/null +++ b/recipes-security/audit/audit/audit-python.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | Remove hard coded python include directory | ||
2 | |||
3 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
4 | |||
5 | diff -ur audit-2.1.3.orig/bindings/python/Makefile.am audit-2.1.3/bindings/python/Makefile.am | ||
6 | --- audit-2.1.3.orig/bindings/python/Makefile.am 2011-08-15 12:31:01.000000000 -0500 | ||
7 | +++ audit-2.1.3/bindings/python/Makefile.am 2012-01-30 12:19:54.533959225 -0600 | ||
8 | @@ -25,7 +25,9 @@ | ||
9 | |||
10 | pyexec_LTLIBRARIES = auparse.la | ||
11 | |||
12 | +PYINC ?= /usr/include/python$(PYTHON_VERSION) | ||
13 | + | ||
14 | auparse_la_SOURCES = auparse_python.c | ||
15 | -auparse_la_CPPFLAGS = -I$(top_srcdir)/auparse $(AM_CPPFLAGS) -I/usr/include/python$(PYTHON_VERSION) -fno-strict-aliasing | ||
16 | +auparse_la_CPPFLAGS = -I$(top_srcdir)/auparse $(AM_CPPFLAGS) -I$(PYINC) -fno-strict-aliasing | ||
17 | auparse_la_LDFLAGS = -module -avoid-version -Wl,-z,relro | ||
18 | auparse_la_LIBADD = ../../auparse/libauparse.la ../../lib/libaudit.la | ||
19 | diff -ur audit-2.1.3.orig/swig/Makefile.am audit-2.1.3/swig/Makefile.am | ||
20 | --- audit-2.1.3.orig/swig/Makefile.am 2011-08-15 12:31:03.000000000 -0500 | ||
21 | +++ audit-2.1.3/swig/Makefile.am 2012-01-30 12:28:09.574834697 -0600 | ||
22 | @@ -23,7 +23,8 @@ | ||
23 | CONFIG_CLEAN_FILES = *.loT *.rej *.orig | ||
24 | AM_CFLAGS = -fPIC -DPIC -fno-strict-aliasing | ||
25 | PYLIBVER ?= python$(PYTHON_VERSION) | ||
26 | -INCLUDES = -I. -I$(top_builddir) -I${top_srcdir}/lib -I/usr/include/$(PYLIBVER) | ||
27 | +PYINC ?= /usr/include/$(PYLIBVER) | ||
28 | +INCLUDES = -I. -I$(top_builddir) -I${top_srcdir}/lib -I$(PYINC) | ||
29 | LIBS = $(top_builddir)/lib/libaudit.la | ||
30 | pyexec_PYTHON = audit.py | ||
31 | pyexec_LTLIBRARIES = _audit.la | ||
diff --git a/recipes-security/audit/audit/disable-ldap.patch b/recipes-security/audit/audit/disable-ldap.patch new file mode 100644 index 0000000..a1b0b93 --- /dev/null +++ b/recipes-security/audit/audit/disable-ldap.patch | |||
@@ -0,0 +1,54 @@ | |||
1 | Disable LDAP support | ||
2 | |||
3 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
4 | |||
5 | Disable LDAP support | ||
6 | |||
7 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
8 | |||
9 | diff -ur audit-2.1.3.orig/audisp/plugins/Makefile.am audit-2.1.3/audisp/plugins/Makefile.am | ||
10 | --- audit-2.1.3.orig/audisp/plugins/Makefile.am 2011-08-15 12:30:59.000000000 -0500 | ||
11 | +++ audit-2.1.3/audisp/plugins/Makefile.am 2012-01-30 12:04:19.986834936 -0600 | ||
12 | @@ -22,8 +22,10 @@ | ||
13 | |||
14 | CONFIG_CLEAN_FILES = *.loT *.rej *.orig | ||
15 | |||
16 | -SUBDIRS = builtins zos-remote remote | ||
17 | -#SUBDIRS = builtins zos-remote | ||
18 | +SUBDIRS = builtins remote | ||
19 | +if HAVE_LDAP | ||
20 | +SUBDIRS += zos-remote | ||
21 | +endif | ||
22 | if HAVE_PRELUDE | ||
23 | SUBDIRS += prelude | ||
24 | endif | ||
25 | diff -ur audit-2.1.3.orig/configure.ac audit-2.1.3/configure.ac | ||
26 | --- audit-2.1.3.orig/configure.ac 2011-08-15 12:30:58.000000000 -0500 | ||
27 | +++ audit-2.1.3/configure.ac 2012-01-30 12:09:54.933961471 -0600 | ||
28 | @@ -181,6 +181,12 @@ | ||
29 | fi | ||
30 | AM_CONDITIONAL(HAVE_PRELUDE, test x$have_prelude = xyes) | ||
31 | |||
32 | +AC_ARG_WITH(ldap, | ||
33 | +AS_HELP_STRING([--with-ldap],[enable zos-remote plugin, which requires ldap]), | ||
34 | +use_ldap=$withval, | ||
35 | +use_ldap=no) | ||
36 | +AM_CONDITIONAL(HAVE_LDAP, test x$have_ldap = xyes) | ||
37 | + | ||
38 | AC_MSG_CHECKING(whether to use libwrap) | ||
39 | AC_ARG_WITH(libwrap, | ||
40 | [ --with-libwrap[=PATH] Compile in libwrap (tcp_wrappers) support.], | ||
41 | diff -ur audit-2.1.3.orig/docs/Makefile.am audit-2.1.3/docs/Makefile.am | ||
42 | --- audit-2.1.3.orig/docs/Makefile.am 2011-08-15 12:31:01.000000000 -0500 | ||
43 | +++ audit-2.1.3/docs/Makefile.am 2012-01-30 12:05:49.352834294 -0600 | ||
44 | @@ -53,6 +53,8 @@ | ||
45 | ausearch_clear.3 \ | ||
46 | ausearch_next_event.3 ausearch_set_stop.3 \ | ||
47 | autrace.8 get_auditfail_action.3 set_aumessage_mode.3 \ | ||
48 | -audispd.8 audispd.conf.5 audispd-zos-remote.8 libaudit.conf.5 \ | ||
49 | -zos-remote.conf.5 | ||
50 | +audispd.8 audispd.conf.5 libaudit.conf.5 | ||
51 | |||
52 | +if HAVE_LDAP | ||
53 | +man_MANS += audispd-zos-remote.8 zos-remote.conf.5 | ||
54 | +endif | ||
diff --git a/recipes-security/audit/audit_2.1.3.bb b/recipes-security/audit/audit_2.1.3.bb new file mode 100644 index 0000000..7e6fac4 --- /dev/null +++ b/recipes-security/audit/audit_2.1.3.bb | |||
@@ -0,0 +1,44 @@ | |||
1 | SUMMARY = "User space tools for kernel auditing" | ||
2 | DESCRIPTION = "The audit package contains the user space utilities for \ | ||
3 | storing and searching the audit records generated by the audit subsystem \ | ||
4 | in the Linux kernel." | ||
5 | HOMEPAGE = "http://people.redhat.com/sgrubb/audit/" | ||
6 | SECTION = "base" | ||
7 | PR = "r1" | ||
8 | LICENSE = "GPLv2+ & LGPLv2+" | ||
9 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" | ||
10 | |||
11 | SRC_URI = "http://people.redhat.com/sgrubb/audit/audit-2.1.3.tar.gz \ | ||
12 | file://disable-ldap.patch \ | ||
13 | file://audit-python.patch" | ||
14 | |||
15 | inherit autotools | ||
16 | |||
17 | SRC_URI[md5sum] = "abf26e3ac09f666905c5636dd24611fa" | ||
18 | SRC_URI[sha256sum] = "1c61858d8ed299128aa6bd8e85bac758bfe33e61358d259e52acb7d961fee90e" | ||
19 | |||
20 | DEPENDS += "python tcp-wrappers libcap-ng linux-libc-headers (>= 2.6.30)" | ||
21 | |||
22 | EXTRA_OECONF += "--without-prelude --with-libwrap --enable-gssapi-krb5=no --disable-ldap --with-libcap-ng=yes" | ||
23 | |||
24 | EXTRA_OEMAKE += "PYLIBVER='python${PYTHON_BASEVERSION}' PYINC='${STAGING_INCDIR}/$(PYLIBVER)'" | ||
25 | |||
26 | SUMMARY_audispd-plugins = "Plugins for the audit event dispatcher" | ||
27 | DESCRIPTION_audispd-plugins = "The audispd-plugins package provides plugins for the real-time \ | ||
28 | interface to the audit system, audispd. These plugins can do things \ | ||
29 | like relay events to remote machines or analyze events for suspicious \ | ||
30 | behavior." | ||
31 | |||
32 | PACKAGES =+ "audispd-plugins ${PN}-libs" | ||
33 | PACKAGES += "${PN}-python" | ||
34 | |||
35 | FILES_${PN}-libs += "${sysconfdir}/libaudit.conf ${libdir}/libaudit.so.1* ${libdir}/libauparse.so.*" | ||
36 | FILES_${PN} += "${bindir} ${sbindir}" | ||
37 | FILES_audispd-plugins += "${sysconfdir}/audisp ${sbindir}/audisp*" | ||
38 | FILES_${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/*/.debug" | ||
39 | FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}" | ||
40 | |||
41 | do_install_append() { | ||
42 | rm -f ${D}/${libdir}/python${PYTHON_BASEVERSION}/site-packages/*.a | ||
43 | rm -f ${D}/${libdir}/python${PYTHON_BASEVERSION}/site-packages/*.la | ||
44 | } | ||