]> git.ipfire.org Git - thirdparty/glibc.git/commit
realpath: Bring back GNU extension on ENOENT and EACCES [BZ #28996]
authorSiddhesh Poyarekar <siddhesh@sourceware.org>
Thu, 31 Mar 2022 16:30:58 +0000 (22:00 +0530)
committerSiddhesh Poyarekar <siddhesh@sourceware.org>
Thu, 31 Mar 2022 16:30:58 +0000 (22:00 +0530)
commitb416555431b47a21a855f225c6f5368ae4e4d56c
tree2b41f3506b38fec710caa1355f20437d910f77c1
parent7f2ddf7400bb959897a5fe58f7fc5fbe5e57cfae
realpath: Bring back GNU extension on ENOENT and EACCES [BZ #28996]

The GNU extension for realpath states that if the path resolution fails
with ENOENT or EACCES and the resolved buffer is non-NULL, it will
contain part of the path that failed resolution.

commit 949ad78a189194048df8a253bb31d1d11d919044 broke this when it
omitted the copy on failure.  Bring it back partially to continue
supporting this GNU extension.

Resolves: BZ #28996

Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Reviewed-by: Andreas Schwab <schwab@linux-m68k.org>
stdlib/canonicalize.c
stdlib/test-canon.c