[libvirt] [PATCH 18/23] util: use realpath/g_canonicalize_filename

Pino Toscano ptoscano at redhat.com
Mon Jan 6 09:12:31 UTC 2020


On Thursday, 2 January 2020 15:53:52 CET Daniel P. Berrangé wrote:
> The canonicalize_file_name(path) is equivalent to calling
> realpath(path, NULL). Passing NULL for the second arg of
> realpath is not standardized behaviour, however, Linux,
> FreeBSD > 6.4 and macOS > 10.5 all support this critical
> extension.

This is not correct: POSIX.1-2008 standardizes null as possible value
for the second argument; see:
https://pubs.opengroup.org/onlinepubs/9699919799/functions/realpath.html

-- 
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20200106/3ad0b910/attachment-0001.sig>


More information about the libvir-list mailing list