Bug 202623 - mc crashes when deleting a directory with a bogus symlink over shell link
mc crashes when deleting a directory with a bogus symlink over shell link
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: mc (Show other bugs)
5
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jindrich Novy
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-08-15 11:20 EDT by Radek Bíba
Modified: 2013-07-02 19:17 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-08-23 09:04:14 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Radek Bíba 2006-08-15 11:20:42 EDT
Description of problem:
SSIA pretty much, see below for details.

Version-Release number of selected component (if applicable):
mc-4.6.1a-14.fc5

How reproducible:
Always

Steps to Reproduce:
1. have a server you can connect to via ssh, create there a directory and then
a symlink to a non-existent file in that directory
2. fire up mc, use shell link to connect to that server (can be localhost,
actually)
3. jump on remote directory which contains the bogus symlink, try F8, agree
with recursive erasure
  
Actual results:
segfault after a while, garbled terminal

Expected results:
hmm, I guess mc should be able to cope with such symlink
Comment 1 Jindrich Novy 2006-08-21 06:48:52 EDT
Having a look into the FISH code I have to say that it is pretty much beyond all
repair and may need rewrite. I fixed at least the parsing of the output of `ls
-Llan' what FISH uses to get file list from remote box so that mc no more
segfaults because of corrupted vfs input obtained from FISH.
Comment 2 Radek Bíba 2006-08-23 08:16:38 EDT
You sure about the solution? When I try to view the directory with the symlink
now, it's displayed as '!/root/test/a' (was: '/') and the status bar reads
'<readlink failed>'. It cannot be deleted, neither directly nor recursively from
the parent directory. Please don't close this bug until it's resolved, i.e. mc
is able to delete such symlink, it's not enough that it doesn't crash anymore.
Thanks.
Comment 3 Jindrich Novy 2006-08-23 09:04:14 EDT
The bug report summary says:
"mc crashes when deleting a directory with a bogus symlink over shell link"

I fixed it, so it doesn't crash any more. The problem with dangled symlink
deletion doesn't seem to be related to this fix as it doesn't depend on the
dangled symlink name (/root/test/a for instance) and the dangled symlink was
impossible to delete via fish even if it is named only "a". The "/" symlink name
comes from uninitialized memory and we are lucky that FISH is unable to delete
it as mc then resolves this name as a link to your local root. (try to press
enter with the unfixed mc on the '/' "dangling symlink"...)

The reason is that FISH is completely screwed since it doesn't know symlinks.
Note that non-dangling symlinks are shown as normal files.

Please report another bug.
Comment 4 Fedora Update System 2006-09-04 13:14:59 EDT
mc-4.6.1a-26.fc5 has been pushed for fc5, which should resolve this issue.  If these problems are still present in this version, then please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.