Bug 202623 - mc crashes when deleting a directory with a bogus symlink over shell link
Summary: mc crashes when deleting a directory with a bogus symlink over shell link
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: mc (Show other bugs)
(Show other bugs)
Version: 5
Hardware: i386 Linux
medium
medium
Target Milestone: ---
Assignee: Jindrich Novy
QA Contact:
URL:
Whiteboard:
Keywords: Reopened
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-08-15 15:20 UTC by Radek Bíba
Modified: 2013-07-02 23:17 UTC (History)
3 users (show)

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


Attachments (Terms of Use)

Description Radek Bíba 2006-08-15 15:20:42 UTC
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 10:48:52 UTC
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 12:16:38 UTC
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 13:04:14 UTC
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 17:14:59 UTC
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.