Created attachment 329999 [details] Proposed patch Description of problem: Opening a symlink on a NFS share with evince cause an error: Unable to open document Unhandled MIME type: “application/octet-stream” Version-Release number of selected component (if applicable): evince-0.6.0-8.el5 gnome-vfs2-2.16.0-9.el5 How reproducible: 100% reproducible Steps to Reproduce: 1. Mount a NFS share on /mnt/test 2. put a PDF file as /mnt/test/some.pdf 2. Create a link from /mnt/test/some.pdf to /mnt/test/test.pdf 3. Use evince to open "/mnt/test/test.pdf" Actual results: evince is "Unable to open document" Expected results: evince opens the document Additional info: This is the upstream bug #331254 that became obsolete when evince switched to gio. The problem is that evince checks if the file is local with gnome_vfs_uri_is_local() which returns FALSE for NFS mounts. As a result, evince will call gnome_vfs_xfer_uri() on the symlink on the NFS share, which uses copy_symlink() because the type is GNOME_VFS_FILE_TYPE_SYMBOLIC_LINK. Therefore gnome_vfs_xfer_uri() copies a link a link and we end up with a dangling symlink in /tmp/evince-{$PID}/document-0-file.pdf By default, the MIME type associated with a symlink for which the target is missing is “application/octet-stream”, thus the error. The fix adds a check to see if the source is a link, in which case it does not try to vfs_xfer_uri() the file. Proposed patch attached.
This request was evaluated by Red Hat Product Management for inclusion, but this component is not scheduled to be updated in the current Red Hat Enterprise Linux release. If you would like this request to be reviewed for the next minor release, ask your support representative to set the next rhel-x.y flag to "?".
Hi, this is a bug in gnome-vfs2. Its upstream version can be found here : http://bugzilla.gnome.org/show_bug.cgi?id=349086 (together with a reproducer) and here: http://bugzilla.gnome.org/show_bug.cgi?id=365859 I'm reassigning this. Regards Marek
Created attachment 360932 [details] Proposed patch for gnome-vfs instead This patch is for gnome-vfs. It copies the file instead of the symlink if the option GNOME_VFS_XFER_FOLLOW_LINKS is set.
This is not an approved component for 5.5 FastTrack candidate?
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2010-0032.html