[Toybox] ls -d broken (should not follow symlink)

Rob Landley rob at landley.net
Thu Oct 30 03:37:35 PDT 2014


On 10/29/14 23:54, Isaac Dunham wrote:
> Hello,
> I've run across a bug that occurs in both busybox and toybox versions of ls.
> OS is Alpine Linux edge, which uses current musl and busybox 1.22.1.
> git log indicates no relevant changes to busybox ls.
> I'm using current toybox.
> 
> According to POSIX, "ls -d" means:
> -d     Do not follow symbolic links named as operands unless the -H  or
>        -L  options  are specified. Do not treat directories differently
>        than other types of files.  The  use  of  -d  with  -R  produces
>        unspecified results.
> 
> Simple testcase would be:
> ln -s /dev/null/nothing nothing	#make broken symlink
> ls -d nothing			#Which should say without error:
> 
> nothing

Got it.

http://landley.net/hg/toybox/rev/1540

Thanks,

Rob

 1414665455.0


More information about the Toybox mailing list