Opened 10 years ago

Closed 10 years ago

#3986 closed bug (fixed)

problem with ls command (symlink traversal bug?)

Reported by: augiedoggie Owned by: bonefish
Priority: normal Milestone: R1
Component: - General Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

I've noticed that the 'ls' command is printing errors when listing certain directories, but the problem doesn't occur if you 'cd' to the directory and then list the files. (The problem also goes away if you 'unalias ls' or run /bin/ls)

For example:

~> ls /boot/develop/tools/gnupro
ls: cannot access /boot/develop/tools/gnupro/COPYING: Not a directory
ls: cannot access /boot/develop/tools/gnupro/COPYING.LIB: Not a directory
ls: cannot access /boot/develop/tools/gnupro/bin: Not a directory
ls: cannot access /boot/develop/tools/gnupro/i586-pc-haiku: Not a directory
ls: cannot access /boot/develop/tools/gnupro/include: Not a directory
ls: cannot access /boot/develop/tools/gnupro/info: Not a directory
ls: cannot access /boot/develop/tools/gnupro/lib: Not a directory
ls: cannot access /boot/develop/tools/gnupro/man: Not a directory
COPYING COPYING.LIB bin i586-pc-haiku include info lib man
~> 

Change History (3)

comment:1 Changed 10 years ago by augiedoggie

This also happens with other commands.

Examples:

~> listattr /boot/develop/tools/gnupro/COPYING
listattr: initialization failed for "/boot/develop/tools/gnupro/COPYING": Not a directory
~> listres /boot/develop/tools/gnupro/COPYING
listres: opening resources failed for "/boot/develop/tools/gnupro/COPYING": I/O error
~> rm /boot/develop/tools/gnupro/COPYING
rm: cannot remove '/boot/develop/tools/gnupro/COPYING': Not a directory
~> 

This was tested with real hardware at hrev30935 and with an alpha image from haiku-files at hrev30933

comment:2 Changed 10 years ago by bonefish

Owner: changed from axeld to bonefish
Status: newassigned

comment:3 Changed 10 years ago by bonefish

Resolution: fixed
Status: assignedclosed

Fixed in hrev30937.

Note: See TracTickets for help on using tickets.