Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/musl:master commit in: sys-process/audit/, sys-process/audit/files/
Date: Tue, 07 Dec 2021 07:28:46
Message-Id: 1638861918.7b784626d7ea683cdf32f7f2cfd0eefdc3f58bcf.sam@gentoo
1 commit: 7b784626d7ea683cdf32f7f2cfd0eefdc3f58bcf
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Tue Dec 7 07:25:14 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Tue Dec 7 07:25:18 2021 +0000
6 URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=7b784626
7
8 sys-process/audit: treeclean (::gentoo works)
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 sys-process/audit/Manifest | 5 -
13 sys-process/audit/audit-2.7.1.ebuild | 232 --------------------
14 sys-process/audit/audit-2.8.3.ebuild | 232 --------------------
15 sys-process/audit/audit-2.8.4.ebuild | 233 ---------------------
16 sys-process/audit/audit-2.8.5-r1.ebuild | 219 -------------------
17 .../audit/files/audit-2.1.3-ia64-compile-fix.patch | 212 -------------------
18 sys-process/audit/files/audit-2.4.3-python.patch | 46 ----
19 sys-process/audit/files/audit-2.7.1-musl.patch | 173 ---------------
20 sys-process/audit/files/audit-2.7.1-swig.patch | 11 -
21 sys-process/audit/files/audit-2.8.2-musl.patch | 149 -------------
22 .../audit/files/audit-2.8.4-ia64-compile-fix.patch | 195 -----------------
23 .../audit-2.8.5-all-get-rid-of-strndupa.patch | 57 -----
24 ...dit-2.8.5-auparse-remove-use-of-rawmemchr.patch | 33 ---
25 sys-process/audit/files/audit.rules | 24 ---
26 sys-process/audit/files/audit.rules-2.1.3 | 25 ---
27 sys-process/audit/files/audit.rules.stop.post | 12 --
28 sys-process/audit/files/audit.rules.stop.pre | 15 --
29 sys-process/audit/files/auditd-conf.d-2.1.3 | 22 --
30 sys-process/audit/files/auditd-init.d-2.4.3 | 90 --------
31 sys-process/audit/metadata.xml | 10 -
32 20 files changed, 1995 deletions(-)
33
34 diff --git a/sys-process/audit/Manifest b/sys-process/audit/Manifest
35 deleted file mode 100644
36 index 27420864..00000000
37 --- a/sys-process/audit/Manifest
38 +++ /dev/null
39 @@ -1,5 +0,0 @@
40 -DIST audit-017e6c6ab95df55f34e339d2139def83e5dada1f.patch 852 BLAKE2B 60d8b813f57338ce267a09913e68a0726acf5cf878cd2893fe2493f80d2b0ac1e0504dc7a72e85134ae2597b268cb1772b4e7c6c2f19149fc905f6928e2db47f SHA512 78e32c05b6896d37bacf0938954fbce7486a528dabd55421f1715438fe489171f9157059050abdcb3f673258aa28b4a11f643ddb7824f3499a195dbbe634f101
41 -DIST audit-2.7.1.tar.gz 1099083 BLAKE2B 10f72ac3273ce9e23e1fb8ad8d57dcae772ba1f861f519867399d95e14f4809897637969de45566d62a73a35e5674260155773daf8de00481fcbd1b9c3138f96 SHA512 37964d81deee8608fde5f90d5d096727d3eb009e084be34749adcb0662e607e35c49c80bd83ce38b17161f11363b691721c8a8aa5dea832d320c53ab0ebb7483
42 -DIST audit-2.8.3.tar.gz 1107583 BLAKE2B 21c2b8543a31c0ca4319af40b844f4400615108a59195a95ea79499ff2923d7dbbc840716d60dfba311bfc451983cd4cd0f7cb27c2444825df2c0dfb50f9614f SHA512 aa939b81a66111f4e466208d7a38414bd186d00ccd374b420439764905b4707bbfcdc2331a6179a080fca981d19171696ecabd26674205b2f9339c44954db933
43 -DIST audit-2.8.4.tar.gz 1123889 BLAKE2B b80272b1984942d3c38bde30d22c736a8cc8896a2e42a9bf286446129313ce57a2a117ce26a0a5f1a4a06b4a48ddde463b8837b8c98273051be0c90e5bbebd42 SHA512 5795c565effab995cee447a2dc457ef6a6f15201fb185d7104992ac373a3cb5cfc865dd661c0896a895c96f452eff392d455064d0eead55cd7364d96e0d15c4a
44 -DIST audit-2.8.5_p80866dc78b5d.tar.gz 552094 BLAKE2B adb936a314ef2f11828ee00f3513631e06e2df09e37e68be27b1b694e278116d2f486dbde7ed57c77d9ff0bcd09309ea841959c7a66caed6770f367d65dd14f4 SHA512 7ec103bf076cfac7906748162e78835f1f65dd9d68e3a7466346e0473075beb47897adf88ab9ba0eb42db1953372aafb16cc040674b9a9c887730c062b82540a
45
46 diff --git a/sys-process/audit/audit-2.7.1.ebuild b/sys-process/audit/audit-2.7.1.ebuild
47 deleted file mode 100644
48 index 4290aaea..00000000
49 --- a/sys-process/audit/audit-2.7.1.ebuild
50 +++ /dev/null
51 @@ -1,232 +0,0 @@
52 -# Copyright 1999-2021 Gentoo Authors
53 -# Distributed under the terms of the GNU General Public License v2
54 -
55 -EAPI=6
56 -
57 -PYTHON_COMPAT=( python3_{7,8,9} )
58 -
59 -inherit autotools ltprune multilib multilib-minimal toolchain-funcs preserve-libs python-r1 linux-info systemd usr-ldscript
60 -
61 -DESCRIPTION="Userspace utilities for storing and processing auditing records"
62 -HOMEPAGE="https://people.redhat.com/sgrubb/audit/"
63 -SRC_URI="https://people.redhat.com/sgrubb/audit/${P}.tar.gz"
64 -
65 -LICENSE="GPL-2"
66 -SLOT="0"
67 -KEYWORDS="amd64 arm arm64 ~mips ppc x86"
68 -IUSE="gssapi ldap python static-libs"
69 -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
70 -# Testcases are pretty useless as they are built for RedHat users/groups and kernels.
71 -RESTRICT="test"
72 -
73 -RDEPEND="gssapi? ( virtual/krb5 )
74 - ldap? ( net-nds/openldap )
75 - sys-libs/libcap-ng
76 - python? ( ${PYTHON_DEPS} )"
77 -DEPEND="${RDEPEND}
78 - >=sys-kernel/linux-headers-2.6.34
79 - python? ( dev-lang/swig:0 )"
80 -# Do not use os-headers as this is linux specific
81 -
82 -CONFIG_CHECK="~AUDIT"
83 -
84 -pkg_setup() {
85 - linux-info_pkg_setup
86 -}
87 -
88 -src_prepare() {
89 - eapply "${FILESDIR}/${P}-musl.patch"
90 - eapply "${FILESDIR}/${P}-swig.patch"
91 - eapply_user
92 -
93 - # Do not build GUI tools
94 - sed -i \
95 - -e '/AC_CONFIG_SUBDIRS.*system-config-audit/d' \
96 - "${S}"/configure.ac || die
97 - sed -i \
98 - -e 's,system-config-audit,,g' \
99 - "${S}"/Makefile.am || die
100 - rm -rf "${S}"/system-config-audit
101 -
102 - if ! use ldap; then
103 - sed -i \
104 - -e '/^AC_OUTPUT/s,audisp/plugins/zos-remote/Makefile,,g' \
105 - "${S}"/configure.ac || die
106 - sed -i \
107 - -e '/^SUBDIRS/s,zos-remote,,g' \
108 - "${S}"/audisp/plugins/Makefile.am || die
109 - fi
110 -
111 - # Don't build static version of Python module.
112 - eapply "${FILESDIR}"/${PN}-2.4.3-python.patch
113 -
114 - # glibc/kernel upstreams suck with both defining ia64_fpreg
115 - # This patch is a horribly workaround that is only valid as long as you
116 - # don't need the OTHER definitions in fpu.h.
117 - eapply "${FILESDIR}"/${PN}-2.1.3-ia64-compile-fix.patch
118 -
119 - # there is no --without-golang conf option
120 - sed -e "/^SUBDIRS =/s/ @gobind_dir@//" -i bindings/Makefile.am || die
121 -
122 - # Regenerate autotooling
123 - eautoreconf
124 -}
125 -
126 -multilib_src_configure() {
127 - local ECONF_SOURCE=${S}
128 - econf \
129 - --sbindir="${EPREFIX}/sbin" \
130 - $(use_enable gssapi gssapi-krb5) \
131 - $(use_enable static-libs static) \
132 - --enable-systemd \
133 - --without-python \
134 - --without-python3
135 -
136 - if multilib_is_native_abi; then
137 - python_configure() {
138 - mkdir -p "${BUILD_DIR}" || die
139 - cd "${BUILD_DIR}" || die
140 -
141 - if python_is_python3; then
142 - econf --without-python --with-python3
143 - else
144 - econf --with-python --without-python3
145 - fi
146 - }
147 -
148 - use python && python_foreach_impl python_configure
149 - fi
150 -}
151 -
152 -src_configure() {
153 - tc-export_build_env BUILD_{CC,CPP}
154 - export CC_FOR_BUILD="${BUILD_CC}"
155 - export CPP_FOR_BUILD="${BUILD_CPP}"
156 -
157 - multilib-minimal_src_configure
158 -}
159 -
160 -multilib_src_compile() {
161 - if multilib_is_native_abi; then
162 - default
163 -
164 - python_compile() {
165 - local pysuffix pydef
166 - if python_is_python3; then
167 - pysuffix=3
168 - pydef='USE_PYTHON3=true'
169 - else
170 - pysuffix=2
171 - pydef='HAVE_PYTHON=true'
172 - fi
173 -
174 - emake -C "${BUILD_DIR}"/bindings/swig \
175 - VPATH="${native_build}/lib" \
176 - LIBS="${native_build}/lib/libaudit.la" \
177 - _audit_la_LIBADD="${native_build}/lib/libaudit.la" \
178 - _audit_la_DEPENDENCIES="${S}/lib/libaudit.h ${native_build}/lib/libaudit.la" \
179 - ${pydef}
180 - emake -C "${BUILD_DIR}"/bindings/python/python${pysuffix} \
181 - VPATH="${S}/bindings/python/python${pysuffix}:${native_build}/bindings/python/python${pysuffix}" \
182 - auparse_la_LIBADD="${native_build}/auparse/libauparse.la ${native_build}/lib/libaudit.la" \
183 - ${pydef}
184 - }
185 -
186 - local native_build="${BUILD_DIR}"
187 - use python && python_foreach_impl python_compile
188 - else
189 - emake -C lib
190 - emake -C auparse
191 - fi
192 -}
193 -
194 -multilib_src_install() {
195 - if multilib_is_native_abi; then
196 - emake DESTDIR="${D}" initdir="$(systemd_get_systemunitdir)" install
197 -
198 - python_install() {
199 - local pysuffix pydef
200 - if python_is_python3; then
201 - pysuffix=3
202 - pydef='USE_PYTHON3=true'
203 - else
204 - pysuffix=2
205 - pydef='HAVE_PYTHON=true'
206 - fi
207 -
208 - emake -C "${BUILD_DIR}"/bindings/swig \
209 - VPATH="${native_build}/lib" \
210 - LIBS="${native_build}/lib/libaudit.la" \
211 - _audit_la_LIBADD="${native_build}/lib/libaudit.la" \
212 - _audit_la_DEPENDENCIES="${S}/lib/libaudit.h ${native_build}/lib/libaudit.la" \
213 - ${pydef} \
214 - DESTDIR="${D}" install
215 - emake -C "${BUILD_DIR}"/bindings/python/python${pysuffix} \
216 - VPATH="${S}/bindings/python/python${pysuffix}:${native_build}/bindings/python/python${pysuffix}" \
217 - auparse_la_LIBADD="${native_build}/auparse/libauparse.la ${native_build}/lib/libaudit.la" \
218 - ${pydef} \
219 - DESTDIR="${D}" install
220 - }
221 -
222 - local native_build=${BUILD_DIR}
223 - use python && python_foreach_impl python_install
224 -
225 - # things like shadow use this so we need to be in /
226 - gen_usr_ldscript -a audit auparse
227 - else
228 - emake -C lib DESTDIR="${D}" install
229 - emake -C auparse DESTDIR="${D}" install
230 - fi
231 -}
232 -
233 -multilib_src_install_all() {
234 - dodoc AUTHORS ChangeLog README* THANKS TODO
235 - docinto contrib
236 - dodoc contrib/{avc_snap,skeleton.c}
237 - docinto contrib/plugin
238 - dodoc contrib/plugin/*
239 - docinto rules
240 - dodoc rules/*
241 -
242 - newinitd "${FILESDIR}"/auditd-init.d-2.4.3 auditd
243 - newconfd "${FILESDIR}"/auditd-conf.d-2.1.3 auditd
244 -
245 - fperms 644 "$(systemd_get_systemunitdir)"/auditd.service # 556436
246 -
247 - [ -f "${ED}"/sbin/audisp-remote ] && \
248 - dodir /usr/sbin && \
249 - mv "${ED}"/{sbin,usr/sbin}/audisp-remote || die
250 -
251 - # Gentoo rules
252 - insinto /etc/audit/
253 - newins "${FILESDIR}"/audit.rules-2.1.3 audit.rules
254 - doins "${FILESDIR}"/audit.rules.stop*
255 -
256 - # audit logs go here
257 - keepdir /var/log/audit/
258 -
259 - # Security
260 - lockdown_perms "${ED}"
261 -
262 - prune_libtool_files --modules
263 -}
264 -
265 -pkg_preinst() {
266 - # Preserve from the audit-1 series
267 - preserve_old_lib /$(get_libdir)/libaudit.so.0
268 -}
269 -
270 -pkg_postinst() {
271 - lockdown_perms "${EROOT}"
272 - # Preserve from the audit-1 series
273 - preserve_old_lib_notify /$(get_libdir)/libaudit.so.0
274 -}
275 -
276 -lockdown_perms() {
277 - # Upstream wants these to have restrictive perms.
278 - # Should not || die as not all paths may exist.
279 - local basedir="$1"
280 - chmod 0750 "${basedir}"/sbin/au{ditctl,report,dispd,ditd,search,trace} 2>/dev/null
281 - chmod 0750 "${basedir}"/var/log/audit/ 2>/dev/null
282 - chmod 0640 "${basedir}"/etc/{audit/,}{auditd.conf,audit.rules*} 2>/dev/null
283 -}
284
285 diff --git a/sys-process/audit/audit-2.8.3.ebuild b/sys-process/audit/audit-2.8.3.ebuild
286 deleted file mode 100644
287 index fb634714..00000000
288 --- a/sys-process/audit/audit-2.8.3.ebuild
289 +++ /dev/null
290 @@ -1,232 +0,0 @@
291 -# Copyright 1999-2021 Gentoo Authors
292 -# Distributed under the terms of the GNU General Public License v2
293 -
294 -EAPI="6"
295 -
296 -PYTHON_COMPAT=( python3_{7,8,9} )
297 -
298 -inherit autotools multilib multilib-minimal toolchain-funcs preserve-libs python-r1 linux-info systemd usr-ldscript
299 -
300 -DESCRIPTION="Userspace utilities for storing and processing auditing records"
301 -HOMEPAGE="https://people.redhat.com/sgrubb/audit/"
302 -SRC_URI="https://people.redhat.com/sgrubb/audit/${P}.tar.gz"
303 -
304 -LICENSE="GPL-2+ LGPL-2.1+"
305 -SLOT="0"
306 -KEYWORDS="amd64 arm arm64 ~mips ppc x86"
307 -IUSE="gssapi ldap python static-libs"
308 -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
309 -# Testcases are pretty useless as they are built for RedHat users/groups and kernels.
310 -RESTRICT="test"
311 -
312 -RDEPEND="gssapi? ( virtual/krb5 )
313 - ldap? ( net-nds/openldap )
314 - sys-libs/libcap-ng
315 - python? ( ${PYTHON_DEPS} )"
316 -DEPEND="${RDEPEND}
317 - >=sys-kernel/linux-headers-2.6.34
318 - python? ( dev-lang/swig:0 )"
319 -# Do not use os-headers as this is linux specific
320 -
321 -CONFIG_CHECK="~AUDIT"
322 -
323 -pkg_setup() {
324 - linux-info_pkg_setup
325 -}
326 -
327 -src_prepare() {
328 - eapply "${FILESDIR}/${PN}-2.8.2-musl.patch"
329 - eapply "${FILESDIR}/${PN}-2.7.1-swig.patch"
330 - eapply_user
331 -
332 - # Do not build GUI tools
333 - sed -i \
334 - -e '/AC_CONFIG_SUBDIRS.*system-config-audit/d' \
335 - "${S}"/configure.ac || die
336 - sed -i \
337 - -e 's,system-config-audit,,g' \
338 - "${S}"/Makefile.am || die
339 - rm -rf "${S}"/system-config-audit
340 -
341 - if ! use ldap; then
342 - sed -i \
343 - -e '/^AC_OUTPUT/s,audisp/plugins/zos-remote/Makefile,,g' \
344 - "${S}"/configure.ac || die
345 - sed -i \
346 - -e '/^SUBDIRS/s,zos-remote,,g' \
347 - "${S}"/audisp/plugins/Makefile.am || die
348 - fi
349 -
350 - # Don't build static version of Python module.
351 - eapply "${FILESDIR}"/${PN}-2.4.3-python.patch
352 -
353 - # glibc/kernel upstreams suck with both defining ia64_fpreg
354 - # This patch is a horribly workaround that is only valid as long as you
355 - # don't need the OTHER definitions in fpu.h.
356 - eapply "${FILESDIR}"/${PN}-2.1.3-ia64-compile-fix.patch
357 -
358 - # there is no --without-golang conf option
359 - sed -e "/^SUBDIRS =/s/ @gobind_dir@//" -i bindings/Makefile.am || die
360 -
361 - # Regenerate autotooling
362 - eautoreconf
363 -}
364 -
365 -multilib_src_configure() {
366 - local ECONF_SOURCE=${S}
367 - econf \
368 - --sbindir="${EPREFIX}/sbin" \
369 - $(use_enable gssapi gssapi-krb5) \
370 - $(use_enable static-libs static) \
371 - --enable-systemd \
372 - --without-python \
373 - --without-python3
374 -
375 - if multilib_is_native_abi; then
376 - python_configure() {
377 - mkdir -p "${BUILD_DIR}" || die
378 - cd "${BUILD_DIR}" || die
379 -
380 - if python_is_python3; then
381 - econf --without-python --with-python3
382 - else
383 - econf --with-python --without-python3
384 - fi
385 - }
386 -
387 - use python && python_foreach_impl python_configure
388 - fi
389 -}
390 -
391 -src_configure() {
392 - tc-export_build_env BUILD_{CC,CPP}
393 - export CC_FOR_BUILD="${BUILD_CC}"
394 - export CPP_FOR_BUILD="${BUILD_CPP}"
395 -
396 - multilib-minimal_src_configure
397 -}
398 -
399 -multilib_src_compile() {
400 - if multilib_is_native_abi; then
401 - default
402 -
403 - python_compile() {
404 - local pysuffix pydef
405 - if python_is_python3; then
406 - pysuffix=3
407 - pydef='USE_PYTHON3=true'
408 - else
409 - pysuffix=2
410 - pydef='HAVE_PYTHON=true'
411 - fi
412 -
413 - emake -C "${BUILD_DIR}"/bindings/swig \
414 - VPATH="${native_build}/lib" \
415 - LIBS="${native_build}/lib/libaudit.la" \
416 - _audit_la_LIBADD="${native_build}/lib/libaudit.la" \
417 - _audit_la_DEPENDENCIES="${S}/lib/libaudit.h ${native_build}/lib/libaudit.la" \
418 - ${pydef}
419 - emake -C "${BUILD_DIR}"/bindings/python/python${pysuffix} \
420 - VPATH="${S}/bindings/python/python${pysuffix}:${native_build}/bindings/python/python${pysuffix}" \
421 - auparse_la_LIBADD="${native_build}/auparse/libauparse.la ${native_build}/lib/libaudit.la" \
422 - ${pydef}
423 - }
424 -
425 - local native_build="${BUILD_DIR}"
426 - use python && python_foreach_impl python_compile
427 - else
428 - emake -C lib
429 - emake -C auparse
430 - fi
431 -}
432 -
433 -multilib_src_install() {
434 - if multilib_is_native_abi; then
435 - emake DESTDIR="${D}" initdir="$(systemd_get_systemunitdir)" install
436 -
437 - python_install() {
438 - local pysuffix pydef
439 - if python_is_python3; then
440 - pysuffix=3
441 - pydef='USE_PYTHON3=true'
442 - else
443 - pysuffix=2
444 - pydef='HAVE_PYTHON=true'
445 - fi
446 -
447 - emake -C "${BUILD_DIR}"/bindings/swig \
448 - VPATH="${native_build}/lib" \
449 - LIBS="${native_build}/lib/libaudit.la" \
450 - _audit_la_LIBADD="${native_build}/lib/libaudit.la" \
451 - _audit_la_DEPENDENCIES="${S}/lib/libaudit.h ${native_build}/lib/libaudit.la" \
452 - ${pydef} \
453 - DESTDIR="${D}" install
454 - emake -C "${BUILD_DIR}"/bindings/python/python${pysuffix} \
455 - VPATH="${S}/bindings/python/python${pysuffix}:${native_build}/bindings/python/python${pysuffix}" \
456 - auparse_la_LIBADD="${native_build}/auparse/libauparse.la ${native_build}/lib/libaudit.la" \
457 - ${pydef} \
458 - DESTDIR="${D}" install
459 - }
460 -
461 - local native_build=${BUILD_DIR}
462 - use python && python_foreach_impl python_install
463 -
464 - # things like shadow use this so we need to be in /
465 - gen_usr_ldscript -a audit auparse
466 - else
467 - emake -C lib DESTDIR="${D}" install
468 - emake -C auparse DESTDIR="${D}" install
469 - fi
470 -}
471 -
472 -multilib_src_install_all() {
473 - dodoc AUTHORS ChangeLog README* THANKS TODO
474 - docinto contrib
475 - dodoc contrib/{avc_snap,skeleton.c}
476 - docinto contrib/plugin
477 - dodoc contrib/plugin/*
478 - docinto rules
479 - dodoc rules/*
480 -
481 - newinitd "${FILESDIR}"/auditd-init.d-2.4.3 auditd
482 - newconfd "${FILESDIR}"/auditd-conf.d-2.1.3 auditd
483 -
484 - fperms 644 "$(systemd_get_systemunitdir)"/auditd.service # 556436
485 -
486 - [ -f "${ED}"/sbin/audisp-remote ] && \
487 - dodir /usr/sbin && \
488 - mv "${ED}"/{sbin,usr/sbin}/audisp-remote || die
489 -
490 - # Gentoo rules
491 - insinto /etc/audit/
492 - newins "${FILESDIR}"/audit.rules-2.1.3 audit.rules
493 - doins "${FILESDIR}"/audit.rules.stop*
494 -
495 - # audit logs go here
496 - keepdir /var/log/audit/
497 -
498 - find "${D}" -name '*.la' -delete || die
499 -
500 - # Security
501 - lockdown_perms "${ED}"
502 -}
503 -
504 -pkg_preinst() {
505 - # Preserve from the audit-1 series
506 - preserve_old_lib /$(get_libdir)/libaudit.so.0
507 -}
508 -
509 -pkg_postinst() {
510 - lockdown_perms "${EROOT}"
511 - # Preserve from the audit-1 series
512 - preserve_old_lib_notify /$(get_libdir)/libaudit.so.0
513 -}
514 -
515 -lockdown_perms() {
516 - # Upstream wants these to have restrictive perms.
517 - # Should not || die as not all paths may exist.
518 - local basedir="$1"
519 - chmod 0750 "${basedir}"/sbin/au{ditctl,report,dispd,ditd,search,trace} 2>/dev/null
520 - chmod 0750 "${basedir}"/var/log/audit/ 2>/dev/null
521 - chmod 0640 "${basedir}"/etc/{audit/,}{auditd.conf,audit.rules*} 2>/dev/null
522 -}
523
524 diff --git a/sys-process/audit/audit-2.8.4.ebuild b/sys-process/audit/audit-2.8.4.ebuild
525 deleted file mode 100644
526 index da2cc197..00000000
527 --- a/sys-process/audit/audit-2.8.4.ebuild
528 +++ /dev/null
529 @@ -1,233 +0,0 @@
530 -# Copyright 1999-2021 Gentoo Authors
531 -# Distributed under the terms of the GNU General Public License v2
532 -
533 -EAPI="6"
534 -
535 -PYTHON_COMPAT=( python3_{7,8,9} )
536 -
537 -inherit autotools multilib multilib-minimal toolchain-funcs preserve-libs python-r1 linux-info systemd usr-ldscript
538 -
539 -DESCRIPTION="Userspace utilities for storing and processing auditing records"
540 -HOMEPAGE="https://people.redhat.com/sgrubb/audit/"
541 -SRC_URI="https://people.redhat.com/sgrubb/audit/${P}.tar.gz"
542 -
543 -LICENSE="GPL-2+ LGPL-2.1+"
544 -SLOT="0"
545 -KEYWORDS="amd64 arm ~arm64 ~mips ~ppc x86"
546 -IUSE="gssapi ldap python static-libs"
547 -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
548 -# Testcases are pretty useless as they are built for RedHat users/groups and kernels.
549 -RESTRICT="test"
550 -
551 -RDEPEND="gssapi? ( virtual/krb5 )
552 - ldap? ( net-nds/openldap )
553 - sys-libs/libcap-ng
554 - python? ( ${PYTHON_DEPS} )"
555 -DEPEND="${RDEPEND}
556 - >=sys-kernel/linux-headers-2.6.34
557 - python? ( dev-lang/swig:0 )"
558 -# Do not use os-headers as this is linux specific
559 -
560 -CONFIG_CHECK="~AUDIT"
561 -
562 -pkg_setup() {
563 - linux-info_pkg_setup
564 -}
565 -
566 -src_prepare() {
567 - eapply "${FILESDIR}/${PN}-2.8.2-musl.patch"
568 - eapply "${FILESDIR}/${PN}-2.7.1-swig.patch"
569 -
570 - # Do not build GUI tools
571 - sed -i \
572 - -e '/AC_CONFIG_SUBDIRS.*system-config-audit/d' \
573 - "${S}"/configure.ac || die
574 - sed -i \
575 - -e 's,system-config-audit,,g' \
576 - "${S}"/Makefile.am || die
577 - rm -rf "${S}"/system-config-audit
578 -
579 - if ! use ldap; then
580 - sed -i \
581 - -e '/^AC_OUTPUT/s,audisp/plugins/zos-remote/Makefile,,g' \
582 - "${S}"/configure.ac || die
583 - sed -i \
584 - -e '/^SUBDIRS/s,zos-remote,,g' \
585 - "${S}"/audisp/plugins/Makefile.am || die
586 - fi
587 -
588 - # Don't build static version of Python module.
589 - eapply "${FILESDIR}"/${PN}-2.4.3-python.patch
590 -
591 - # glibc/kernel upstreams suck with both defining ia64_fpreg
592 - # This patch is a horribly workaround that is only valid as long as you
593 - # don't need the OTHER definitions in fpu.h.
594 - eapply "${FILESDIR}"/${PN}-2.8.4-ia64-compile-fix.patch
595 -
596 - # there is no --without-golang conf option
597 - sed -e "/^SUBDIRS =/s/ @gobind_dir@//" -i bindings/Makefile.am || die
598 -
599 - eapply_user
600 -
601 - # Regenerate autotooling
602 - eautoreconf
603 -}
604 -
605 -multilib_src_configure() {
606 - local ECONF_SOURCE=${S}
607 - econf \
608 - --sbindir="${EPREFIX}/sbin" \
609 - $(use_enable gssapi gssapi-krb5) \
610 - $(use_enable static-libs static) \
611 - --enable-systemd \
612 - --without-python \
613 - --without-python3
614 -
615 - if multilib_is_native_abi; then
616 - python_configure() {
617 - mkdir -p "${BUILD_DIR}" || die
618 - cd "${BUILD_DIR}" || die
619 -
620 - if python_is_python3; then
621 - econf --without-python --with-python3
622 - else
623 - econf --with-python --without-python3
624 - fi
625 - }
626 -
627 - use python && python_foreach_impl python_configure
628 - fi
629 -}
630 -
631 -src_configure() {
632 - tc-export_build_env BUILD_{CC,CPP}
633 - export CC_FOR_BUILD="${BUILD_CC}"
634 - export CPP_FOR_BUILD="${BUILD_CPP}"
635 -
636 - multilib-minimal_src_configure
637 -}
638 -
639 -multilib_src_compile() {
640 - if multilib_is_native_abi; then
641 - default
642 -
643 - python_compile() {
644 - local pysuffix pydef
645 - if python_is_python3; then
646 - pysuffix=3
647 - pydef='USE_PYTHON3=true'
648 - else
649 - pysuffix=2
650 - pydef='HAVE_PYTHON=true'
651 - fi
652 -
653 - emake -C "${BUILD_DIR}"/bindings/swig \
654 - VPATH="${native_build}/lib" \
655 - LIBS="${native_build}/lib/libaudit.la" \
656 - _audit_la_LIBADD="${native_build}/lib/libaudit.la" \
657 - _audit_la_DEPENDENCIES="${S}/lib/libaudit.h ${native_build}/lib/libaudit.la" \
658 - ${pydef}
659 - emake -C "${BUILD_DIR}"/bindings/python/python${pysuffix} \
660 - VPATH="${S}/bindings/python/python${pysuffix}:${native_build}/bindings/python/python${pysuffix}" \
661 - auparse_la_LIBADD="${native_build}/auparse/libauparse.la ${native_build}/lib/libaudit.la" \
662 - ${pydef}
663 - }
664 -
665 - local native_build="${BUILD_DIR}"
666 - use python && python_foreach_impl python_compile
667 - else
668 - emake -C lib
669 - emake -C auparse
670 - fi
671 -}
672 -
673 -multilib_src_install() {
674 - if multilib_is_native_abi; then
675 - emake DESTDIR="${D}" initdir="$(systemd_get_systemunitdir)" install
676 -
677 - python_install() {
678 - local pysuffix pydef
679 - if python_is_python3; then
680 - pysuffix=3
681 - pydef='USE_PYTHON3=true'
682 - else
683 - pysuffix=2
684 - pydef='HAVE_PYTHON=true'
685 - fi
686 -
687 - emake -C "${BUILD_DIR}"/bindings/swig \
688 - VPATH="${native_build}/lib" \
689 - LIBS="${native_build}/lib/libaudit.la" \
690 - _audit_la_LIBADD="${native_build}/lib/libaudit.la" \
691 - _audit_la_DEPENDENCIES="${S}/lib/libaudit.h ${native_build}/lib/libaudit.la" \
692 - ${pydef} \
693 - DESTDIR="${D}" install
694 - emake -C "${BUILD_DIR}"/bindings/python/python${pysuffix} \
695 - VPATH="${S}/bindings/python/python${pysuffix}:${native_build}/bindings/python/python${pysuffix}" \
696 - auparse_la_LIBADD="${native_build}/auparse/libauparse.la ${native_build}/lib/libaudit.la" \
697 - ${pydef} \
698 - DESTDIR="${D}" install
699 - }
700 -
701 - local native_build=${BUILD_DIR}
702 - use python && python_foreach_impl python_install
703 -
704 - # things like shadow use this so we need to be in /
705 - gen_usr_ldscript -a audit auparse
706 - else
707 - emake -C lib DESTDIR="${D}" install
708 - emake -C auparse DESTDIR="${D}" install
709 - fi
710 -}
711 -
712 -multilib_src_install_all() {
713 - dodoc AUTHORS ChangeLog README* THANKS
714 - docinto contrib
715 - dodoc contrib/{avc_snap,skeleton.c}
716 - docinto contrib/plugin
717 - dodoc contrib/plugin/*
718 - docinto rules
719 - dodoc rules/*
720 -
721 - newinitd "${FILESDIR}"/auditd-init.d-2.4.3 auditd
722 - newconfd "${FILESDIR}"/auditd-conf.d-2.1.3 auditd
723 -
724 - fperms 644 "$(systemd_get_systemunitdir)"/auditd.service # 556436
725 -
726 - [ -f "${ED}"/sbin/audisp-remote ] && \
727 - dodir /usr/sbin && \
728 - mv "${ED}"/{sbin,usr/sbin}/audisp-remote || die
729 -
730 - # Gentoo rules
731 - insinto /etc/audit/
732 - newins "${FILESDIR}"/audit.rules-2.1.3 audit.rules
733 - doins "${FILESDIR}"/audit.rules.stop*
734 -
735 - # audit logs go here
736 - keepdir /var/log/audit/
737 -
738 - find "${D}" -name '*.la' -delete || die
739 -
740 - # Security
741 - lockdown_perms "${ED}"
742 -}
743 -
744 -pkg_preinst() {
745 - # Preserve from the audit-1 series
746 - preserve_old_lib /$(get_libdir)/libaudit.so.0
747 -}
748 -
749 -pkg_postinst() {
750 - lockdown_perms "${EROOT}"
751 - # Preserve from the audit-1 series
752 - preserve_old_lib_notify /$(get_libdir)/libaudit.so.0
753 -}
754 -
755 -lockdown_perms() {
756 - # Upstream wants these to have restrictive perms.
757 - # Should not || die as not all paths may exist.
758 - local basedir="$1"
759 - chmod 0750 "${basedir}"/sbin/au{ditctl,report,dispd,ditd,search,trace} 2>/dev/null
760 - chmod 0750 "${basedir}"/var/log/audit/ 2>/dev/null
761 - chmod 0640 "${basedir}"/etc/{audit/,}{auditd.conf,audit.rules*} 2>/dev/null
762 -}
763
764 diff --git a/sys-process/audit/audit-2.8.5-r1.ebuild b/sys-process/audit/audit-2.8.5-r1.ebuild
765 deleted file mode 100644
766 index 70467a61..00000000
767 --- a/sys-process/audit/audit-2.8.5-r1.ebuild
768 +++ /dev/null
769 @@ -1,219 +0,0 @@
770 -# Copyright 1999-2021 Gentoo Authors
771 -# Distributed under the terms of the GNU General Public License v2
772 -
773 -EAPI="6"
774 -
775 -PYTHON_COMPAT=( python3_{7,8,9} )
776 -
777 -inherit autotools multilib multilib-minimal toolchain-funcs preserve-libs python-r1 linux-info systemd usr-ldscript
778 -
779 -DESCRIPTION="Userspace utilities for storing and processing auditing records"
780 -HOMEPAGE="https://people.redhat.com/sgrubb/audit/"
781 -# https://github.com/linux-audit/audit-userspace/tree/2.8_maintenance
782 -COMMIT='80866dc78b5db17010516e24344eaed8dcc6fb99' # contains many fixes not yet released
783 -if [[ -n $COMMIT ]]; then
784 - SRC_URI="https://github.com/linux-audit/audit-userspace/archive/${COMMIT}.tar.gz -> ${P}_p${COMMIT:0:12}.tar.gz"
785 - S="${WORKDIR}/audit-userspace-${COMMIT}"
786 -else
787 - SRC_URI="https://people.redhat.com/sgrubb/audit/${P}.tar.gz"
788 -fi
789 -# -fno-common patch:
790 -SRC_URI+=" https://github.com/linux-audit/audit-userspace/commit/017e6c6ab95df55f34e339d2139def83e5dada1f.patch -> ${PN}-017e6c6ab95df55f34e339d2139def83e5dada1f.patch"
791 -
792 -LICENSE="GPL-2+ LGPL-2.1+"
793 -SLOT="0"
794 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
795 -IUSE="gssapi ldap python static-libs"
796 -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
797 -# Testcases are pretty useless as they are built for RedHat users/groups and kernels.
798 -RESTRICT="test"
799 -
800 -RDEPEND="gssapi? ( virtual/krb5 )
801 - ldap? ( net-nds/openldap )
802 - sys-libs/libcap-ng
803 - python? ( ${PYTHON_DEPS} )"
804 -DEPEND="${RDEPEND}
805 - >=sys-kernel/linux-headers-2.6.34
806 - python? ( dev-lang/swig:0 )"
807 -# Do not use os-headers as this is linux specific
808 -
809 -CONFIG_CHECK="~AUDIT"
810 -
811 -pkg_setup() {
812 - linux-info_pkg_setup
813 -}
814 -
815 -src_prepare() {
816 - eapply "${FILESDIR}/${PN}-2.8.5-auparse-remove-use-of-rawmemchr.patch"
817 - eapply "${FILESDIR}/${PN}-2.8.5-all-get-rid-of-strndupa.patch"
818 -
819 - # Do not build GUI tools
820 - sed -i \
821 - -e '/AC_CONFIG_SUBDIRS.*system-config-audit/d' \
822 - "${S}"/configure.ac || die
823 - sed -i \
824 - -e 's,system-config-audit,,g' \
825 - "${S}"/Makefile.am || die
826 - rm -rf "${S}"/system-config-audit
827 -
828 - # audisp-remote moved in multilib_src_install_all
829 - sed -i \
830 - -e "s,/sbin/audisp-remote,${EPREFIX}/usr/sbin/audisp-remote," \
831 - "${S}"/audisp/plugins/remote/au-remote.conf || die
832 -
833 - # Don't build static version of Python module.
834 - eapply "${FILESDIR}"/${PN}-2.4.3-python.patch
835 -
836 - # glibc/kernel upstreams suck with both defining ia64_fpreg
837 - # This patch is a horribly workaround that is only valid as long as you
838 - # don't need the OTHER definitions in fpu.h.
839 - eapply "${FILESDIR}"/${PN}-2.8.4-ia64-compile-fix.patch
840 -
841 - # there is no --without-golang conf option
842 - sed -e "/^SUBDIRS =/s/ @gobind_dir@//" -i bindings/Makefile.am || die
843 -
844 - # -fno-common
845 - eapply "${DISTDIR}/${PN}-017e6c6ab95df55f34e339d2139def83e5dada1f.patch"
846 -
847 - eapply_user
848 -
849 - # Regenerate autotooling
850 - eautoreconf
851 -}
852 -
853 -multilib_src_configure() {
854 - local ECONF_SOURCE=${S}
855 - local my_conf="$(use_enable ldap zos-remote)"
856 - econf \
857 - ${my_conf} \
858 - --sbindir="${EPREFIX}/sbin" \
859 - $(use_enable gssapi gssapi-krb5) \
860 - $(use_enable static-libs static) \
861 - --enable-systemd \
862 - --without-python \
863 - --without-python3
864 -
865 - if multilib_is_native_abi; then
866 - python_configure() {
867 - mkdir -p "${BUILD_DIR}" || die
868 - cd "${BUILD_DIR}" || die
869 -
870 - econf ${my_conf} --without-python --with-python3
871 - }
872 -
873 - use python && python_foreach_impl python_configure
874 - fi
875 -}
876 -
877 -src_configure() {
878 - tc-export_build_env BUILD_{CC,CPP}
879 - export CC_FOR_BUILD="${BUILD_CC}"
880 - export CPP_FOR_BUILD="${BUILD_CPP}"
881 -
882 - multilib-minimal_src_configure
883 -}
884 -
885 -multilib_src_compile() {
886 - if multilib_is_native_abi; then
887 - default
888 -
889 - python_compile() {
890 - emake -C "${BUILD_DIR}"/bindings/swig \
891 - VPATH="${native_build}/lib" \
892 - LIBS="${native_build}/lib/libaudit.la" \
893 - _audit_la_LIBADD="${native_build}/lib/libaudit.la" \
894 - _audit_la_DEPENDENCIES="${S}/lib/libaudit.h ${native_build}/lib/libaudit.la" \
895 - USE_PYTHON3=true
896 - emake -C "${BUILD_DIR}"/bindings/python/python3 \
897 - VPATH="${S}/bindings/python/python3:${native_build}/bindings/python/python3" \
898 - auparse_la_LIBADD="${native_build}/auparse/libauparse.la ${native_build}/lib/libaudit.la" \
899 - USE_PYTHON3=true
900 - }
901 -
902 - local native_build="${BUILD_DIR}"
903 - use python && python_foreach_impl python_compile
904 - else
905 - emake -C lib
906 - emake -C auparse
907 - fi
908 -}
909 -
910 -multilib_src_install() {
911 - if multilib_is_native_abi; then
912 - emake DESTDIR="${D}" initdir="$(systemd_get_systemunitdir)" install
913 -
914 - python_install() {
915 - emake -C "${BUILD_DIR}"/bindings/swig \
916 - VPATH="${native_build}/lib" \
917 - LIBS="${native_build}/lib/libaudit.la" \
918 - _audit_la_LIBADD="${native_build}/lib/libaudit.la" \
919 - _audit_la_DEPENDENCIES="${S}/lib/libaudit.h ${native_build}/lib/libaudit.la" \
920 - USE_PYTHON3=true \
921 - DESTDIR="${D}" install
922 - emake -C "${BUILD_DIR}"/bindings/python/python3 \
923 - VPATH="${S}/bindings/python/python3:${native_build}/bindings/python/python3" \
924 - auparse_la_LIBADD="${native_build}/auparse/libauparse.la ${native_build}/lib/libaudit.la" \
925 - USE_PYTHON3=true \
926 - DESTDIR="${D}" install
927 - }
928 -
929 - local native_build=${BUILD_DIR}
930 - use python && python_foreach_impl python_install
931 -
932 - # things like shadow use this so we need to be in /
933 - gen_usr_ldscript -a audit auparse
934 - else
935 - emake -C lib DESTDIR="${D}" install
936 - emake -C auparse DESTDIR="${D}" install
937 - fi
938 -}
939 -
940 -multilib_src_install_all() {
941 - dodoc AUTHORS ChangeLog README* THANKS
942 - docinto contrib
943 - dodoc contrib/{avc_snap,skeleton.c}
944 - docinto contrib/plugin
945 - dodoc contrib/plugin/*
946 - docinto rules
947 - dodoc rules/*
948 -
949 - newinitd "${FILESDIR}"/auditd-init.d-2.4.3 auditd
950 - newconfd "${FILESDIR}"/auditd-conf.d-2.1.3 auditd
951 -
952 - [ -f "${ED}"/sbin/audisp-remote ] && \
953 - dodir /usr/sbin && \
954 - mv "${ED}"/{sbin,usr/sbin}/audisp-remote || die
955 -
956 - # Gentoo rules
957 - insinto /etc/audit/
958 - newins "${FILESDIR}"/audit.rules-2.1.3 audit.rules
959 - doins "${FILESDIR}"/audit.rules.stop*
960 -
961 - # audit logs go here
962 - keepdir /var/log/audit/
963 -
964 - find "${D}" -name '*.la' -delete || die
965 -
966 - # Security
967 - lockdown_perms "${ED}"
968 -}
969 -
970 -pkg_preinst() {
971 - # Preserve from the audit-1 series
972 - preserve_old_lib /$(get_libdir)/libaudit.so.0
973 -}
974 -
975 -pkg_postinst() {
976 - lockdown_perms "${EROOT}"
977 - # Preserve from the audit-1 series
978 - preserve_old_lib_notify /$(get_libdir)/libaudit.so.0
979 -}
980 -
981 -lockdown_perms() {
982 - # Upstream wants these to have restrictive perms.
983 - # Should not || die as not all paths may exist.
984 - local basedir="$1"
985 - chmod 0750 "${basedir}"/sbin/au{ditctl,report,dispd,ditd,search,trace} 2>/dev/null
986 - chmod 0750 "${basedir}"/var/log/audit/ 2>/dev/null
987 - chmod 0640 "${basedir}"/etc/{audit/,}{auditd.conf,audit.rules*} 2>/dev/null
988 -}
989
990 diff --git a/sys-process/audit/files/audit-2.1.3-ia64-compile-fix.patch b/sys-process/audit/files/audit-2.1.3-ia64-compile-fix.patch
991 deleted file mode 100644
992 index 3ec60fbc..00000000
993 --- a/sys-process/audit/files/audit-2.1.3-ia64-compile-fix.patch
994 +++ /dev/null
995 @@ -1,212 +0,0 @@
996 -diff -Nuar -X exclude audit-2.1.3.orig/configure.ac audit-2.1.3/configure.ac
997 ---- audit-2.1.3.orig/configure.ac 2011-08-15 17:30:58.000000000 +0000
998 -+++ audit-2.1.3/configure.ac 2012-12-18 20:03:22.000000000 +0000
999 -@@ -79,6 +79,9 @@
1000 - esac
1001 - fi
1002 -
1003 -+AC_CHECK_HEADER([asm/ptrace.h], [AC_DEFINE([HAVE_ASM_PTRACE_H],[],[Define to 1 if you have asm/ptrace.h])], [])
1004 -+AC_CHECK_HEADER([linux/ptrace.h], [AC_DEFINE([HAVE_LINUX_PTRACE_H],[],[Define to 1 if you have linux/ptrace.h])], [])
1005 -+
1006 - #gssapi
1007 - AC_ARG_ENABLE(gssapi_krb5,
1008 - [AS_HELP_STRING([--enable-gssapi-krb5],[Enable GSSAPI Kerberos 5 support @<:@default=no@:>@])],
1009 -diff -Nuar -X exclude audit-2.1.3.orig/src/auditctl.c audit-2.1.3/src/auditctl.c
1010 ---- audit-2.1.3.orig/src/auditctl.c 2011-08-15 17:31:00.000000000 +0000
1011 -+++ audit-2.1.3/src/auditctl.c 2012-12-18 20:21:21.000000000 +0000
1012 -@@ -22,6 +22,7 @@
1013 - */
1014 -
1015 - #include "config.h"
1016 -+#include "fixup.h"
1017 - #include <stdio.h>
1018 - #include <stdlib.h>
1019 - #include <string.h> /* strdup needs xopen define */
1020 -diff -Nuar -X exclude audit-2.1.3.orig/src/auditd-config.c audit-2.1.3/src/auditd-config.c
1021 ---- audit-2.1.3.orig/src/auditd-config.c 2011-08-15 17:31:00.000000000 +0000
1022 -+++ audit-2.1.3/src/auditd-config.c 2012-12-18 20:21:23.000000000 +0000
1023 -@@ -22,6 +22,7 @@
1024 - */
1025 -
1026 - #include "config.h"
1027 -+#include "fixup.h"
1028 - #include <stdio.h>
1029 - #include <unistd.h>
1030 - #include <sys/stat.h>
1031 -diff -Nuar -X exclude audit-2.1.3.orig/src/auditd-dispatch.c audit-2.1.3/src/auditd-dispatch.c
1032 ---- audit-2.1.3.orig/src/auditd-dispatch.c 2011-08-15 17:31:00.000000000 +0000
1033 -+++ audit-2.1.3/src/auditd-dispatch.c 2012-12-18 20:21:27.000000000 +0000
1034 -@@ -22,6 +22,7 @@
1035 - */
1036 -
1037 - #include "config.h"
1038 -+#include "fixup.h"
1039 - #include <unistd.h>
1040 - #include <sys/uio.h>
1041 - #include <fcntl.h>
1042 -diff -Nuar -X exclude audit-2.1.3.orig/src/auditd-event.c audit-2.1.3/src/auditd-event.c
1043 ---- audit-2.1.3.orig/src/auditd-event.c 2011-08-15 17:31:00.000000000 +0000
1044 -+++ audit-2.1.3/src/auditd-event.c 2012-12-18 20:21:29.000000000 +0000
1045 -@@ -22,6 +22,7 @@
1046 - */
1047 -
1048 - #include "config.h"
1049 -+#include "fixup.h"
1050 - #include <stdio.h>
1051 - #include <stdlib.h>
1052 - #include <unistd.h>
1053 -diff -Nuar -X exclude audit-2.1.3.orig/src/auditd-listen.c audit-2.1.3/src/auditd-listen.c
1054 ---- audit-2.1.3.orig/src/auditd-listen.c 2011-08-15 17:31:00.000000000 +0000
1055 -+++ audit-2.1.3/src/auditd-listen.c 2012-12-18 20:21:31.000000000 +0000
1056 -@@ -22,6 +22,7 @@
1057 - */
1058 -
1059 - #include "config.h"
1060 -+#include "fixup.h"
1061 - #include <stdio.h>
1062 - #include <unistd.h>
1063 - #include <sys/stat.h>
1064 -diff -Nuar -X exclude audit-2.1.3.orig/src/auditd-reconfig.c audit-2.1.3/src/auditd-reconfig.c
1065 ---- audit-2.1.3.orig/src/auditd-reconfig.c 2011-08-15 17:31:00.000000000 +0000
1066 -+++ audit-2.1.3/src/auditd-reconfig.c 2012-12-18 20:21:33.000000000 +0000
1067 -@@ -22,6 +22,7 @@
1068 - */
1069 -
1070 - #include "config.h"
1071 -+#include "fixup.h"
1072 - #include <pthread.h>
1073 - #include <signal.h>
1074 - #include <stdlib.h>
1075 -diff -Nuar -X exclude audit-2.1.3.orig/src/auditd-sendmail.c audit-2.1.3/src/auditd-sendmail.c
1076 ---- audit-2.1.3.orig/src/auditd-sendmail.c 2011-08-15 17:31:00.000000000 +0000
1077 -+++ audit-2.1.3/src/auditd-sendmail.c 2012-12-18 20:21:34.000000000 +0000
1078 -@@ -22,6 +22,7 @@
1079 - */
1080 -
1081 - #include "config.h"
1082 -+#include "fixup.h"
1083 - #include <stdio.h>
1084 - #include <unistd.h> // for access()
1085 - #include <string.h>
1086 -diff -Nuar -X exclude audit-2.1.3.orig/src/auditd.c audit-2.1.3/src/auditd.c
1087 ---- audit-2.1.3.orig/src/auditd.c 2011-08-15 17:31:00.000000000 +0000
1088 -+++ audit-2.1.3/src/auditd.c 2012-12-18 20:21:38.000000000 +0000
1089 -@@ -22,6 +22,7 @@
1090 - */
1091 -
1092 - #include "config.h"
1093 -+#include "fixup.h"
1094 - #include <stdio.h>
1095 - #include <sys/types.h>
1096 - #include <unistd.h>
1097 -diff -Nuar -X exclude audit-2.1.3.orig/src/autrace.c audit-2.1.3/src/autrace.c
1098 ---- audit-2.1.3.orig/src/autrace.c 2011-08-15 17:31:00.000000000 +0000
1099 -+++ audit-2.1.3/src/autrace.c 2012-12-18 20:21:43.000000000 +0000
1100 -@@ -21,6 +21,7 @@
1101 - */
1102 -
1103 - #include "config.h"
1104 -+#include "fixup.h"
1105 - #include <stdio.h>
1106 - #include <string.h>
1107 - #include <sys/wait.h>
1108 -diff -Nuar -X exclude audit-2.1.3.orig/src/delete_all.c audit-2.1.3/src/delete_all.c
1109 ---- audit-2.1.3.orig/src/delete_all.c 2011-08-15 17:31:00.000000000 +0000
1110 -+++ audit-2.1.3/src/delete_all.c 2012-12-18 20:21:48.000000000 +0000
1111 -@@ -20,6 +20,7 @@
1112 - * Steve Grubb <sgrubb@××××××.com>
1113 - */
1114 - #include "config.h"
1115 -+#include "fixup.h"
1116 - #include <stdio.h>
1117 - #include <string.h>
1118 - #include <errno.h>
1119 -diff -Nuar -X exclude audit-2.1.3.orig/lib/fixup.h audit-2.1.3/lib/fixup.h
1120 ---- audit-2.1.3.orig/lib/fixup.h 1970-01-01 00:00:00.000000000 +0000
1121 -+++ audit-2.1.3/lib/fixup.h 2012-12-18 20:21:02.000000000 +0000
1122 -@@ -0,0 +1,17 @@
1123 -+#ifndef _AUDIT_IA64_FIXUP_H_
1124 -+#define _AUDIT_IA64_FIXUP_H_
1125 -+
1126 -+#ifdef __ia64__ /* what a pos */
1127 -+# include <linux/types.h>
1128 -+# define _ASM_IA64_FPU_H
1129 -+#endif
1130 -+#include <signal.h>
1131 -+/*
1132 -+#ifdef HAVE_ASM_PTRACE_H
1133 -+# include <asm/ptrace.h>
1134 -+#endif
1135 -+#ifdef HAVE_LINUX_PTRACE_H
1136 -+# include <linux/ptrace.h>
1137 -+#endif
1138 -+*/
1139 -+#endif
1140 ---- audit-2.1.3/src/ausearch.c 2012-12-22 03:09:54.000000000 +0000
1141 -+++ audit-2.1.3/src/ausearch.c 2012-12-22 03:10:02.000000000 +0000
1142 -@@ -22,6 +22,7 @@
1143 - */
1144 -
1145 - #include "config.h"
1146 -+#include "fixup.h"
1147 - #include <stdio.h>
1148 - #include <stdio_ext.h>
1149 - #include <string.h>
1150 -diff -Nuar audit-2.1.3.orig/audisp/audispd.c audit-2.1.3/audisp/audispd.c
1151 ---- audit-2.1.3.orig/audisp/audispd.c 2011-08-15 17:30:59.000000000 +0000
1152 -+++ audit-2.1.3/audisp/audispd.c 2012-12-22 03:25:15.000000000 +0000
1153 -@@ -21,6 +21,7 @@
1154 - */
1155 -
1156 - #include "config.h"
1157 -+#include "fixup.h"
1158 - #include <stdio.h>
1159 - #include <unistd.h>
1160 - #include <stdlib.h>
1161 -diff -Nuar audit-2.1.3.orig/audisp/plugins/prelude/audisp-prelude.c audit-2.1.3/audisp/plugins/prelude/audisp-prelude.c
1162 ---- audit-2.1.3.orig/audisp/plugins/prelude/audisp-prelude.c 2011-08-15 17:30:59.000000000 +0000
1163 -+++ audit-2.1.3/audisp/plugins/prelude/audisp-prelude.c 2012-12-22 03:25:20.000000000 +0000
1164 -@@ -21,6 +21,8 @@
1165 - *
1166 - */
1167 -
1168 -+#include "config.h"
1169 -+#include "fixup.h"
1170 - #include <stdio.h>
1171 - #include <stdlib.h>
1172 - #include <signal.h>
1173 -diff -Nuar audit-2.1.3.orig/audisp/plugins/remote/audisp-remote.c audit-2.1.3/audisp/plugins/remote/audisp-remote.c
1174 ---- audit-2.1.3.orig/audisp/plugins/remote/audisp-remote.c 2011-08-15 17:30:59.000000000 +0000
1175 -+++ audit-2.1.3/audisp/plugins/remote/audisp-remote.c 2012-12-22 03:25:22.000000000 +0000
1176 -@@ -22,6 +22,7 @@
1177 - */
1178 -
1179 - #include "config.h"
1180 -+#include "fixup.h"
1181 - #include <stdio.h>
1182 - #include <signal.h>
1183 - #include <syslog.h>
1184 -diff -Nuar audit-2.1.3.orig/contrib/plugin/audisp-example.c audit-2.1.3/contrib/plugin/audisp-example.c
1185 ---- audit-2.1.3.orig/contrib/plugin/audisp-example.c 2011-08-15 17:31:02.000000000 +0000
1186 -+++ audit-2.1.3/contrib/plugin/audisp-example.c 2012-12-22 03:25:27.000000000 +0000
1187 -@@ -37,6 +37,8 @@
1188 - */
1189 -
1190 - #define _GNU_SOURCE
1191 -+#include "config.h"
1192 -+#include "fixup.h"
1193 - #include <stdio.h>
1194 - #include <signal.h>
1195 - #include <string.h>
1196 -diff -Nuar audit-2.1.3.orig/contrib/skeleton.c audit-2.1.3/contrib/skeleton.c
1197 ---- audit-2.1.3.orig/contrib/skeleton.c 2011-08-15 17:31:02.000000000 +0000
1198 -+++ audit-2.1.3/contrib/skeleton.c 2012-12-22 03:25:40.000000000 +0000
1199 -@@ -7,6 +7,8 @@
1200 - * gcc skeleton.c -o skeleton -laudit
1201 - */
1202 -
1203 -+#include "config.h"
1204 -+#include "fixup.h"
1205 - #include <stdio.h>
1206 - #include <sys/types.h>
1207 - #include <sys/uio.h>
1208
1209 diff --git a/sys-process/audit/files/audit-2.4.3-python.patch b/sys-process/audit/files/audit-2.4.3-python.patch
1210 deleted file mode 100644
1211 index 7b9ea53e..00000000
1212 --- a/sys-process/audit/files/audit-2.4.3-python.patch
1213 +++ /dev/null
1214 @@ -1,46 +0,0 @@
1215 -diff -ur audit-2.4.3.orig/bindings/python/python2/Makefile.am audit-2.4.3/bindings/python/python2/Makefile.am
1216 ---- audit-2.4.3.orig/bindings/python/python2/Makefile.am 2015-07-22 23:35:24.315424091 +0800
1217 -+++ audit-2.4.3/bindings/python/python2/Makefile.am 2015-07-22 23:37:16.861510504 +0800
1218 -@@ -29,5 +29,6 @@
1219 -
1220 - auparse_la_SOURCES = $(top_srcdir)/bindings/python/auparse_python.c
1221 - auparse_la_CPPFLAGS = -I$(top_srcdir)/auparse $(AM_CPPFLAGS)
1222 --auparse_la_LDFLAGS = -module -avoid-version -Wl,-z,relro
1223 -+auparse_la_CFLAGS = -shared
1224 -+auparse_la_LDFLAGS = -module -avoid-version -shared -Wl,-z,relro
1225 - auparse_la_LIBADD = ${top_builddir}/auparse/libauparse.la ${top_builddir}/lib/libaudit.la
1226 -diff -ur audit-2.4.3.orig/bindings/python/python3/Makefile.am audit-2.4.3/bindings/python/python3/Makefile.am
1227 ---- audit-2.4.3.orig/bindings/python/python3/Makefile.am 2015-07-22 23:35:24.315424091 +0800
1228 -+++ audit-2.4.3/bindings/python/python3/Makefile.am 2015-07-22 23:37:30.395400641 +0800
1229 -@@ -28,5 +28,6 @@
1230 -
1231 - auparse_la_SOURCES = $(top_srcdir)/bindings/python/auparse_python.c
1232 - auparse_la_CPPFLAGS = -I$(top_srcdir)/auparse $(AM_CPPFLAGS)
1233 --auparse_la_LDFLAGS = -module -avoid-version -Wl,-z,relro
1234 -+auparse_la_CFLAGS = -shared
1235 -+auparse_la_LDFLAGS = -module -avoid-version -shared -Wl,-z,relro
1236 - auparse_la_LIBADD = ${top_builddir}/auparse/libauparse.la ${top_builddir}/lib/libaudit.la
1237 -diff -ur audit-2.4.3.orig/bindings/swig/python/Makefile.am audit-2.4.3/bindings/swig/python/Makefile.am
1238 ---- audit-2.4.3.orig/bindings/swig/python/Makefile.am 2015-07-22 23:35:24.316424083 +0800
1239 -+++ audit-2.4.3/bindings/swig/python/Makefile.am 2015-07-22 23:35:53.244189263 +0800
1240 -@@ -28,7 +28,7 @@
1241 - pyexec_LTLIBRARIES = _audit.la
1242 - pyexec_SOLIBRARIES = _audit.so
1243 - _audit_la_CFLAGS = -shared
1244 --_audit_la_LDFLAGS = -module -avoid-version -Wl,-z,relro
1245 -+_audit_la_LDFLAGS = -module -avoid-version -shared -Wl,-z,relro
1246 - _audit_la_HEADERS: $(top_builddir)/config.h
1247 - _audit_la_DEPENDENCIES =${top_srcdir}/lib/libaudit.h ${top_builddir}/lib/libaudit.la
1248 - _audit_la_LIBADD = $(top_builddir)/lib/libaudit.la
1249 -diff -ur audit-2.4.3.orig/bindings/swig/python3/Makefile.am audit-2.4.3/bindings/swig/python3/Makefile.am
1250 ---- audit-2.4.3.orig/bindings/swig/python3/Makefile.am 2015-07-22 23:35:24.316424083 +0800
1251 -+++ audit-2.4.3/bindings/swig/python3/Makefile.am 2015-07-22 23:36:27.833908482 +0800
1252 -@@ -29,7 +29,7 @@
1253 - py3exec_LTLIBRARIES = _audit.la
1254 - py3exec_SOLIBRARIES = _audit.so
1255 - _audit_la_CFLAGS = -shared
1256 --_audit_la_LDFLAGS = -module -avoid-version -Wl,-z,relro
1257 -+_audit_la_LDFLAGS = -module -avoid-version -shared -Wl,-z,relro
1258 - _audit_la_HEADERS: $(top_builddir)/config.h
1259 - _audit_la_DEPENDENCIES =${top_srcdir}/lib/libaudit.h ${top_builddir}/lib/libaudit.la
1260 - _audit_la_LIBADD = ${top_builddir}/lib/libaudit.la
1261
1262 diff --git a/sys-process/audit/files/audit-2.7.1-musl.patch b/sys-process/audit/files/audit-2.7.1-musl.patch
1263 deleted file mode 100644
1264 index 099f9855..00000000
1265 --- a/sys-process/audit/files/audit-2.7.1-musl.patch
1266 +++ /dev/null
1267 @@ -1,173 +0,0 @@
1268 -From db5c09f7995a27555a10418648d9dc7e1e8bb94b Mon Sep 17 00:00:00 2001
1269 -From: Luis Ressel <aranea@×××××.de>
1270 -Date: Mon, 13 Nov 2017 07:33:35 +0100
1271 -Subject: [PATCH] Musl compability
1272 -
1273 -A couple of header fixes, one occurrence of rawmemchr() and three of
1274 -strndupa().
1275 ----
1276 - audisp/audispd.c | 4 +++-
1277 - auparse/auparse.c | 13 +++++++++++--
1278 - auparse/interpret.c | 2 +-
1279 - lib/libaudit.c | 2 +-
1280 - lib/netlink.c | 2 +-
1281 - src/auditctl.c | 1 +
1282 - src/auditd.c | 9 +++++++--
1283 - src/ausearch-lol.c | 13 +++++++++++--
1284 - 8 files changed, 36 insertions(+), 10 deletions(-)
1285 -
1286 -diff --git a/audisp/audispd.c b/audisp/audispd.c
1287 -index 9831cf3..0720814 100644
1288 ---- a/audisp/audispd.c
1289 -+++ b/audisp/audispd.c
1290 -@@ -31,7 +31,9 @@
1291 - #include <pthread.h>
1292 - #include <dirent.h>
1293 - #include <fcntl.h>
1294 --#include <sys/poll.h>
1295 -+#include <limits.h>
1296 -+#include <poll.h>
1297 -+#include <sys/uio.h>
1298 - #include <netdb.h>
1299 - #include <arpa/inet.h>
1300 -
1301 -diff --git a/auparse/auparse.c b/auparse/auparse.c
1302 -index 2812028..a5d8c9e 100644
1303 ---- a/auparse/auparse.c
1304 -+++ b/auparse/auparse.c
1305 -@@ -1090,10 +1090,19 @@ static int extract_timestamp(const char *b, au_event_t *e)
1306 - int rc = 1;
1307 -
1308 - e->host = NULL;
1309 -+ char _tmp[341];
1310 - if (*b == 'n')
1311 -- tmp = strndupa(b, 340);
1312 -+ {
1313 -+ strncpy(_tmp, b, 340);
1314 -+ _tmp[340] = '\0';
1315 -+ tmp = _tmp;
1316 -+ }
1317 - else
1318 -- tmp = strndupa(b, 80);
1319 -+ {
1320 -+ strncpy(_tmp, b, 80);
1321 -+ _tmp[80] = '\0';
1322 -+ tmp = _tmp;
1323 -+ }
1324 - ptr = audit_strsplit(tmp);
1325 - if (ptr) {
1326 - // Optionally grab the node - may or may not be included
1327 -diff --git a/auparse/interpret.c b/auparse/interpret.c
1328 -index 071c4ef..ba38199 100644
1329 ---- a/auparse/interpret.c
1330 -+++ b/auparse/interpret.c
1331 -@@ -803,7 +803,7 @@ static const char *print_proctitle(const char *val)
1332 - size_t len = strlen(val) / 2;
1333 - const char *end = out + len;
1334 - char *ptr = out;
1335 -- while ((ptr = rawmemchr(ptr, '\0'))) {
1336 -+ while ((ptr = memchr(ptr, '\0', SIZE_MAX))) {
1337 - if (ptr >= end)
1338 - break;
1339 - *ptr = ' ';
1340 -diff --git a/lib/libaudit.c b/lib/libaudit.c
1341 -index f434d4a..bd679a5 100644
1342 ---- a/lib/libaudit.c
1343 -+++ b/lib/libaudit.c
1344 -@@ -32,7 +32,7 @@
1345 - #include <pwd.h>
1346 - #include <grp.h>
1347 - #include <errno.h>
1348 --#include <sys/poll.h>
1349 -+#include <poll.h>
1350 - #include <sys/utsname.h>
1351 - #include <sys/stat.h>
1352 - #include <fcntl.h> /* O_NOFOLLOW needs gnu defined */
1353 -diff --git a/lib/netlink.c b/lib/netlink.c
1354 -index 90c79b9..9486560 100644
1355 ---- a/lib/netlink.c
1356 -+++ b/lib/netlink.c
1357 -@@ -27,7 +27,7 @@
1358 - #include <errno.h>
1359 - #include <fcntl.h>
1360 - #include <time.h>
1361 --#include <sys/poll.h>
1362 -+#include <poll.h>
1363 - #include "libaudit.h"
1364 - #include "private.h"
1365 -
1366 -diff --git a/src/auditctl.c b/src/auditctl.c
1367 -index 81000ee..6415264 100644
1368 ---- a/src/auditctl.c
1369 -+++ b/src/auditctl.c
1370 -@@ -34,6 +34,7 @@
1371 - #include <sys/utsname.h>
1372 - #include <fcntl.h>
1373 - #include <errno.h>
1374 -+#include <sys/select.h>
1375 - #include <libgen.h> /* For basename */
1376 - #include <limits.h> /* PATH_MAX */
1377 - #include "libaudit.h"
1378 -diff --git a/src/auditd.c b/src/auditd.c
1379 -index 3f0162d..535207d 100644
1380 ---- a/src/auditd.c
1381 -+++ b/src/auditd.c
1382 -@@ -30,6 +30,7 @@
1383 - #include <errno.h>
1384 - #include <string.h>
1385 - #include <time.h>
1386 -+#include <alloca.h>
1387 - #include <sys/resource.h>
1388 - #include <sys/time.h>
1389 - #include <sys/stat.h>
1390 -@@ -185,7 +186,9 @@ static void child_handler2( int sig )
1391 -
1392 - static int extract_type(const char *str)
1393 - {
1394 -- const char *tptr, *ptr2, *ptr = str;
1395 -+ const char *ptr2, *ptr = str;
1396 -+ char *tptr;
1397 -+
1398 - if (*str == 'n') {
1399 - ptr = strchr(str+1, ' ');
1400 - if (ptr == NULL)
1401 -@@ -195,7 +198,9 @@ static int extract_type(const char *str)
1402 - // ptr should be at 't'
1403 - ptr2 = strchr(ptr, ' ');
1404 - // get type=xxx in a buffer
1405 -- tptr = strndupa(ptr, ptr2 - ptr);
1406 -+ tptr = (char *) alloca(ptr2 - ptr + 1);
1407 -+ strncpy(tptr, ptr, ptr2 - ptr);
1408 -+ tptr[ptr2 - ptr] = '\0';
1409 - // find =
1410 - str = strchr(tptr, '=');
1411 - if (str == NULL)
1412 -diff --git a/src/ausearch-lol.c b/src/ausearch-lol.c
1413 -index b1aec06..bb9330d 100644
1414 ---- a/src/ausearch-lol.c
1415 -+++ b/src/ausearch-lol.c
1416 -@@ -135,10 +135,19 @@ static int extract_timestamp(const char *b, event *e)
1417 - char *ptr, *tmp, *tnode, *ttype;
1418 -
1419 - e->node = NULL;
1420 -+ char _tmp[341];
1421 - if (*b == 'n')
1422 -- tmp = strndupa(b, 340);
1423 -+ {
1424 -+ strncpy(_tmp, b, 340);
1425 -+ _tmp[340] = '\0';
1426 -+ tmp = _tmp;
1427 -+ }
1428 - else
1429 -- tmp = strndupa(b, 80);
1430 -+ {
1431 -+ strncpy(_tmp, b, 80);
1432 -+ _tmp[80] = '\0';
1433 -+ tmp = _tmp;
1434 -+ }
1435 - ptr = audit_strsplit(tmp);
1436 - if (ptr) {
1437 - // Check to see if this is the node info
1438 ---
1439 -2.15.0
1440 -
1441
1442 diff --git a/sys-process/audit/files/audit-2.7.1-swig.patch b/sys-process/audit/files/audit-2.7.1-swig.patch
1443 deleted file mode 100644
1444 index f76b9b0e..00000000
1445 --- a/sys-process/audit/files/audit-2.7.1-swig.patch
1446 +++ /dev/null
1447 @@ -1,11 +0,0 @@
1448 -diff --git a/bindings/swig/src/auditswig.i b/bindings/swig/src/auditswig.i
1449 -index 356a5ab..41bdc6d 100644
1450 ---- a/bindings/swig/src/auditswig.i
1451 -+++ b/bindings/swig/src/auditswig.i
1452 -@@ -41,6 +41,5 @@ typedef unsigned __u32;
1453 - typedef unsigned uid_t;
1454 - %include "/usr/include/linux/audit.h"
1455 - #define __extension__ /*nothing*/
1456 --%include "/usr/include/stdint.h"
1457 - %include "../lib/libaudit.h"
1458 -
1459
1460 diff --git a/sys-process/audit/files/audit-2.8.2-musl.patch b/sys-process/audit/files/audit-2.8.2-musl.patch
1461 deleted file mode 100644
1462 index e48b42ba..00000000
1463 --- a/sys-process/audit/files/audit-2.8.2-musl.patch
1464 +++ /dev/null
1465 @@ -1,149 +0,0 @@
1466 -diff -Naur audit-2.8.2.orig/audisp/audispd.c audit-2.8.2/audisp/audispd.c
1467 ---- audit-2.8.2.orig/audisp/audispd.c 2018-03-11 17:16:39.363923401 -0700
1468 -+++ audit-2.8.2/audisp/audispd.c 2018-03-11 17:17:35.163922402 -0700
1469 -@@ -31,7 +31,9 @@
1470 - #include <pthread.h>
1471 - #include <dirent.h>
1472 - #include <fcntl.h>
1473 --#include <sys/poll.h>
1474 -+#include <limits.h>
1475 -+#include <poll.h>
1476 -+#include <sys/uio.h>
1477 - #include <netdb.h>
1478 - #include <arpa/inet.h>
1479 - #include <limits.h>
1480 -diff -Naur audit-2.8.2.orig/auparse/auparse.c audit-2.8.2/auparse/auparse.c
1481 ---- audit-2.8.2.orig/auparse/auparse.c 2018-03-11 17:16:39.356923401 -0700
1482 -+++ audit-2.8.2/auparse/auparse.c 2018-03-11 17:19:15.311920608 -0700
1483 -@@ -1104,13 +1104,22 @@
1484 - static int extract_timestamp(const char *b, au_event_t *e)
1485 - {
1486 - char *ptr, *tmp;
1487 -+ char _tmp[341];
1488 - int rc = 1;
1489 -
1490 - e->host = NULL;
1491 - if (*b == 'n')
1492 -- tmp = strndupa(b, 340);
1493 -+ {
1494 -+ strncpy(_tmp, b, 340);
1495 -+ _tmp[340] = '\0';
1496 -+ tmp = _tmp;
1497 -+ }
1498 - else
1499 -- tmp = strndupa(b, 80);
1500 -+ {
1501 -+ strncpy(_tmp, b, 80);
1502 -+ _tmp[80] = '\0';
1503 -+ tmp = _tmp;
1504 -+ }
1505 - ptr = audit_strsplit(tmp);
1506 - if (ptr) {
1507 - // Optionally grab the node - may or may not be included
1508 -diff -Naur audit-2.8.2.orig/auparse/interpret.c audit-2.8.2/auparse/interpret.c
1509 ---- audit-2.8.2.orig/auparse/interpret.c 2018-03-11 17:16:39.359923401 -0700
1510 -+++ audit-2.8.2/auparse/interpret.c 2018-03-11 17:19:51.658919957 -0700
1511 -@@ -860,7 +860,7 @@
1512 - // Proctitle has arguments separated by NUL bytes
1513 - // We need to write over the NUL bytes with a space
1514 - // so that we can see the arguments
1515 -- while ((ptr = rawmemchr(ptr, '\0'))) {
1516 -+ while ((ptr = memchr(ptr, '\0', SIZE_MAX))) {
1517 - if (ptr >= end)
1518 - break;
1519 - *ptr = ' ';
1520 -diff -Naur audit-2.8.2.orig/lib/libaudit.c audit-2.8.2/lib/libaudit.c
1521 ---- audit-2.8.2.orig/lib/libaudit.c 2018-03-11 17:16:39.336923401 -0700
1522 -+++ audit-2.8.2/lib/libaudit.c 2018-03-11 17:20:03.037919753 -0700
1523 -@@ -33,7 +33,7 @@
1524 - #include <pwd.h>
1525 - #include <grp.h>
1526 - #include <errno.h>
1527 --#include <sys/poll.h>
1528 -+#include <poll.h>
1529 - #include <sys/utsname.h>
1530 - #include <sys/stat.h>
1531 - #include <fcntl.h> /* O_NOFOLLOW needs gnu defined */
1532 -diff -Naur audit-2.8.2.orig/lib/netlink.c audit-2.8.2/lib/netlink.c
1533 ---- audit-2.8.2.orig/lib/netlink.c 2018-03-11 17:16:39.339923401 -0700
1534 -+++ audit-2.8.2/lib/netlink.c 2018-03-11 17:20:13.132919573 -0700
1535 -@@ -27,7 +27,7 @@
1536 - #include <errno.h>
1537 - #include <fcntl.h>
1538 - #include <time.h>
1539 --#include <sys/poll.h>
1540 -+#include <poll.h>
1541 - #include "libaudit.h"
1542 - #include "private.h"
1543 -
1544 -diff -Naur audit-2.8.2.orig/src/auditctl.c audit-2.8.2/src/auditctl.c
1545 ---- audit-2.8.2.orig/src/auditctl.c 2018-03-11 17:16:39.348923401 -0700
1546 -+++ audit-2.8.2/src/auditctl.c 2018-03-11 17:20:31.154919250 -0700
1547 -@@ -37,6 +37,7 @@
1548 - #include <sys/time.h>
1549 - #include <fcntl.h>
1550 - #include <errno.h>
1551 -+#include <sys/select.h>
1552 - #include <libgen.h> /* For basename */
1553 - #include <limits.h> /* PATH_MAX */
1554 - #include "libaudit.h"
1555 -diff -Naur audit-2.8.2.orig/src/auditd.c audit-2.8.2/src/auditd.c
1556 ---- audit-2.8.2.orig/src/auditd.c 2018-03-11 17:16:39.351923401 -0700
1557 -+++ audit-2.8.2/src/auditd.c 2018-03-11 17:22:04.763917574 -0700
1558 -@@ -30,6 +30,7 @@
1559 - #include <errno.h>
1560 - #include <string.h>
1561 - #include <time.h>
1562 -+#include <alloca.h>
1563 - #include <sys/resource.h>
1564 - #include <sys/time.h>
1565 - #include <sys/stat.h>
1566 -@@ -187,7 +188,9 @@
1567 -
1568 - static int extract_type(const char *str)
1569 - {
1570 -- const char *tptr, *ptr2, *ptr = str;
1571 -+ const char *ptr2, *ptr = str;
1572 -+ char *tptr;
1573 -+
1574 - if (*str == 'n') {
1575 - ptr = strchr(str+1, ' ');
1576 - if (ptr == NULL)
1577 -@@ -197,7 +200,9 @@
1578 - // ptr should be at 't'
1579 - ptr2 = strchr(ptr, ' ');
1580 - // get type=xxx in a buffer
1581 -- tptr = strndupa(ptr, ptr2 - ptr);
1582 -+ tptr = (char *) alloca(ptr2 - ptr + 1);
1583 -+ strncpy(tptr, ptr, ptr2 - ptr);
1584 -+ tptr[ptr2 - ptr] = '\0';
1585 - // find =
1586 - str = strchr(tptr, '=');
1587 - if (str == NULL)
1588 -diff -Naur audit-2.8.2.orig/src/ausearch-lol.c audit-2.8.2/src/ausearch-lol.c
1589 ---- audit-2.8.2.orig/src/ausearch-lol.c 2018-03-11 17:16:39.351923401 -0700
1590 -+++ audit-2.8.2/src/ausearch-lol.c 2018-03-11 17:23:30.575916037 -0700
1591 -@@ -135,12 +135,21 @@
1592 - static int extract_timestamp(const char *b, event *e)
1593 - {
1594 - char *ptr, *tmp, *tnode, *ttype;
1595 -+ char _tmp[341];
1596 -
1597 - e->node = NULL;
1598 - if (*b == 'n')
1599 -- tmp = strndupa(b, 340);
1600 -+ {
1601 -+ strncpy(_tmp, b, 340);
1602 -+ _tmp[340] = '\0';
1603 -+ tmp = _tmp;
1604 -+ }
1605 - else
1606 -- tmp = strndupa(b, 80);
1607 -+ {
1608 -+ strncpy(_tmp, b, 80);
1609 -+ _tmp[80] = '\0';
1610 -+ tmp = _tmp;
1611 -+ }
1612 - ptr = audit_strsplit(tmp);
1613 - if (ptr) {
1614 - // Check to see if this is the node info
1615
1616 diff --git a/sys-process/audit/files/audit-2.8.4-ia64-compile-fix.patch b/sys-process/audit/files/audit-2.8.4-ia64-compile-fix.patch
1617 deleted file mode 100644
1618 index ef04f720..00000000
1619 --- a/sys-process/audit/files/audit-2.8.4-ia64-compile-fix.patch
1620 +++ /dev/null
1621 @@ -1,195 +0,0 @@
1622 ---- a/audisp/audispd.c
1623 -+++ b/audisp/audispd.c
1624 -@@ -21,6 +21,7 @@
1625 - */
1626 -
1627 - #include "config.h"
1628 -+#include "fixup.h"
1629 - #include <stdio.h>
1630 - #include <unistd.h>
1631 - #include <stdlib.h>
1632 ---- a/audisp/plugins/prelude/audisp-prelude.c
1633 -+++ b/audisp/plugins/prelude/audisp-prelude.c
1634 -@@ -21,6 +21,8 @@
1635 - *
1636 - */
1637 -
1638 -+#include "config.h"
1639 -+#include "fixup.h"
1640 - #include <stdio.h>
1641 - #include <stdlib.h>
1642 - #include <signal.h>
1643 ---- a/audisp/plugins/remote/audisp-remote.c
1644 -+++ b/audisp/plugins/remote/audisp-remote.c
1645 -@@ -22,6 +22,7 @@
1646 - */
1647 -
1648 - #include "config.h"
1649 -+#include "fixup.h"
1650 - #include <stdio.h>
1651 - #include <signal.h>
1652 - #include <syslog.h>
1653 ---- a/configure.ac
1654 -+++ b/configure.ac
1655 -@@ -216,6 +216,9 @@ AC_ARG_ENABLE(zos-remote,
1656 - AM_CONDITIONAL(ENABLE_ZOS_REMOTE, test "x$enable_zos_remote" != "xno")
1657 - AC_MSG_RESULT($enable_zos_remote)
1658 -
1659 -+AC_CHECK_HEADER([asm/ptrace.h], [AC_DEFINE([HAVE_ASM_PTRACE_H],[],[Define to 1 if you have asm/ptrace.h])], [])
1660 -+AC_CHECK_HEADER([linux/ptrace.h], [AC_DEFINE([HAVE_LINUX_PTRACE_H],[],[Define to 1 if you have linux/ptrace.h])], [])
1661 -+
1662 - #gssapi
1663 - AC_ARG_ENABLE(gssapi_krb5,
1664 - [AS_HELP_STRING([--enable-gssapi-krb5],[Enable GSSAPI Kerberos 5 support @<:@default=no@:>@])],
1665 ---- a/contrib/plugin/audisp-example.c
1666 -+++ b/contrib/plugin/audisp-example.c
1667 -@@ -37,6 +37,8 @@
1668 - */
1669 -
1670 - #define _GNU_SOURCE
1671 -+#include "config.h"
1672 -+#include "fixup.h"
1673 - #include <stdio.h>
1674 - #include <signal.h>
1675 - #include <string.h>
1676 ---- a/contrib/skeleton.c
1677 -+++ b/contrib/skeleton.c
1678 -@@ -13,6 +13,8 @@
1679 - * gcc skeleton.c -o skeleton -laudit
1680 - */
1681 -
1682 -+#include "config.h"
1683 -+#include "fixup.h"
1684 - #include <stdio.h>
1685 - #include <sys/types.h>
1686 - #include <sys/uio.h>
1687 ---- /dev/null
1688 -+++ b/lib/fixup.h
1689 -@@ -0,0 +1,17 @@
1690 -+#ifndef _AUDIT_IA64_FIXUP_H_
1691 -+#define _AUDIT_IA64_FIXUP_H_
1692 -+
1693 -+#ifdef __ia64__ /* what a pos */
1694 -+# include <linux/types.h>
1695 -+# define _ASM_IA64_FPU_H
1696 -+#endif
1697 -+#include <signal.h>
1698 -+/*
1699 -+#ifdef HAVE_ASM_PTRACE_H
1700 -+# include <asm/ptrace.h>
1701 -+#endif
1702 -+#ifdef HAVE_LINUX_PTRACE_H
1703 -+# include <linux/ptrace.h>
1704 -+#endif
1705 -+*/
1706 -+#endif
1707 ---- a/src/auditctl.c
1708 -+++ b/src/auditctl.c
1709 -@@ -23,6 +23,7 @@
1710 - */
1711 -
1712 - #include "config.h"
1713 -+#include "fixup.h"
1714 - #include <stdio.h>
1715 - #include <stdlib.h>
1716 - #include <stdbool.h>
1717 ---- a/src/auditd-config.c
1718 -+++ b/src/auditd-config.c
1719 -@@ -22,6 +22,7 @@
1720 - */
1721 -
1722 - #include "config.h"
1723 -+#include "fixup.h"
1724 - #include <stdio.h>
1725 - #include <unistd.h>
1726 - #include <sys/stat.h>
1727 ---- a/src/auditd-dispatch.c
1728 -+++ b/src/auditd-dispatch.c
1729 -@@ -22,6 +22,7 @@
1730 - */
1731 -
1732 - #include "config.h"
1733 -+#include "fixup.h"
1734 - #include <unistd.h>
1735 - #include <sys/uio.h>
1736 - #include <fcntl.h>
1737 ---- a/src/auditd-event.c
1738 -+++ b/src/auditd-event.c
1739 -@@ -22,6 +22,7 @@
1740 - */
1741 -
1742 - #include "config.h"
1743 -+#include "fixup.h"
1744 - #include <stdlib.h>
1745 - #include <unistd.h>
1746 - #include <pthread.h>
1747 ---- a/src/auditd-listen.c
1748 -+++ b/src/auditd-listen.c
1749 -@@ -23,6 +23,7 @@
1750 - */
1751 -
1752 - #include "config.h"
1753 -+#include "fixup.h"
1754 - #include <stdio.h>
1755 - #include <unistd.h>
1756 - #include <sys/stat.h>
1757 ---- a/src/auditd-reconfig.c
1758 -+++ b/src/auditd-reconfig.c
1759 -@@ -22,6 +22,7 @@
1760 - */
1761 -
1762 - #include "config.h"
1763 -+#include "fixup.h"
1764 - #include <pthread.h>
1765 - #include <signal.h>
1766 - #include <stdlib.h>
1767 ---- a/src/auditd-sendmail.c
1768 -+++ b/src/auditd-sendmail.c
1769 -@@ -22,6 +22,7 @@
1770 - */
1771 -
1772 - #include "config.h"
1773 -+#include "fixup.h"
1774 - #include <stdio.h>
1775 - #include <unistd.h> // for access()
1776 - #include <string.h>
1777 ---- a/src/auditd.c
1778 -+++ b/src/auditd.c
1779 -@@ -22,6 +22,7 @@
1780 - */
1781 -
1782 - #include "config.h"
1783 -+#include "fixup.h"
1784 - #include <stdio.h>
1785 - #include <sys/types.h>
1786 - #include <unistd.h>
1787 ---- a/src/ausearch.c
1788 -+++ b/src/ausearch.c
1789 -@@ -22,6 +22,7 @@
1790 - */
1791 -
1792 - #include "config.h"
1793 -+#include "fixup.h"
1794 - #include <stdio.h>
1795 - #include <stdio_ext.h>
1796 - #include <string.h>
1797 ---- a/src/autrace.c
1798 -+++ b/src/autrace.c
1799 -@@ -21,6 +21,7 @@
1800 - */
1801 -
1802 - #include "config.h"
1803 -+#include "fixup.h"
1804 - #include <stdio.h>
1805 - #include <string.h>
1806 - #include <sys/wait.h>
1807 ---- a/src/delete_all.c
1808 -+++ b/src/delete_all.c
1809 -@@ -20,6 +20,7 @@
1810 - * Steve Grubb <sgrubb@××××××.com>
1811 - */
1812 - #include "config.h"
1813 -+#include "fixup.h"
1814 - #include <stdio.h>
1815 - #include <string.h>
1816 - #include <errno.h>
1817
1818 diff --git a/sys-process/audit/files/audit-2.8.5-all-get-rid-of-strndupa.patch b/sys-process/audit/files/audit-2.8.5-all-get-rid-of-strndupa.patch
1819 deleted file mode 100644
1820 index c53dec66..00000000
1821 --- a/sys-process/audit/files/audit-2.8.5-all-get-rid-of-strndupa.patch
1822 +++ /dev/null
1823 @@ -1,57 +0,0 @@
1824 -From 38d950e468c1e51937530f884b138076e4897da2 Mon Sep 17 00:00:00 2001
1825 -From: Tycho Andersen <tycho@××××××.com>
1826 -Date: Mon, 13 Mar 2017 16:40:08 -0700
1827 -Subject: [PATCH 3/4] all: get rid of strndupa
1828 -
1829 -in one case (src/auditd.c) we don't even need to allocate a buffer, in the
1830 -other two we do it in two steps to avoid using a non-standard function.
1831 -
1832 -Signed-off-by: Tycho Andersen <tycho@××××××.com>
1833 ----
1834 - auparse/auparse.c | 6 ++++--
1835 - src/auditd.c | 10 +++++-----
1836 - src/ausearch-lol.c | 6 ++++--
1837 - 3 files changed, 13 insertions(+), 9 deletions(-)
1838 -
1839 -diff --git a/auparse/auparse.c b/auparse/auparse.c
1840 -index 058f544..f61d204 100644
1841 ---- a/auparse/auparse.c
1842 -+++ b/auparse/auparse.c
1843 -@@ -1102,10 +1102,12 @@ static int extract_timestamp(const char *b, au_event_t *e)
1844 - int rc = 1;
1845 -
1846 - e->host = NULL;
1847 -+
1848 -+ tmp = alloca(340);
1849 - if (*b == 'n')
1850 -- tmp = strndupa(b, 340);
1851 -+ tmp = strncpy(tmp, b, 340);
1852 - else
1853 -- tmp = strndupa(b, 80);
1854 -+ tmp = strncpy(tmp, b, 80);
1855 - ptr = audit_strsplit(tmp);
1856 - if (ptr) {
1857 - // Optionally grab the node - may or may not be included
1858 -diff --git a/src/ausearch-lol.c b/src/ausearch-lol.c
1859 -index 29d0a32..3a2e5e8 100644
1860 ---- a/src/ausearch-lol.c
1861 -+++ b/src/ausearch-lol.c
1862 -@@ -135,10 +135,12 @@ static int extract_timestamp(const char *b, event *e)
1863 - char *ptr, *tmp, *tnode, *ttype;
1864 -
1865 - e->node = NULL;
1866 -+
1867 -+ tmp = alloca(340);
1868 - if (*b == 'n')
1869 -- tmp = strndupa(b, 340);
1870 -+ tmp = strncpy(tmp, b, 340);
1871 - else
1872 -- tmp = strndupa(b, 80);
1873 -+ tmp = strncpy(tmp, b, 80);
1874 - ptr = audit_strsplit(tmp);
1875 - if (ptr) {
1876 - // Check to see if this is the node info
1877 ---
1878 -2.13.1
1879 -
1880 -
1881
1882 diff --git a/sys-process/audit/files/audit-2.8.5-auparse-remove-use-of-rawmemchr.patch b/sys-process/audit/files/audit-2.8.5-auparse-remove-use-of-rawmemchr.patch
1883 deleted file mode 100644
1884 index ae2ce829..00000000
1885 --- a/sys-process/audit/files/audit-2.8.5-auparse-remove-use-of-rawmemchr.patch
1886 +++ /dev/null
1887 @@ -1,33 +0,0 @@
1888 -From 8f2a6788b78dd6b219545aacbd42e2f84df8c71a Mon Sep 17 00:00:00 2001
1889 -From: Tycho Andersen <tycho@××××××.com>
1890 -Date: Mon, 13 Mar 2017 16:17:10 -0700
1891 -Subject: [PATCH 2/4] auparse: remove use of rawmemchr
1892 -
1893 -just iterate over the string instead, it's much simpler and doesn't use a
1894 -glibc extension.
1895 -
1896 -Signed-off-by: Tycho Andersen <tycho@××××××.com>
1897 ----
1898 - auparse/interpret.c | 7 +++----
1899 - 1 file changed, 3 insertions(+), 4 deletions(-)
1900 -
1901 -diff --git a/auparse/interpret.c b/auparse/interpret.c
1902 -index ea17c41..75b7679 100644
1903 ---- a/auparse/interpret.c
1904 -+++ b/auparse/interpret.c
1905 -@@ -819,10 +819,9 @@ static const char *print_proctitle(const char *val)
1906 - // Proctitle has arguments separated by NUL bytes
1907 - // We need to write over the NUL bytes with a space
1908 - // so that we can see the arguments
1909 -- while ((ptr = rawmemchr(ptr, '\0'))) {
1910 -- if (ptr >= end)
1911 -- break;
1912 -- *ptr = ' ';
1913 -+ while (ptr < end) {
1914 -+ if (*ptr == '\0')
1915 -+ *ptr = ' ';
1916 - ptr++;
1917 - }
1918 - }
1919 ---
1920 -2.13.1
1921
1922 diff --git a/sys-process/audit/files/audit.rules b/sys-process/audit/files/audit.rules
1923 deleted file mode 100644
1924 index ef0e6ee2..00000000
1925 --- a/sys-process/audit/files/audit.rules
1926 +++ /dev/null
1927 @@ -1,24 +0,0 @@
1928 -# Copyright 1999-2005 Gentoo Foundation
1929 -# Distributed under the terms of the GNU General Public License v2
1930 -#
1931 -# This file contains the auditctl rules that are loaded
1932 -# whenever the audit daemon is started via the initscripts.
1933 -# The rules are simply the parameters that would be passed
1934 -# to auditctl.
1935 -
1936 -# First rule - delete all
1937 -# This is to clear out old rules, so we don't append to them.
1938 --D
1939 -
1940 -# Feel free to add below this line. See auditctl man page
1941 -
1942 -# The following rule would cause all of the syscalls listed to be ignored in logging.
1943 -# -a entry,never -S read -S write -S open -S fstat -S fstat64 -S mmap -S brk -S munmap -S _llseek -S nanosleep -S fcntl64 -S close -S dup2 -S rt_sigaction -S stat64 -S stat
1944 -
1945 -# The following rule would cause the capture of all systems not caught above.
1946 -# -a entry,always -S all
1947 -
1948 -# Increase the buffers to survive stress events
1949 --b 256
1950 -
1951 -# vim:ft=conf:
1952
1953 diff --git a/sys-process/audit/files/audit.rules-2.1.3 b/sys-process/audit/files/audit.rules-2.1.3
1954 deleted file mode 100644
1955 index 25dbedfd..00000000
1956 --- a/sys-process/audit/files/audit.rules-2.1.3
1957 +++ /dev/null
1958 @@ -1,25 +0,0 @@
1959 -# Copyright 1999-2011 Gentoo Foundation
1960 -# Distributed under the terms of the GNU General Public License v2
1961 -#
1962 -# This file contains the auditctl rules that are loaded
1963 -# whenever the audit daemon is started via the initscripts.
1964 -# The rules are simply the parameters that would be passed
1965 -# to auditctl.
1966 -
1967 -# First rule - delete all
1968 -# This is to clear out old rules, so we don't append to them.
1969 --D
1970 -
1971 -# Feel free to add below this line. See auditctl man page
1972 -
1973 -# The following rule would cause all of the syscalls listed to be ignored in logging.
1974 --a exit,never -F arch=b32 -S read -S write -S open -S fstat -S mmap -S brk -S munmap -S nanosleep -S fcntl -S close -S dup2 -S rt_sigaction -S stat
1975 --a exit,never -F arch=b64 -S read -S write -S open -S fstat -S mmap -S brk -S munmap -S nanosleep -S fcntl -S close -S dup2 -S rt_sigaction -S stat
1976 -
1977 -# The following rule would cause the capture of all systems not caught above.
1978 -# -a exit,always -S all
1979 -
1980 -# Increase the buffers to survive stress events
1981 --b 8192
1982 -
1983 -# vim:ft=conf:
1984
1985 diff --git a/sys-process/audit/files/audit.rules.stop.post b/sys-process/audit/files/audit.rules.stop.post
1986 deleted file mode 100644
1987 index 29ae197f..00000000
1988 --- a/sys-process/audit/files/audit.rules.stop.post
1989 +++ /dev/null
1990 @@ -1,12 +0,0 @@
1991 -# Copyright 1999-2005 Gentoo Foundation
1992 -# Distributed under the terms of the GNU General Public License v2
1993 -#
1994 -# This file contains the auditctl rules that are loaded immediately after the
1995 -# audit deamon is stopped via the initscripts.
1996 -# The rules are simply the parameters that would be passed
1997 -# to auditctl.
1998 -
1999 -# Not used for the default Gentoo configuration as of v1.2.3
2000 -# Paranoid security types might wish to reconfigure kauditd here.
2001 -
2002 -# vim:ft=conf:
2003
2004 diff --git a/sys-process/audit/files/audit.rules.stop.pre b/sys-process/audit/files/audit.rules.stop.pre
2005 deleted file mode 100644
2006 index 1f341733..00000000
2007 --- a/sys-process/audit/files/audit.rules.stop.pre
2008 +++ /dev/null
2009 @@ -1,15 +0,0 @@
2010 -# Copyright 1999-2011 Gentoo Foundation
2011 -# Distributed under the terms of the GNU General Public License v2
2012 -#
2013 -# This file contains the auditctl rules that are loaded immediately before the
2014 -# audit deamon is stopped via the initscripts.
2015 -# The rules are simply the parameters that would be passed
2016 -# to auditctl.
2017 -
2018 -# auditd is stopping, don't capture events anymore
2019 --D
2020 -
2021 -# Disable kernel generating audit events
2022 --e 0
2023 -
2024 -# vim:ft=conf:
2025
2026 diff --git a/sys-process/audit/files/auditd-conf.d-2.1.3 b/sys-process/audit/files/auditd-conf.d-2.1.3
2027 deleted file mode 100644
2028 index c66be166..00000000
2029 --- a/sys-process/audit/files/auditd-conf.d-2.1.3
2030 +++ /dev/null
2031 @@ -1,22 +0,0 @@
2032 -# Copyright 1999-2011 Gentoo Foundation
2033 -# Distributed under the terms of the GNU General Public License v2
2034 -
2035 -# Configuration options for auditd
2036 -# -f for foreground mode
2037 -# There are some other options as well, but you'll have to look in the source
2038 -# code to find them as they aren't ready for use yet.
2039 -EXTRAOPTIONS=''
2040 -
2041 -# Audit rules file to run after starting auditd
2042 -RULEFILE_STARTUP=/etc/audit/audit.rules
2043 -
2044 -# Audit rules file to run before and after stopping auditd
2045 -RULEFILE_STOP_PRE=/etc/audit/audit.rules.stop.pre
2046 -RULEFILE_STOP_POST=/etc/audit/audit.rules.stop.post
2047 -
2048 -# If you want to enforce a certain locale for auditd,
2049 -# uncomment one of the next lines:
2050 -#AUDITD_LANG=none
2051 -AUDITD_LANG=C
2052 -#AUDITD_LANG=en_US
2053 -#AUDITD_LANG=en_US.UTF-8
2054
2055 diff --git a/sys-process/audit/files/auditd-init.d-2.4.3 b/sys-process/audit/files/auditd-init.d-2.4.3
2056 deleted file mode 100644
2057 index c952554d..00000000
2058 --- a/sys-process/audit/files/auditd-init.d-2.4.3
2059 +++ /dev/null
2060 @@ -1,90 +0,0 @@
2061 -#!/sbin/openrc-run
2062 -# Copyright 1999-2015 Gentoo Foundation
2063 -# Distributed under the terms of the GNU General Public License v2
2064 -
2065 -extra_started_commands='reload reload_auditd reload_rules'
2066 -description='Linux Auditing System'
2067 -description_reload='Reload daemon configuration and rules'
2068 -description_reload_rules='Reload daemon rules'
2069 -description_reload_auditd='Reload daemon configuration'
2070 -
2071 -name='auditd'
2072 -pidfile='/var/run/auditd.pid'
2073 -command='/sbin/auditd'
2074 -
2075 -start_auditd() {
2076 - # Env handling taken from the upstream init script
2077 - if [ -z "$AUDITD_LANG" -o "$AUDITD_LANG" = "none" -o "$AUDITD_LANG" = "NONE" ]; then
2078 - unset LANG LC_TIME LC_ALL LC_MESSAGES LC_NUMERIC LC_MONETARY LC_COLLATE
2079 - else
2080 - LANG="$AUDITD_LANG"
2081 - LC_TIME="$AUDITD_LANG"
2082 - LC_ALL="$AUDITD_LANG"
2083 - LC_MESSAGES="$AUDITD_LANG"
2084 - LC_NUMERIC="$AUDITD_LANG"
2085 - LC_MONETARY="$AUDITD_LANG"
2086 - LC_COLLATE="$AUDITD_LANG"
2087 - export LANG LC_TIME LC_ALL LC_MESSAGES LC_NUMERIC LC_MONETARY LC_COLLATE
2088 - fi
2089 - unset HOME MAIL USER USERNAME
2090 -
2091 - ebegin "Starting ${name}"
2092 - start-stop-daemon \
2093 - --start --quiet --pidfile ${pidfile} \
2094 - --exec ${command} -- ${EXTRAOPTIONS}
2095 - local ret=$?
2096 - eend $ret
2097 - return $ret
2098 -}
2099 -
2100 -stop_auditd() {
2101 - ebegin "Stopping ${name}"
2102 - start-stop-daemon --stop --quiet --pidfile ${pidfile}
2103 - local ret=$?
2104 - eend $ret
2105 - return $ret
2106 -}
2107 -
2108 -loadfile() {
2109 - local rules="$1"
2110 - if [ -n "${rules}" -a -f "${rules}" ]; then
2111 - einfo "Loading audit rules from ${rules}"
2112 - /sbin/auditctl -R "${rules}" >/dev/null
2113 - return $?
2114 - else
2115 - return 0
2116 - fi
2117 -}
2118 -
2119 -start() {
2120 - start_auditd
2121 - local ret=$?
2122 - if [ $ret -eq 0 -a "${RC_CMD}" != "restart" ]; then
2123 - loadfile "${RULEFILE_STARTUP}"
2124 - fi
2125 - return $ret
2126 -}
2127 -
2128 -reload_rules() {
2129 - loadfile "${RULEFILE_STARTUP}"
2130 -}
2131 -
2132 -reload_auditd() {
2133 - ebegin "Reloading ${SVCNAME}"
2134 - start-stop-daemon --signal HUP \
2135 - --exec "${command}" --pidfile "${pidfile}"
2136 - eend $?
2137 -}
2138 -
2139 -reload() {
2140 - reload_auditd
2141 - reload_rules
2142 -}
2143 -
2144 -stop() {
2145 - [ "${RC_CMD}" != "restart" ] && loadfile "${RULEFILE_STOP_PRE}"
2146 - stop_auditd
2147 - local ret=$?
2148 - [ "${RC_CMD}" != "restart" ] && loadfile "${RULEFILE_STOP_POST}"
2149 - return $ret
2150 -}
2151
2152 diff --git a/sys-process/audit/metadata.xml b/sys-process/audit/metadata.xml
2153 deleted file mode 100644
2154 index 4d788155..00000000
2155 --- a/sys-process/audit/metadata.xml
2156 +++ /dev/null
2157 @@ -1,10 +0,0 @@
2158 -<?xml version="1.0" encoding="UTF-8"?>
2159 -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
2160 -<pkgmetadata>
2161 - <maintainer type="person">
2162 - <email>robbat2@g.o</email>
2163 - </maintainer>
2164 - <use>
2165 - <flag name="gssapi">Enable GSSAPI support</flag>
2166 - </use>
2167 -</pkgmetadata>