Bug 11956

Summary: realpath/readlink -f with non-existent symlink target has incorrect behavior
Product: Busybox Reporter: Tibor Vass <teabee89>
Component: Standard ComplianceAssignee: unassigned
Status: RESOLVED FIXED    
Severity: minor CC: busybox-cvs
Priority: P5    
Version: 1.31.x   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:

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