From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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 finch.gentoo.org (Postfix) with ESMTPS id 0AB4B1582EF for ; Mon, 10 Mar 2025 01:17:33 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id E5759343070 for ; Mon, 10 Mar 2025 01:17:32 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id E5597110370; Mon, 10 Mar 2025 01:17:31 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id DA9E9110370 for ; Mon, 10 Mar 2025 01:17:31 +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 82579343070 for ; Mon, 10 Mar 2025 01:17:31 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1A7272853 for ; Mon, 10 Mar 2025 01:17:30 +0000 (UTC) From: "Mike Gilbert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Gilbert" Message-ID: <1741568952.c4ab05df4bc28a42d6ecb0f1e6026d8854a7b76c.floppym@gentoo> Subject: [gentoo-commits] proj/sandbox:master commit in: libsandbox/ X-VCS-Repository: proj/sandbox X-VCS-Files: libsandbox/trace.c X-VCS-Directories: libsandbox/ X-VCS-Committer: floppym X-VCS-Committer-Name: Mike Gilbert X-VCS-Revision: c4ab05df4bc28a42d6ecb0f1e6026d8854a7b76c X-VCS-Branch: master Date: Mon, 10 Mar 2025 01:17:30 +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: f8076f4a-2778-4baf-886a-6ad863c853a4 X-Archives-Hash: 0760fedd96ae2ff527b4b385cd943608 commit: c4ab05df4bc28a42d6ecb0f1e6026d8854a7b76c Author: Mike Gilbert gentoo org> AuthorDate: Mon Mar 10 01:09:12 2025 +0000 Commit: Mike Gilbert gentoo org> CommitDate: Mon Mar 10 01:09:12 2025 +0000 URL: https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=c4ab05df libsandbox: try close_range if closefrom is unavailable Signed-off-by: Mike Gilbert gentoo.org> libsandbox/trace.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libsandbox/trace.c b/libsandbox/trace.c index e685ea4..4f8ea61 100644 --- a/libsandbox/trace.c +++ b/libsandbox/trace.c @@ -529,6 +529,10 @@ static void close_all_fds(void) #ifdef HAVE_CLOSEFROM closefrom(0); #else +#ifdef SYS_close_range + if (0 == syscall(SYS_close_range, 0U, ~0U, 0)) + return; +#endif DIR *dirp; struct dirent *de; int dfd, fd;