Re: [PATCH v2 3/8] all: Use realpath() instead of canonicalize_file_name()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday, 2 May 2018 18:32:25 CEST Daniel P. Berrangé wrote:
> On Mon, Apr 30, 2018 at 06:52:58PM +0200, Andrea Bolognani wrote:
> > The latter is a glibc extension that's not available on other
> > operating systems, notably FreeBSD.
> > 
> > So far we have worked around the issue through gnulib, but that
> > makes it difficult to use mocking in our test suite, so just
> > drop it in favor of the portable alternative.
> 
> Sigh, unfortunately realpath() has its own portability problems
> in that passing NULL as second arg was a glibc invention, which
> is why we switched from realpath() to canonicalize_file_name()
> in the first place !

It was, but then this behaviour was standardized in POSIX 2007:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/realpath.html

> So I wonder if this actually works on OS-X, Mingw and FreeBSD,
> or whether you didn't see the bug because it is mocked in the
> tests ?

Most probably because they implement the realpath(.., NULL) semantics,
as described by POSIX.

-- 
Pino Toscano

Attachment: signature.asc
Description: This is a digitally signed message part.

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux