Re: [bug #3836] As Root, upon Exit, MC chmods /dev/null 600 !
Hello Egmont, And of course you're right! :) The strange thing is that your comment doesn't show in the comments for bug # 3836 ?!. On Tue, 2 Jan 2007, Egmont Koblinger wrote: Follow-up Comment #5, bug #3836 (project mc): Some time ago dpkg had a bug: when it removed a package that contained a symlink to /dev/null, it chmod'ed /dev/null to 000. The problem was that it did a chmod() instead of lchmod(), or stat() instead of lstat() or something like that on the file to be removed. Obviously if mc changed /dev/null to 600 for everyone, we would all know about it and it would be already fixed. On the other hand I have no reason to doubt the reporter. So I guess that the bug might be that mc (or maybe its wrapper script) chmod's something to 600, and this something (a temp file maybe) happens to be a symlink to /dev/null on the reporter's system due to some special setup or env var or special wrapper script or something like that... ___ Reply to this item at: http://savannah.gnu.org/bugs/?3836 ___ Message sent via/by Savannah http://savannah.gnu.org/ ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: [PATCH] mc crashes when temporary directory cannot be created
Hi Pavel, On Sat, 2006-12-30 at 20:51 +0200, Pavel Tsekov wrote: There is an even simpler cure. In mc_tmpdir() when executing the fallback code pass an absolute path to mc_mkstemps(). This will prevent the loop. However I am not yet conviced that this is the best solution. I am still investigating. I am attaching a patch which passes an absolute path to mc_mkstemps() when invoked from mc_tmpdir(). What do you think about this fix ? I may add a comment why it is necessary to call mc_mkstemps() with an absolute path. By the way I think we should add a check whether the environment variable TMPDIR contains an absolute path. Anyway, I'll leave this for another patch. Thanks for the patch. Do you plan to convert the relative paths to absolute ones when detected? Jindrich ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: [PATCH] mc crashes when temporary directory cannot be created
Hello, On Tue, 2 Jan 2007, Jindrich Novy wrote: On Sat, 2006-12-30 at 20:51 +0200, Pavel Tsekov wrote: There is an even simpler cure. In mc_tmpdir() when executing the fallback code pass an absolute path to mc_mkstemps(). This will prevent the loop. However I am not yet conviced that this is the best solution. I am still investigating. I am attaching a patch which passes an absolute path to mc_mkstemps() when invoked from mc_tmpdir(). What do you think about this fix ? I may add a comment why it is necessary to call mc_mkstemps() with an absolute path. By the way I think we should add a check whether the environment variable TMPDIR contains an absolute path. Anyway, I'll leave this for another patch. Thanks for the patch. Do you plan to convert the relative paths to absolute ones when detected? I think TMPDIR should be ignored in this case. What's your opinion ? ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: [PATCH] mc crashes when temporary directory cannot be created
Hi Pavel, On Tue, 2007-01-02 at 16:28 +0200, Pavel Tsekov wrote: On Tue, 2 Jan 2007, Jindrich Novy wrote: On Sat, 2006-12-30 at 20:51 +0200, Pavel Tsekov wrote: There is an even simpler cure. In mc_tmpdir() when executing the fallback code pass an absolute path to mc_mkstemps(). This will prevent the loop. However I am not yet conviced that this is the best solution. I am still investigating. I am attaching a patch which passes an absolute path to mc_mkstemps() when invoked from mc_tmpdir(). What do you think about this fix ? I may add a comment why it is necessary to call mc_mkstemps() with an absolute path. By the way I think we should add a check whether the environment variable TMPDIR contains an absolute path. Anyway, I'll leave this for another patch. Thanks for the patch. Do you plan to convert the relative paths to absolute ones when detected? I think TMPDIR should be ignored in this case. What's your opinion ? So some hardcoded value such as /tmp will then be assumed in case of relative path in TMPDIR? Jindrich ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: [PATCH] mc crashes when temporary directory cannot be created
Hello, On Tue, 2 Jan 2007, Jindrich Novy wrote: On Tue, 2007-01-02 at 16:28 +0200, Pavel Tsekov wrote: On Tue, 2 Jan 2007, Jindrich Novy wrote: On Sat, 2006-12-30 at 20:51 +0200, Pavel Tsekov wrote: There is an even simpler cure. In mc_tmpdir() when executing the fallback code pass an absolute path to mc_mkstemps(). This will prevent the loop. However I am not yet conviced that this is the best solution. I am still investigating. I am attaching a patch which passes an absolute path to mc_mkstemps() when invoked from mc_tmpdir(). What do you think about this fix ? I may add a comment why it is necessary to call mc_mkstemps() with an absolute path. By the way I think we should add a check whether the environment variable TMPDIR contains an absolute path. Anyway, I'll leave this for another patch. Thanks for the patch. Do you plan to convert the relative paths to absolute ones when detected? I think TMPDIR should be ignored in this case. What's your opinion ? So some hardcoded value such as /tmp will then be assumed in case of relative path in TMPDIR? Yep. It already is: sys_tmp = getenv (TMPDIR); if (!sys_tmp) { sys_tmp = TMPDIR_DEFAULT; } ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: [PATCH] mc crashes when temporary directory cannot be created
On Tue, 2 Jan 2007, Jindrich Novy wrote: On Tue, 2007-01-02 at 16:28 +0200, Pavel Tsekov wrote: On Tue, 2 Jan 2007, Jindrich Novy wrote: On Sat, 2006-12-30 at 20:51 +0200, Pavel Tsekov wrote: There is an even simpler cure. In mc_tmpdir() when executing the fallback code pass an absolute path to mc_mkstemps(). This will prevent the loop. However I am not yet conviced that this is the best solution. I am still investigating. I am attaching a patch which passes an absolute path to mc_mkstemps() when invoked from mc_tmpdir(). What do you think about this fix ? I may add a comment why it is necessary to call mc_mkstemps() with an absolute path. By the way I think we should add a check whether the environment variable TMPDIR contains an absolute path. Anyway, I'll leave this for another patch. Thanks for the patch. Do you plan to convert the relative paths to absolute ones when detected? I think TMPDIR should be ignored in this case. What's your opinion ? So some hardcoded value such as /tmp will then be assumed in case of relative path in TMPDIR? Btw. does it make sense to use relative TMPDIR ?! ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: [PATCH] mc crashes when temporary directory cannot be created
Hi Pavel, On Tue, 2007-01-02 at 16:48 +0200, Pavel Tsekov wrote: On Tue, 2 Jan 2007, Jindrich Novy wrote: On Tue, 2007-01-02 at 16:28 +0200, Pavel Tsekov wrote: On Tue, 2 Jan 2007, Jindrich Novy wrote: On Sat, 2006-12-30 at 20:51 +0200, Pavel Tsekov wrote: There is an even simpler cure. In mc_tmpdir() when executing the fallback code pass an absolute path to mc_mkstemps(). This will prevent the loop. However I am not yet conviced that this is the best solution. I am still investigating. I am attaching a patch which passes an absolute path to mc_mkstemps() when invoked from mc_tmpdir(). What do you think about this fix ? I may add a comment why it is necessary to call mc_mkstemps() with an absolute path. By the way I think we should add a check whether the environment variable TMPDIR contains an absolute path. Anyway, I'll leave this for another patch. Thanks for the patch. Do you plan to convert the relative paths to absolute ones when detected? I think TMPDIR should be ignored in this case. What's your opinion ? So some hardcoded value such as /tmp will then be assumed in case of relative path in TMPDIR? Yep. It already is: sys_tmp = getenv (TMPDIR); if (!sys_tmp) { sys_tmp = TMPDIR_DEFAULT; } It sounds good for me then ;-) Jindrich ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: [PATCH] mc crashes when temporary directory cannot be created
On Tue, 2007-01-02 at 16:53, Jindrich Novy wrote: I am attaching a patch which passes an absolute path to mc_mkstemps() when invoked from mc_tmpdir(). What do you think about this fix ? I may add a comment why it is necessary to call mc_mkstemps() with an absolute path. By the way I think we should add a check whether the environment variable TMPDIR contains an absolute path. Anyway, I'll leave this for another patch. Thanks for the patch. Do you plan to convert the relative paths to absolute ones when detected? I think TMPDIR should be ignored in this case. What's your opinion ? So some hardcoded value such as /tmp will then be assumed in case of relative path in TMPDIR? Yep. It already is: sys_tmp = getenv (TMPDIR); if (!sys_tmp) { sys_tmp = TMPDIR_DEFAULT; } It sounds good for me then ;-) The patch is in CVS now. I'll add a check for TMPDIR being an absolute path later today. ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
yet another utf8 patch: fix completion
Hi, Especially to the maintainers of the UTF-8 patches: I've created another patch, this time to fix Alt+Tab (or Escape then TAB) completion when the command line or filename or whatever you type already contains some accented characters. The problem is caused by the UI widget telling the cursor position in characters, while the functions in complete.c expect them to refer to bytes. This new patch can be found at the usual places: https://svn.uhulinux.hu/packages/2.0/mc/patches/ https://svn.uhulinux.hu/packages/dev/mc/patches/ and is called 00-84-utf8-complete.patch. As usual, unfortunately, length and width are not clearly distinguished, so it's unlikely to work correctly with double-width characters. To be applied on the top of the previous utf8 patches in numerical order (though it doesn't depend on all of them). The 2.0 directory contains patches of the UHU-Linux 2.0 distribution, which is already released. This means that contents of this directory is hardly changing (though I've just put this patch here and released an update package). These patches apply to mainstream mc 4.6.1 release and will never be ported to newer versions of mc. The dev directory contains the patches of our current development version. Currently there's only one small difference (one extra utf8 patch here) but the contents of this directory is more likely to change at any time. (Check for the file ../version to see which mc version these patches apply to if you're reading this letter much later than I send it.) bye, Egmont ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
invalid utf8 filenames mangled
Hi, A quite important note to the maintainers of the UTF-8 patches: When you use mc with the UTF-8 patches in UTF-8 mode, and copy or move a file whose name is not valid UTF-8 by pressing F5/F6 on it or selecting it with Insert and then doing F5/F5 on it, its filename gets mangled, invalid UTF-8 characters are replaced with literal question marks. If these files occur somewhere deeper (inside a directory that you asked mc to copy/move) then the name correctly stays the same. I guess it's a quite nasty bug and should be addressed... -- Egmont ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel