Bug 11956 - realpath/readlink -f with non-existent symlink target has incorrect behavior
Summary: realpath/readlink -f with non-existent symlink target has incorrect behavior
Status: RESOLVED FIXED
Alias: None
Product: Busybox
Classification: Unclassified
Component: Standard Compliance (show other bugs)
Version: 1.31.x
Hardware: All Linux
: P5 minor
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-11 23:36 UTC by Tibor Vass
Modified: 2019-06-15 16:17 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tibor Vass 2019-06-11 23:36:32 UTC
Repro:
$ cd /tmp
$ ln -s target_does_not_exist symlink

Coreutils (expected):
$ readlink -f symlink
/tmp/target_does_not_exist
$ realpath symlink
/tmp/target_does_not_exist

Busybox (incorrect):
$ readlink -f symlink
realpath: symlink: No such file or directory
$ realpath symlink
realpath: symlink: No such file or directory

This is a different bug from https://bugs.busybox.net/show_bug.cgi?id=11021
Comment 1 Denys Vlasenko 2019-06-15 16:17:52 UTC
Fixed in git