BmW
unread,Dec 14, 2010, 5:51:20 AM12/14/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mc-bugs
Hello!
I found a bug that makes it impossible to use filters in MC when
username contains character '\'.
In ubuntu when it connect to windows AD username looks like "DOMAINNAME
\username", so it contains '\' and when i try to view .html (for
example) i got this error message:
/bin/sh: Can't open /tmp/mc-DOMAINNAMEusername/mcextQj6A7d
to reproduce this bug you can create user a\b, run mc by this user and
try to view .html file.
# useradd a\\b
# su - a\\b
$ mc
...
'\' character eaten by function popen in mcview_load_command_output.
sample patch for 4.7.0.6 (easy adopted for other versions)
--- 1/src/viewer/datasource.c<->2010-06-05 00:58:04.000000000 +0600
+++ 2/src/viewer/datasource.c<->2010-12-14 13:56:09.000000000 +0500
@@ -360,7 +360,7 @@
mcview_close_datasource (view);
.
open_error_pipe ();
- if ((fp = popen (command, "r")) == NULL)
+ if ((fp = popen (g_strescape (command,""), "r")) == NULL)
{
/* Avoid two messages. Message from stderr has priority. */
mcview_display (view);