From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 58C69158041 for ; Fri, 1 Mar 2024 07:55:44 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EFCD7E2A4A; Fri, 1 Mar 2024 07:55:42 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D3534E2A4A for ; Fri, 1 Mar 2024 07:55:42 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 17F123430FD for ; Fri, 1 Mar 2024 07:55:42 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 839F614E8 for ; Fri, 1 Mar 2024 07:55:40 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1709279679.038e31c37d6e59768ae7abf5083559a0950c308f.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-process/acct/, sys-process/acct/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-process/acct/acct-6.6.4-r4.ebuild sys-process/acct/files/acct-6.6.4-fortify-source-3-sprintf-buffer-overflow.patch sys-process/acct/files/acct.tmpfiles X-VCS-Directories: sys-process/acct/ sys-process/acct/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 038e31c37d6e59768ae7abf5083559a0950c308f X-VCS-Branch: master Date: Fri, 1 Mar 2024 07:55:40 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 7cf272d4-0873-430b-ae4d-eab5dbfc17c2 X-Archives-Hash: 78783f94e3e03fa9ed12ec2a14319a14 commit: 038e31c37d6e59768ae7abf5083559a0950c308f Author: Sam James gentoo org> AuthorDate: Fri Mar 1 06:08:16 2024 +0000 Commit: Sam James gentoo org> CommitDate: Fri Mar 1 07:54:39 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=038e31c3 sys-process/acct: update EAPI 7 -> 8, fix _F_S=3 crash, fix startup * EAPI 8 * Fix crash with _FORTIFY_SOURCE=3 (bug #925419) * Use tmpfiles to create /var/accounts/pacct which fixes startup/use on new installs * Drop ancient workaround (bug #239748) Bug: https://bugs.gentoo.org/239748 Signed-off-by: Sam James gentoo.org> sys-process/acct/acct-6.6.4-r4.ebuild | 55 ++++++++++++++++++++++ ...-fortify-source-3-sprintf-buffer-overflow.patch | 15 ++++++ sys-process/acct/files/acct.tmpfiles | 1 + 3 files changed, 71 insertions(+) diff --git a/sys-process/acct/acct-6.6.4-r4.ebuild b/sys-process/acct/acct-6.6.4-r4.ebuild new file mode 100644 index 000000000000..980c95891435 --- /dev/null +++ b/sys-process/acct/acct-6.6.4-r4.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools systemd tmpfiles + +DESCRIPTION="GNU system accounting utilities" +HOMEPAGE="https://savannah.gnu.org/projects/acct/" +SRC_URI="mirror://gnu/${PN}/${P}.tar.bz2" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux" +IUSE="selinux" + +RDEPEND="selinux? ( sec-policy/selinux-acct )" +BDEPEND="sys-apps/texinfo" + +PATCHES=( + "${FILESDIR}"/${PN}-6.6.4-cross-compile-fixed.patch + "${FILESDIR}"/${PN}-6.6.4-fortify-source-3-sprintf-buffer-overflow.patch +) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + econf --enable-linux-multiformat +} + +src_install() { + default + + keepdir /var/account + + newinitd "${FILESDIR}"/acct.initd-r2 acct + newconfd "${FILESDIR}"/acct.confd-r1 acct + + systemd_dounit "${FILESDIR}"/acct.service + + insinto /etc/logrotate.d + newins "${FILESDIR}"/acct.logrotate-r1 psacct + + # sys-apps/sysvinit already provides this + rm "${ED}"/usr/bin/last "${ED}"/usr/share/man/man1/last.1 || die + + newtmpfiles "${FILESDIR}"/acct.tmpfiles acct.conf +} + +pkg_postinst() { + tmpfiles_process acct.conf +} diff --git a/sys-process/acct/files/acct-6.6.4-fortify-source-3-sprintf-buffer-overflow.patch b/sys-process/acct/files/acct-6.6.4-fortify-source-3-sprintf-buffer-overflow.patch new file mode 100644 index 000000000000..83f6e33415e7 --- /dev/null +++ b/sys-process/acct/files/acct-6.6.4-fortify-source-3-sprintf-buffer-overflow.patch @@ -0,0 +1,15 @@ +https://bugs.gentoo.org/925419 +https://bugzilla.redhat.com/2190057 +https://src.fedoraproject.org/rpms/psacct/blob/rawhide/f/psacct-6.6.4-sprintf-buffer-overflow.patch + +--- a/dev_hash.c ++++ b/dev_hash.c +@@ -147,7 +147,7 @@ static void setup_devices(char *dirname) + { + char *fullname = (char *) alloca ((strlen (dirname) + + NAMLEN (dp) +- + 1) * sizeof (char)); ++ + 2) * sizeof (char)); /* slash + null; Fedora BZ#2190057 */ + + (void)sprintf (fullname, "%s/%s", dirname, dp->d_name); + if (stat (fullname, &sp)) diff --git a/sys-process/acct/files/acct.tmpfiles b/sys-process/acct/files/acct.tmpfiles new file mode 100644 index 000000000000..8f2b1e6f303c --- /dev/null +++ b/sys-process/acct/files/acct.tmpfiles @@ -0,0 +1 @@ +f /var/account/pacct 0600 - - - -