Opened 15 years ago

Closed 15 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:
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 by augiedoggie, 15 years ago

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 by bonefish, 15 years ago

Owner: changed from axeld to bonefish
Status: newassigned

comment:3 by bonefish, 15 years ago

Resolution: fixed
Status: assignedclosed

Fixed in hrev30937.

Note: See TracTickets for help on using tickets.