[Bug 2923] New: busybox ls -F <symbolic-link-file> does not print '@' symbol.
bugzilla at busybox.net
bugzilla at busybox.net
Fri Dec 10 04:18:53 UTC 2010
https://bugs.busybox.net/show_bug.cgi?id=2923
Summary: busybox ls -F <symbolic-link-file> does not print '@'
symbol.
Product: Busybox
Version: 1.17.x
Platform: PC
OS/Version: Linux
Status: NEW
Severity: major
Priority: P5
Component: Standard Compliance
AssignedTo: unassigned at busybox.net
ReportedBy: kimyunho at kaist.ac.kr
CC: busybox-cvs at busybox.net
Estimated Hours: 0.0
We found the following bug by applying Concolic testing technique
to busybox ls. Please see the following bug symptom compared to
linux ls utility.
--------------------------------------------
jiny at ubuntu:~/bugs$ ls -al
drwxr-xr-x 2 jiny jiny 4096 2010-12-17 06:55 .
drwxr-xr-x 47 jiny jiny 4096 2010-12-17 06:55 ..
-rw-r--r-- 1 jiny jiny 0 2010-12-17 06:55 t
lrwxrwxrwx 1 jiny jiny 1 2010-12-17 06:55 t.lnk -> t
/*** BUG SYMPTOM ***/
jiny at ubuntu:~/bugs$ ls -F t.lnk
t.lnk@
jiny at ubuntu:~/bugs$ /mnt/hgfs/sharevm/busybox-1.17.4/busybox ls -F t.lnk
t.lnk /* <--- NO @ SYMBOL PRINTED */
/*** W/O symbolic file name as a command line parameter,
busybox ls -F works fine ***/
jiny at ubuntu:~/bugs$ ls -F
t t.lnk@
jiny at ubuntu:~/bugs$ /mnt/hgfs/sharevm/busybox-1.17.4/busybox ls -F
t t.lnk@
---------------------------------------------
We found that the third argument passed to my_stat at 1074 line of ls.c
is the source of the problem.
1074: cur = my_stat(*argv, *argv, !(all_fmt & (STYLE_LONG|LIST_BLOCKS)));
-------------------------------------
The third argument becomes true when -F w/ no other options is given,
which enforces my_stat() to invoke stat() (see line 298) instead of lstat().
Consequently, '@' is not printed out.
--
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the busybox-cvs
mailing list