diff options
author | Yi Zhao <yi.zhao@windriver.com> | 2023-03-05 14:11:07 +0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2023-03-05 14:34:38 -0800 |
commit | 56db1cfb71cd09e9b20bfee431e8088753ab1f76 (patch) | |
tree | dc40f698ddfe7011929448c29efad16a6566df94 | |
parent | 836c50325949b3df9c8a790df4c151899d8a3a2d (diff) | |
download | meta-openembedded-56db1cfb71cd09e9b20bfee431e8088753ab1f76.tar.gz |
audit: drop version 2.8.5
Removed version 2.8.5, as the 2.8 series is no longer maintained since
2020.
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
5 files changed, 0 insertions, 405 deletions
diff --git a/meta-oe/recipes-security/audit/audit/0001-Add-substitue-functions-for-strndupa-rawmemchr.patch b/meta-oe/recipes-security/audit/audit/0001-Add-substitue-functions-for-strndupa-rawmemchr.patch deleted file mode 100644 index ed1c0e2b57..0000000000 --- a/meta-oe/recipes-security/audit/audit/0001-Add-substitue-functions-for-strndupa-rawmemchr.patch +++ /dev/null | |||
@@ -1,133 +0,0 @@ | |||
1 | From d5a4b800a696b8b8d2c0f0bad098b1a8ff94333f Mon Sep 17 00:00:00 2001 | ||
2 | From: Steve Grubb <sgrubb@redhat.com> | ||
3 | Date: Tue, 26 Feb 2019 18:33:33 -0500 | ||
4 | Subject: [PATCH] Add substitue functions for strndupa & rawmemchr | ||
5 | |||
6 | Upstream-Status: Backport | ||
7 | [https://github.com/linux-audit/audit-userspace/commit/d579a08bb1cde71f939c13ac6b2261052ae9f77e] | ||
8 | --- | ||
9 | auparse/auparse.c | 12 +++++++++++- | ||
10 | auparse/interpret.c | 9 ++++++++- | ||
11 | configure.ac | 14 +++++++++++++- | ||
12 | src/ausearch-lol.c | 12 +++++++++++- | ||
13 | 4 files changed, 43 insertions(+), 4 deletions(-) | ||
14 | |||
15 | diff --git a/auparse/auparse.c b/auparse/auparse.c | ||
16 | index 650db02..2e1c737 100644 | ||
17 | --- a/auparse/auparse.c | ||
18 | +++ b/auparse/auparse.c | ||
19 | @@ -1,5 +1,5 @@ | ||
20 | /* auparse.c -- | ||
21 | - * Copyright 2006-08,2012-17 Red Hat Inc., Durham, North Carolina. | ||
22 | + * Copyright 2006-08,2012-19 Red Hat Inc., Durham, North Carolina. | ||
23 | * All Rights Reserved. | ||
24 | * | ||
25 | * This library is free software; you can redistribute it and/or | ||
26 | @@ -1118,6 +1118,16 @@ static int str2event(char *s, au_event_t *e) | ||
27 | return 0; | ||
28 | } | ||
29 | |||
30 | +#ifndef HAVE_STRNDUPA | ||
31 | +static inline char *strndupa(const char *old, size_t n) | ||
32 | +{ | ||
33 | + size_t len = strnlen(old, n); | ||
34 | + char *tmp = alloca(len + 1); | ||
35 | + tmp[len] = 0; | ||
36 | + return memcpy(tmp, old, len); | ||
37 | +} | ||
38 | +#endif | ||
39 | + | ||
40 | /* Returns 0 on success and 1 on error */ | ||
41 | static int extract_timestamp(const char *b, au_event_t *e) | ||
42 | { | ||
43 | diff --git a/auparse/interpret.c b/auparse/interpret.c | ||
44 | index 51c4a5e..67b7b77 100644 | ||
45 | --- a/auparse/interpret.c | ||
46 | +++ b/auparse/interpret.c | ||
47 | @@ -853,6 +853,13 @@ err_out: | ||
48 | return print_escaped(id->val); | ||
49 | } | ||
50 | |||
51 | +// rawmemchr is faster. Let's use it if we have it. | ||
52 | +#ifdef HAVE_RAWMEMCHR | ||
53 | +#define STRCHR rawmemchr | ||
54 | +#else | ||
55 | +#define STRCHR strchr | ||
56 | +#endif | ||
57 | + | ||
58 | static const char *print_proctitle(const char *val) | ||
59 | { | ||
60 | char *out = (char *)print_escaped(val); | ||
61 | @@ -863,7 +870,7 @@ static const char *print_proctitle(const char *val) | ||
62 | // Proctitle has arguments separated by NUL bytes | ||
63 | // We need to write over the NUL bytes with a space | ||
64 | // so that we can see the arguments | ||
65 | - while ((ptr = rawmemchr(ptr, '\0'))) { | ||
66 | + while ((ptr = STRCHR(ptr, '\0'))) { | ||
67 | if (ptr >= end) | ||
68 | break; | ||
69 | *ptr = ' '; | ||
70 | diff --git a/configure.ac b/configure.ac | ||
71 | index 6e345f1..6f3007e 100644 | ||
72 | --- a/configure.ac | ||
73 | +++ b/configure.ac | ||
74 | @@ -1,7 +1,7 @@ | ||
75 | dnl | ||
76 | define([AC_INIT_NOTICE], | ||
77 | [### Generated automatically using autoconf version] AC_ACVERSION [ | ||
78 | -### Copyright 2005-18 Steve Grubb <sgrubb@redhat.com> | ||
79 | +### Copyright 2005-19 Steve Grubb <sgrubb@redhat.com> | ||
80 | ### | ||
81 | ### Permission is hereby granted, free of charge, to any person obtaining a | ||
82 | ### copy of this software and associated documentation files (the "Software"), | ||
83 | @@ -72,6 +72,18 @@ dnl; posix_fallocate is used in audisp-remote | ||
84 | AC_CHECK_FUNCS([posix_fallocate]) | ||
85 | dnl; signalfd is needed for libev | ||
86 | AC_CHECK_FUNC([signalfd], [], [ AC_MSG_ERROR([The signalfd system call is necessary for auditd]) ]) | ||
87 | +dnl; check if rawmemchr is available | ||
88 | +AC_CHECK_FUNCS([rawmemchr]) | ||
89 | +dnl; check if strndupa is available | ||
90 | +AC_LINK_IFELSE( | ||
91 | + [AC_LANG_SOURCE( | ||
92 | + [[ | ||
93 | + #define _GNU_SOURCE | ||
94 | + #include <string.h> | ||
95 | + int main() { (void) strndupa("test", 10); return 0; }]])], | ||
96 | + [AC_DEFINE(HAVE_STRNDUPA, 1, [Let us know if we have it or not])], | ||
97 | + [] | ||
98 | +) | ||
99 | |||
100 | ALLWARNS="" | ||
101 | ALLDEBUG="-g" | ||
102 | diff --git a/src/ausearch-lol.c b/src/ausearch-lol.c | ||
103 | index 5d17a72..758c33e 100644 | ||
104 | --- a/src/ausearch-lol.c | ||
105 | +++ b/src/ausearch-lol.c | ||
106 | @@ -1,6 +1,6 @@ | ||
107 | /* | ||
108 | * ausearch-lol.c - linked list of linked lists library | ||
109 | -* Copyright (c) 2008,2010,2014,2016 Red Hat Inc., Durham, North Carolina. | ||
110 | +* Copyright (c) 2008,2010,2014,2016,2019 Red Hat Inc., Durham, North Carolina. | ||
111 | * All Rights Reserved. | ||
112 | * | ||
113 | * This software may be freely redistributed and/or modified under the | ||
114 | @@ -152,6 +152,16 @@ static int compare_event_time(event *e1, event *e2) | ||
115 | return 0; | ||
116 | } | ||
117 | |||
118 | +#ifndef HAVE_STRNDUPA | ||
119 | +static inline char *strndupa(const char *old, size_t n) | ||
120 | +{ | ||
121 | + size_t len = strnlen(old, n); | ||
122 | + char *tmp = alloca(len + 1); | ||
123 | + tmp[len] = 0; | ||
124 | + return memcpy(tmp, old, len); | ||
125 | +} | ||
126 | +#endif | ||
127 | + | ||
128 | /* | ||
129 | * This function will look at the line and pick out pieces of it. | ||
130 | */ | ||
131 | -- | ||
132 | 2.17.1 | ||
133 | |||
diff --git a/meta-oe/recipes-security/audit/audit/0001-Make-IPX-packet-interpretation-dependent-on-the-ipx-header.patch b/meta-oe/recipes-security/audit/audit/0001-Make-IPX-packet-interpretation-dependent-on-the-ipx-header.patch deleted file mode 100644 index 054f50ab23..0000000000 --- a/meta-oe/recipes-security/audit/audit/0001-Make-IPX-packet-interpretation-dependent-on-the-ipx-header.patch +++ /dev/null | |||
@@ -1,65 +0,0 @@ | |||
1 | From 6b09724c69d91668418ddb3af00da6db6755208c Mon Sep 17 00:00:00 2001 | ||
2 | From: Steve Grubb <sgrubb@redhat.com> | ||
3 | Date: Thu, 2 Sep 2021 15:01:12 -0400 | ||
4 | Subject: [PATCH] Make IPX packet interpretation dependent on the ipx header | ||
5 | file existing | ||
6 | |||
7 | Upstream-Status: Backport [https://github.com/linux-audit/audit-userspace/commit/6b09724c69d91668418ddb3af00da6db6755208c.patch] | ||
8 | Comment: Remove one hunk from changelog file and refresh rest hunks as per codebase of audit_2.8.5 | ||
9 | Signed-off-by: Akash Hadke <akash.hadke@kpit.com> | ||
10 | --- | ||
11 | auparse/interpret.c | 8 ++++++-- | ||
12 | configure.ac | 6 ++++++ | ||
13 | 2 files changed, 12 insertions(+), 2 deletions(-) | ||
14 | |||
15 | diff --git a/auparse/interpret.c b/auparse/interpret.c | ||
16 | index 63829aa0e..6c316456d 100644 | ||
17 | --- a/auparse/interpret.c 2022-10-14 11:22:20.833880000 +0200 | ||
18 | +++ b/auparse/interpret.c 2022-10-14 11:35:13.196455950 +0200 | ||
19 | @@ -44,8 +44,10 @@ | ||
20 | #include <linux/ax25.h> | ||
21 | #include <linux/atm.h> | ||
22 | #include <linux/x25.h> | ||
23 | -#include <linux/if.h> // FIXME: remove when ipx.h is fixed | ||
24 | -#include <linux/ipx.h> | ||
25 | +#ifdef HAVE_IPX_HEADERS | ||
26 | + #include <linux/if.h> // FIXME: remove when ipx.h is fixed | ||
27 | + #include <linux/ipx.h> | ||
28 | +#endif | ||
29 | #include <linux/capability.h> | ||
30 | #include <sys/personality.h> | ||
31 | #include <sys/prctl.h> | ||
32 | @@ -1158,6 +1160,7 @@ | ||
33 | x->sax25_call.ax25_call[6]); | ||
34 | } | ||
35 | break; | ||
36 | +#ifdef HAVE_IPX_HEADERS | ||
37 | case AF_IPX: | ||
38 | { | ||
39 | const struct sockaddr_ipx *ip = | ||
40 | @@ -1167,6 +1170,7 @@ | ||
41 | str, ip->sipx_port, ip->sipx_network); | ||
42 | } | ||
43 | break; | ||
44 | +#endif | ||
45 | case AF_ATMPVC: | ||
46 | { | ||
47 | const struct sockaddr_atmpvc* at = | ||
48 | diff --git a/configure.ac b/configure.ac | ||
49 | index 8f541e4c0..005eb0b5b 100644 | ||
50 | --- a/configure.ac 2022-10-14 11:22:20.833880000 +0200 | ||
51 | +++ b/configure.ac 2022-10-14 11:36:32.391044084 +0200 | ||
52 | @@ -414,6 +414,12 @@ | ||
53 | AC_DEFINE_UNQUOTED(HAVE_LIBWRAP, [], Define if tcp_wrappers support is enabled ) | ||
54 | fi | ||
55 | |||
56 | +# linux/ipx.h - deprecated in 2018 | ||
57 | +AC_CHECK_HEADER(linux/ipx.h, ipx_headers=yes, ipx_headers=no) | ||
58 | +if test $ipx_headers = yes ; then | ||
59 | + AC_DEFINE(HAVE_IPX_HEADERS,1,[IPX packet interpretation]) | ||
60 | +fi | ||
61 | + | ||
62 | # See if we want to support lower capabilities for plugins | ||
63 | LIBCAP_NG_PATH | ||
64 | |||
65 | |||
diff --git a/meta-oe/recipes-security/audit/audit/0002-Fixed-swig-host-contamination-issue.patch b/meta-oe/recipes-security/audit/audit/0002-Fixed-swig-host-contamination-issue.patch deleted file mode 100644 index 39a090c83b..0000000000 --- a/meta-oe/recipes-security/audit/audit/0002-Fixed-swig-host-contamination-issue.patch +++ /dev/null | |||
@@ -1,62 +0,0 @@ | |||
1 | From 3467abce1f3cfc96f9bdace7c09d95218cbcaeb1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Li xin <lixin.fnst@cn.fujitsu.com> | ||
3 | Date: Sun, 19 Jul 2015 02:42:58 +0900 | ||
4 | Subject: [PATCH] audit: Fixed swig host contamination issue | ||
5 | |||
6 | The audit build uses swig to generate a python wrapper. | ||
7 | Unfortunately, the swig info file references host include | ||
8 | directories. Some of these were previously noticed and | ||
9 | eliminated, but the one fixed here was not. | ||
10 | |||
11 | Upstream-Status: Inappropriate [embedded specific] | ||
12 | |||
13 | Signed-off-by: Anders Hedlund <anders.hedlund@windriver.com> | ||
14 | Signed-off-by: Joe Slater <jslater@windriver.com> | ||
15 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
16 | |||
17 | Comment: Refresh hunk from auditswig.i to fix build with linux 5.17+ | ||
18 | Reference-Commit: ee3c680c3 audit: Upgrade to 3.0.8 and fix build with linux 5.17+ | ||
19 | Signed-off-by: Akash Hadke <akash.hadke@kpit.com> | ||
20 | Signed-off-by: Akash Hadke <hadkeakash4@gmail.com> | ||
21 | --- | ||
22 | bindings/swig/python3/Makefile.am | 3 ++- | ||
23 | bindings/swig/src/auditswig.i | 2 +- | ||
24 | 2 files changed, 3 insertions(+), 2 deletions(-) | ||
25 | |||
26 | diff --git a/bindings/swig/python3/Makefile.am b/bindings/swig/python3/Makefile.am | ||
27 | index 9938418..fa46aac 100644 | ||
28 | --- a/bindings/swig/python3/Makefile.am | ||
29 | +++ b/bindings/swig/python3/Makefile.am | ||
30 | @@ -22,6 +22,7 @@ | ||
31 | CONFIG_CLEAN_FILES = *.loT *.rej *.orig | ||
32 | AM_CFLAGS = -fPIC -DPIC -fno-strict-aliasing $(PYTHON3_CFLAGS) | ||
33 | AM_CPPFLAGS = -I. -I$(top_builddir) -I${top_srcdir}/lib $(PYTHON3_INCLUDES) | ||
34 | +STDINC ?= /usr/include | ||
35 | LIBS = $(top_builddir)/lib/libaudit.la | ||
36 | SWIG_FLAGS = -python -py3 -modern | ||
37 | SWIG_INCLUDES = -I. -I$(top_builddir) -I${top_srcdir}/lib $(PYTHON3_INCLUDES) | ||
38 | @@ -37,7 +38,7 @@ _audit_la_DEPENDENCIES =${top_srcdir}/lib/libaudit.h ${top_builddir}/lib/libaudi | ||
39 | _audit_la_LIBADD = ${top_builddir}/lib/libaudit.la | ||
40 | nodist__audit_la_SOURCES = audit_wrap.c | ||
41 | audit.py audit_wrap.c: ${srcdir}/../src/auditswig.i | ||
42 | - swig -o audit_wrap.c ${SWIG_FLAGS} ${SWIG_INCLUDES} ${srcdir}/../src/auditswig.i | ||
43 | + swig -o audit_wrap.c ${SWIG_FLAGS} ${SWIG_INCLUDES} -I$(STDINC) ${srcdir}/../src/auditswig.i | ||
44 | |||
45 | CLEANFILES = audit.py* audit_wrap.c *~ | ||
46 | |||
47 | diff --git a/bindings/swig/src/auditswig.i b/bindings/swig/src/auditswig.i | ||
48 | index 7ebb373..424fb68 100644 | ||
49 | --- a/bindings/swig/src/auditswig.i | ||
50 | +++ b/bindings/swig/src/auditswig.i | ||
51 | @@ -39,7 +39,7 @@ | ||
52 | #define __attribute(X) /*nothing*/ | ||
53 | typedef unsigned __u32; | ||
54 | typedef unsigned uid_t; | ||
55 | -%include "/usr/include/linux/audit.h" | ||
56 | +%include "../lib/audit.h" | ||
57 | #define __extension__ /*nothing*/ | ||
58 | #include <stdint.h> | ||
59 | %include "../lib/libaudit.h" | ||
60 | -- | ||
61 | 2.17.1 | ||
62 | |||
diff --git a/meta-oe/recipes-security/audit/audit/0003-Header-definitions-need-to-be-external-when-building.patch b/meta-oe/recipes-security/audit/audit/0003-Header-definitions-need-to-be-external-when-building.patch deleted file mode 100644 index f209e560bd..0000000000 --- a/meta-oe/recipes-security/audit/audit/0003-Header-definitions-need-to-be-external-when-building.patch +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | From 2938f46d318df4a09565db837b60bafd0300f858 Mon Sep 17 00:00:00 2001 | ||
2 | From: Steve Grubb <sgrubb@redhat.com> | ||
3 | Date: Fri, 10 Jan 2020 21:13:50 -0500 | ||
4 | Subject: [PATCH] Header definitions need to be external when building with | ||
5 | -fno-common (which is default in GCC 10) - Tony Jones | ||
6 | |||
7 | Upstream-Status: Backport | ||
8 | [https://github.com/linux-audit/audit-userspace/commit/017e6c6ab95df55f34e339d2139def83e5dada1f] | ||
9 | |||
10 | Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> | ||
11 | --- | ||
12 | src/ausearch-common.h | 2 +- | ||
13 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/src/ausearch-common.h b/src/ausearch-common.h | ||
16 | index 6669203..3040547 100644 | ||
17 | --- a/src/ausearch-common.h | ||
18 | +++ b/src/ausearch-common.h | ||
19 | @@ -50,7 +50,7 @@ extern pid_t event_pid; | ||
20 | extern int event_exact_match; | ||
21 | extern uid_t event_uid, event_euid, event_loginuid; | ||
22 | extern const char *event_tuid, *event_teuid, *event_tauid; | ||
23 | -slist *event_node_list; | ||
24 | +extern slist *event_node_list; | ||
25 | extern const char *event_comm; | ||
26 | extern const char *event_filename; | ||
27 | extern const char *event_hostname; | ||
28 | -- | ||
29 | 2.17.1 | ||
30 | |||
diff --git a/meta-oe/recipes-security/audit/audit_2.8.5.bb b/meta-oe/recipes-security/audit/audit_2.8.5.bb deleted file mode 100644 index f846b27f90..0000000000 --- a/meta-oe/recipes-security/audit/audit_2.8.5.bb +++ /dev/null | |||
@@ -1,115 +0,0 @@ | |||
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 | LICENSE = "GPL-2.0-or-later & LGPL-2.0-or-later" | ||
8 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" | ||
9 | |||
10 | SRC_URI = "git://github.com/linux-audit/${BPN}-userspace.git;branch=2.8_maintenance;protocol=https \ | ||
11 | file://0001-Add-substitue-functions-for-strndupa-rawmemchr.patch \ | ||
12 | file://0002-Fixed-swig-host-contamination-issue.patch \ | ||
13 | file://0003-Header-definitions-need-to-be-external-when-building.patch \ | ||
14 | file://auditd \ | ||
15 | file://auditd.service \ | ||
16 | file://audit-volatile.conf \ | ||
17 | file://0001-Make-IPX-packet-interpretation-dependent-on-the-ipx-header.patch \ | ||
18 | " | ||
19 | |||
20 | S = "${WORKDIR}/git" | ||
21 | SRCREV = "5fae55c1ad15b3cefe6890eba7311af163e9133c" | ||
22 | |||
23 | inherit autotools python3native update-rc.d systemd | ||
24 | |||
25 | UPDATERCPN = "auditd" | ||
26 | INITSCRIPT_NAME = "auditd" | ||
27 | INITSCRIPT_PARAMS = "defaults" | ||
28 | |||
29 | SYSTEMD_PACKAGES = "auditd" | ||
30 | SYSTEMD_SERVICE:auditd = "auditd.service" | ||
31 | |||
32 | DEPENDS = "python3 tcp-wrappers libcap-ng linux-libc-headers swig-native" | ||
33 | |||
34 | EXTRA_OECONF = "--without-prelude \ | ||
35 | --with-libwrap \ | ||
36 | --enable-gssapi-krb5=no \ | ||
37 | --with-libcap-ng=yes \ | ||
38 | --with-python3=yes \ | ||
39 | --libdir=${base_libdir} \ | ||
40 | --sbindir=${base_sbindir} \ | ||
41 | --without-python \ | ||
42 | --without-golang \ | ||
43 | --disable-zos-remote \ | ||
44 | --with-arm=yes \ | ||
45 | --with-aarch64=yes \ | ||
46 | " | ||
47 | |||
48 | EXTRA_OEMAKE = "PYLIBVER='python${PYTHON_BASEVERSION}' \ | ||
49 | PYINC='${STAGING_INCDIR}/$(PYLIBVER)' \ | ||
50 | pyexecdir=${libdir}/python${PYTHON_BASEVERSION}/site-packages \ | ||
51 | STDINC='${STAGING_INCDIR}' \ | ||
52 | pkgconfigdir=${libdir}/pkgconfig \ | ||
53 | " | ||
54 | |||
55 | SUMMARY:audispd-plugins = "Plugins for the audit event dispatcher" | ||
56 | DESCRIPTION:audispd-plugins = "The audispd-plugins package provides plugins for the real-time \ | ||
57 | interface to the audit system, audispd. These plugins can do things \ | ||
58 | like relay events to remote machines or analyze events for suspicious \ | ||
59 | behavior." | ||
60 | |||
61 | PACKAGES =+ "audispd-plugins" | ||
62 | PACKAGES += "auditd ${PN}-python" | ||
63 | |||
64 | FILES:${PN} = "${sysconfdir}/libaudit.conf ${base_libdir}/libaudit.so.1* ${base_libdir}/libauparse.so.*" | ||
65 | FILES:auditd = "${bindir}/* ${base_sbindir}/* ${sysconfdir}/*" | ||
66 | FILES:audispd-plugins = "${sysconfdir}/audisp/audisp-remote.conf \ | ||
67 | ${sysconfdir}/audisp/plugins.d/au-remote.conf \ | ||
68 | ${base_sbindir}/audisp-remote ${localstatedir}/spool/audit \ | ||
69 | " | ||
70 | FILES:${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/*/.debug" | ||
71 | FILES:${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}" | ||
72 | |||
73 | CONFFILES:auditd = "${sysconfdir}/audit/audit.rules" | ||
74 | RDEPENDS:auditd = "bash" | ||
75 | |||
76 | do_configure:prepend() { | ||
77 | sed -e 's|buf\[];|buf[0];|g' ${STAGING_INCDIR}/linux/audit.h > ${S}/lib/audit.h | ||
78 | sed -i -e 's|#include <linux/audit.h>|#include "audit.h"|g' ${S}/lib/libaudit.h | ||
79 | } | ||
80 | |||
81 | do_install:append() { | ||
82 | rm -f ${D}/${libdir}/python${PYTHON_BASEVERSION}/site-packages/*.a | ||
83 | rm -f ${D}/${libdir}/python${PYTHON_BASEVERSION}/site-packages/*.la | ||
84 | |||
85 | # reuse auditd config | ||
86 | [ ! -e ${D}/etc/default ] && mkdir ${D}/etc/default | ||
87 | mv ${D}/etc/sysconfig/auditd ${D}/etc/default | ||
88 | rmdir ${D}/etc/sysconfig/ | ||
89 | |||
90 | # replace init.d | ||
91 | install -D -m 0755 ${WORKDIR}/auditd ${D}/etc/init.d/auditd | ||
92 | rm -rf ${D}/etc/rc.d | ||
93 | |||
94 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | ||
95 | # install systemd unit files | ||
96 | install -d ${D}${systemd_unitdir}/system | ||
97 | install -m 0644 ${WORKDIR}/auditd.service ${D}${systemd_unitdir}/system | ||
98 | |||
99 | install -d ${D}${sysconfdir}/tmpfiles.d/ | ||
100 | install -m 0644 ${WORKDIR}/audit-volatile.conf ${D}${sysconfdir}/tmpfiles.d/ | ||
101 | fi | ||
102 | |||
103 | # audit-2.5 doesn't install any rules by default, so we do that here | ||
104 | mkdir -p ${D}/etc/audit ${D}/etc/audit/rules.d | ||
105 | cp ${S}/rules/10-base-config.rules ${D}/etc/audit/rules.d/audit.rules | ||
106 | |||
107 | chmod 750 ${D}/etc/audit ${D}/etc/audit/rules.d | ||
108 | chmod 640 ${D}/etc/audit/auditd.conf ${D}/etc/audit/rules.d/audit.rules | ||
109 | |||
110 | # Based on the audit.spec "Copy default rules into place on new installation" | ||
111 | cp ${D}/etc/audit/rules.d/audit.rules ${D}/etc/audit/audit.rules | ||
112 | |||
113 | # Create /var/spool/audit directory for audisp-remote | ||
114 | install -m 0700 -d ${D}${localstatedir}/spool/audit | ||
115 | } | ||