From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 19298 invoked from network); 19 Aug 2022 17:10:35 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 19 Aug 2022 17:10:35 -0000 Received: (qmail 13959 invoked by uid 550); 19 Aug 2022 17:10:31 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 13912 invoked from network); 19 Aug 2022 17:10:30 -0000 Date: Fri, 19 Aug 2022 13:10:17 -0400 From: Rich Felker To: NRK Cc: musl@lists.openwall.com Message-ID: <20220819171016.GI7074@brightrain.aerifal.cx> References: <652e3222-b868-3f8c-4f9e-c6e30321fc2d@gmail.com> <20220819134833.y4kzfrb6ukpnuhbc@gen2.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220819134833.y4kzfrb6ukpnuhbc@gen2.localdomain> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [musl] canonicalize_file_name(3) On Fri, Aug 19, 2022 at 07:48:33PM +0600, NRK wrote: > On Thu, Aug 18, 2022 at 07:30:10PM +0200, Alejandro Colomar wrote: > > It relies on a glibc extension to realpath(3) > > What extension are we talking about exactly? > Because `man canonicalize_file_name` states the following: > > | The call canonicalize_file_name(path) is equivalent to the call: > | realpath(path, NULL); > > Calling realpath with NULL as the 2nd parameter is well defined since > POSIX-2008 [0], if that's what you were talking about. > > [0]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/realpath.html This. To further elaborate, we generally don't add nonstandard functions when there is a fully portable (or even just "at least as portable as the extension" i.e. "works everywhere the extension would have worked") way to do exactly the same thing that takes no effort for the affected software to fix and do right. Rich