🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: muc.lists.netbsd.tech.userlevel
Article #43

Re: Proposal: getexecpath(3)

#43
From: Taylor R Campbell
Date: Mon, 26 Oct 2026 12:17
22 lines
2865 bytes
> Date: Mon, 26 Oct 2026 07:04:08 -0400 (EDT)
> From: Mouse <mouse@Rodents-Montreal.ORG>
> 
> > You can always pass the original verbatim exec path to realpath(3) if
> > you want to canonicalize it,
> 
> True, though that - at best - returns the hard path at the time of
> realpath (or more precisely with pieces fetched at various times
> scattered throughout the execution of realpath), which may not be the
> same as the one at the time of exec.

If the path resolution may have concurrently changed between the
execve call and the realpath call, it may as well have concurrently
changed between the execve call and the open call.

In other words, this race condition is inherent to the nature of
passing a path around; it cannot be avoided by asking the kernel to do
(the equivalent of) realpath.

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
Technical Details
Message-ID: <20261026121701.83CF784D39@mail.netbsd.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!3.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.space.net!news.muc.de!.POSTED.news.muc.de!not-for-mail
References: <202610261104.HAA21730@Stone.Rodents-Montreal.ORG>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!3.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.space.net!news.muc.de!.POSTED.news.muc.de!not-for-mail
From: Taylor R Campbell <riastradh@NetBSD.org>
Newsgroups: muc.lists.netbsd.tech.userlevel
Subject: Re: Proposal: getexecpath(3)
Date: Mon, 26 Oct 2026 12:17:00 +0000
Organization: Newsgate at muc.de e.V.
Sender: tech-userlevel-owner@NetBSD.org
Approved: news-admin@muc.de
Distribution: world
Message-ID: <20261026121701.83CF784D39@mail.netbsd.org>
References: <202610261104.HAA21730@Stone.Rodents-Montreal.ORG>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Injection-Info: news.muc.de; posting-host="news.muc.de:193.149.48.2";
	logging-data="78755"; mail-complaints-to="news-admin@muc.de"
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netbsd.org;
	s=20240131; t=1793017023;
	bh=WKWJMXtM30B1i5AvMAHqhhR+dh6JhGAhY5n9FiNpY84=;
	h=To:CC:In-reply-to:Subject:Date:From:List-Id:List-Unsubscribe;
	b=WFwnNYZ35ln1yMeez9EwGPcTLthtOowIWynSQf9/h//QlagZnnZva4fELTl6T/Zad
	 0CuTUq6MSxhVhYfQ/m86b/PiFn3wh42tjX5DtqZY32MF31hHJBtHz5TC4kM/M1r7QH
	 Kat7Z2+VJuVFfyrUYJwH1FmTKahsI1+7Sveb1Vfk=
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netbsd.org;
	s=20240131; t=1793017021;
	bh=WKWJMXtM30B1i5AvMAHqhhR+dh6JhGAhY5n9FiNpY84=;
	h=To:CC:In-reply-to:Subject:Date:From;
	b=Guq2a+8SInIKVTuJbBbFmNzqWVHO61fl7IVcHDvUh98q5O3NH8G4ABq3XwkHnIWYC
	 V60I4druVQntEyV1ZFC+bTu2oo4u+NVitB8YUljJwuxALPM4PHkJ2M9n7Hfl5efgfe
	 mUpLz8eMmCJ7gITOl5YXF1tjpsk9/VscIWK+S92Q=
In-reply-to: <202610261104.HAA21730@Stone.Rodents-Montreal.ORG> (mouse@Rodents-Montreal.ORG)
Precedence: bulk
X-Newsgate-Id: f02c70b8849f+
X-No-Archive: Yes