Bug 10635

Summary: realpath portability patches
Product: glibc Reporter: Eric Blake <ebb9>
Component: libcAssignee: Adhemerval Zanella <adhemerval.zanella>
Status: RESOLVED FIXED    
Severity: normal CC: adhemerval.zanella, eblake, glibc-bugs, neleai
Priority: P2 Flags: fweimer: security-
Version: 2.10   
Target Milestone: 2.33   
Host: Target:
Build: Last reconfirmed:
Attachments: preserve errno, allow leading // support
fix typo in previous attempt
updated version of patch

Description Eric Blake 2009-09-12 03:11:36 UTC
The gnulib folks have a couple of patches to improve the portability of realpath
and canonicalize_file_name.  On error paths, the code is setting errno prior to
calling free(), but free can clobber errno.  And on systems where // is distinct
from / (as allowed by POSIX), realpath needs to honor a leading //.
Comment 1 Eric Blake 2009-09-12 03:23:22 UTC
Created attachment 4192 [details]
preserve errno, allow leading // support
Comment 2 Eric Blake 2009-09-12 11:07:23 UTC
Created attachment 4193 [details]
fix typo in previous attempt
Comment 3 Ondrej Bilka 2013-09-21 20:32:37 UTC
A patch here is now bitrotten, do we check this in some other way or this was never merged?
Comment 4 Eric Blake 2013-10-01 19:11:30 UTC
The patch is still needed, I'll respin it.
Comment 5 Eric Blake 2013-10-01 19:25:11 UTC
Created attachment 7221 [details]
updated version of patch
Comment 7 Adhemerval Zanella 2021-01-05 16:33:58 UTC
Fixed on 2.33.