From 703b5afd0bdc98e78121f6e7bce1c540a7f4fb6d Mon Sep 17 00:00:00 2001 From: Mark Hatle Date: Mon, 30 Jan 2012 13:30:33 -0600 Subject: audit: Add the auditing subsystem package Signed-off-by: Mark Hatle --- recipes-security/audit/audit/audit-python.patch | 31 ++++++++++++++ recipes-security/audit/audit/disable-ldap.patch | 54 +++++++++++++++++++++++++ recipes-security/audit/audit_2.1.3.bb | 44 ++++++++++++++++++++ 3 files changed, 129 insertions(+) create mode 100644 recipes-security/audit/audit/audit-python.patch create mode 100644 recipes-security/audit/audit/disable-ldap.patch create mode 100644 recipes-security/audit/audit_2.1.3.bb 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 @@ +Remove hard coded python include directory + +Signed-off-by: Mark Hatle + +diff -ur audit-2.1.3.orig/bindings/python/Makefile.am audit-2.1.3/bindings/python/Makefile.am +--- audit-2.1.3.orig/bindings/python/Makefile.am 2011-08-15 12:31:01.000000000 -0500 ++++ audit-2.1.3/bindings/python/Makefile.am 2012-01-30 12:19:54.533959225 -0600 +@@ -25,7 +25,9 @@ + + pyexec_LTLIBRARIES = auparse.la + ++PYINC ?= /usr/include/python$(PYTHON_VERSION) ++ + auparse_la_SOURCES = auparse_python.c +-auparse_la_CPPFLAGS = -I$(top_srcdir)/auparse $(AM_CPPFLAGS) -I/usr/include/python$(PYTHON_VERSION) -fno-strict-aliasing ++auparse_la_CPPFLAGS = -I$(top_srcdir)/auparse $(AM_CPPFLAGS) -I$(PYINC) -fno-strict-aliasing + auparse_la_LDFLAGS = -module -avoid-version -Wl,-z,relro + auparse_la_LIBADD = ../../auparse/libauparse.la ../../lib/libaudit.la +diff -ur audit-2.1.3.orig/swig/Makefile.am audit-2.1.3/swig/Makefile.am +--- audit-2.1.3.orig/swig/Makefile.am 2011-08-15 12:31:03.000000000 -0500 ++++ audit-2.1.3/swig/Makefile.am 2012-01-30 12:28:09.574834697 -0600 +@@ -23,7 +23,8 @@ + CONFIG_CLEAN_FILES = *.loT *.rej *.orig + AM_CFLAGS = -fPIC -DPIC -fno-strict-aliasing + PYLIBVER ?= python$(PYTHON_VERSION) +-INCLUDES = -I. -I$(top_builddir) -I${top_srcdir}/lib -I/usr/include/$(PYLIBVER) ++PYINC ?= /usr/include/$(PYLIBVER) ++INCLUDES = -I. -I$(top_builddir) -I${top_srcdir}/lib -I$(PYINC) + LIBS = $(top_builddir)/lib/libaudit.la + pyexec_PYTHON = audit.py + 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 @@ +Disable LDAP support + +Signed-off-by: Mark Hatle + +Disable LDAP support + +Signed-off-by: Mark Hatle + +diff -ur audit-2.1.3.orig/audisp/plugins/Makefile.am audit-2.1.3/audisp/plugins/Makefile.am +--- audit-2.1.3.orig/audisp/plugins/Makefile.am 2011-08-15 12:30:59.000000000 -0500 ++++ audit-2.1.3/audisp/plugins/Makefile.am 2012-01-30 12:04:19.986834936 -0600 +@@ -22,8 +22,10 @@ + + CONFIG_CLEAN_FILES = *.loT *.rej *.orig + +-SUBDIRS = builtins zos-remote remote +-#SUBDIRS = builtins zos-remote ++SUBDIRS = builtins remote ++if HAVE_LDAP ++SUBDIRS += zos-remote ++endif + if HAVE_PRELUDE + SUBDIRS += prelude + endif +diff -ur audit-2.1.3.orig/configure.ac audit-2.1.3/configure.ac +--- audit-2.1.3.orig/configure.ac 2011-08-15 12:30:58.000000000 -0500 ++++ audit-2.1.3/configure.ac 2012-01-30 12:09:54.933961471 -0600 +@@ -181,6 +181,12 @@ + fi + AM_CONDITIONAL(HAVE_PRELUDE, test x$have_prelude = xyes) + ++AC_ARG_WITH(ldap, ++AS_HELP_STRING([--with-ldap],[enable zos-remote plugin, which requires ldap]), ++use_ldap=$withval, ++use_ldap=no) ++AM_CONDITIONAL(HAVE_LDAP, test x$have_ldap = xyes) ++ + AC_MSG_CHECKING(whether to use libwrap) + AC_ARG_WITH(libwrap, + [ --with-libwrap[=PATH] Compile in libwrap (tcp_wrappers) support.], +diff -ur audit-2.1.3.orig/docs/Makefile.am audit-2.1.3/docs/Makefile.am +--- audit-2.1.3.orig/docs/Makefile.am 2011-08-15 12:31:01.000000000 -0500 ++++ audit-2.1.3/docs/Makefile.am 2012-01-30 12:05:49.352834294 -0600 +@@ -53,6 +53,8 @@ + ausearch_clear.3 \ + ausearch_next_event.3 ausearch_set_stop.3 \ + autrace.8 get_auditfail_action.3 set_aumessage_mode.3 \ +-audispd.8 audispd.conf.5 audispd-zos-remote.8 libaudit.conf.5 \ +-zos-remote.conf.5 ++audispd.8 audispd.conf.5 libaudit.conf.5 + ++if HAVE_LDAP ++man_MANS += audispd-zos-remote.8 zos-remote.conf.5 ++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 @@ +SUMMARY = "User space tools for kernel auditing" +DESCRIPTION = "The audit package contains the user space utilities for \ +storing and searching the audit records generated by the audit subsystem \ +in the Linux kernel." +HOMEPAGE = "http://people.redhat.com/sgrubb/audit/" +SECTION = "base" +PR = "r1" +LICENSE = "GPLv2+ & LGPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" + +SRC_URI = "http://people.redhat.com/sgrubb/audit/audit-2.1.3.tar.gz \ + file://disable-ldap.patch \ + file://audit-python.patch" + +inherit autotools + +SRC_URI[md5sum] = "abf26e3ac09f666905c5636dd24611fa" +SRC_URI[sha256sum] = "1c61858d8ed299128aa6bd8e85bac758bfe33e61358d259e52acb7d961fee90e" + +DEPENDS += "python tcp-wrappers libcap-ng linux-libc-headers (>= 2.6.30)" + +EXTRA_OECONF += "--without-prelude --with-libwrap --enable-gssapi-krb5=no --disable-ldap --with-libcap-ng=yes" + +EXTRA_OEMAKE += "PYLIBVER='python${PYTHON_BASEVERSION}' PYINC='${STAGING_INCDIR}/$(PYLIBVER)'" + +SUMMARY_audispd-plugins = "Plugins for the audit event dispatcher" +DESCRIPTION_audispd-plugins = "The audispd-plugins package provides plugins for the real-time \ +interface to the audit system, audispd. These plugins can do things \ +like relay events to remote machines or analyze events for suspicious \ +behavior." + +PACKAGES =+ "audispd-plugins ${PN}-libs" +PACKAGES += "${PN}-python" + +FILES_${PN}-libs += "${sysconfdir}/libaudit.conf ${libdir}/libaudit.so.1* ${libdir}/libauparse.so.*" +FILES_${PN} += "${bindir} ${sbindir}" +FILES_audispd-plugins += "${sysconfdir}/audisp ${sbindir}/audisp*" +FILES_${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/*/.debug" +FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}" + +do_install_append() { + rm -f ${D}/${libdir}/python${PYTHON_BASEVERSION}/site-packages/*.a + rm -f ${D}/${libdir}/python${PYTHON_BASEVERSION}/site-packages/*.la +} -- cgit v1.2.3-54-g00ecf