Commit Graph

39 Commits

Author SHA1 Message Date
Artem S. Tashkinov 07de6670ed Ticket #2050: extfs/urar: disable user/system configuration for list and copyout operations.
My system wide .rarrc contains these switches

switches= -m5 -mdG -r -s -t -ol -tl

So whenever you list the contents of any archive or copy a file out of
it, RAR/UNRAR will traverse *all* sub directories (note -r, recursive
switch) in a current directory trying to find *all* archives with the
same name. So, the net result might be that unrar/rar will extract
the wrong file and spend a lot of time trying to find archives with
the same name.

That's why I strongly suggest disabling user/system configuration
for archive list and copyout operations (note the added -cfg switch).

I have contacted Eugene Roshal and he said that he won't disable -r switch
for extract and archive list operations, so, we can only fix this problem
on our side.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-04-22 10:18:46 +04:00
Artem S. Tashkinov 8bdd7bc764 Ticket #2049: extfs/urar doesn't correctly shows localized filenames in RAR archives.
There's no need to export LC_ALL.

Signee-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-04-20 16:56:41 +04:00
Andrew Borodin 58909eb708 Ticlet #1909: fix of extfs_read_archive() function.
Fixed bug introduced in ad9c1daad8 commit:
incorrect handling of "." and ".." directories within atchives.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-04-03 11:10:29 +04:00
Andrew Borodin 5b68413e62 Applied MC indentation policy.
Applied MC indentation policy to all files modified in this branch
with some simple manual modifications.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-03-30 16:21:22 +04:00
Vit Rosin 07a7f446b0 Ticket #2108: Fixed memory leak in fish_linear_start() function.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-03-30 16:21:22 +04:00
Andrew Borodin 3c88948c9d Fixed memory leak in mc_closedir().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-03-30 16:21:21 +04:00
Andrew Borodin f547d149ba Fixed memory leak in vfs_free_handle().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-03-30 16:21:21 +04:00
Andrew Borodin 407d1f38f5 Fixed memory leak in vfs_s_getlocalcopy().
Thanks Vit Rosin for the original patch.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-03-30 16:21:21 +04:00
Andrew Borodin 68d7a77210 Fixed of GSList item deallocation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-03-05 17:29:28 +03:00
Andrew Borodin 34d74f09b1 Ticket #1909: don't interpret trailing '+' as a plugin name.
If EXTFS plugin doesn't require a file, that file name must
be finished with '+': for example, rpms+. But trailing '+'
actually is not a part of plugin name, it is an plugin attrubute.
But in the current time trailing '+' must be used in VFS command:

cd #rpms+

instead of

cd #rpms

This commit simplifies the usage of some EXTFS plugins.

Also fixed VFS README.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-03-05 17:29:28 +03:00
Slava Zanko 5354d59337 Identation of some source files.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-02-26 11:26:00 +02:00
Slava Zanko cd8b350b6d UNDELFS: code cleanup
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-02-26 10:58:49 +02:00
Slava Zanko 1b75ea27b6 Cleanup of code for master
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-02-26 10:58:49 +02:00
Andrew Borodin 2cf080d18f Ticket #2058: fixed memory leaks in _vfs_get_cwd() function.
Thanks Vit Rosin to found memory leak in _vfs_memleak() function.
This function was rewritten to fix two memory leaks.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-02-24 21:44:07 +03:00
Vit Rosin 3770047407 Ticket #2053: fixed memory leak in mc_symlink() function.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-02-24 12:08:01 +00:00
Andrew Borodin 68ecccb453 Ticket #2018: strcpy() is used for overlaping strings.
memmove() is used for overlaping strings instead of strcpy().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-02-18 13:21:25 +00:00
Andrew Borodin d5d1589665 Replaced hardcoded '/' symbols.
Symbolic names and GLib functions are used instead of
hardcoded '/' symbols.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-02-15 16:10:02 +00:00
Andrew Borodin b7d5a5852c 2-level extfs plugin structure.
extfs vfs plugins are read from following places:
1. ~/.mc/extfs.d directory.
2. /usr/libexec/mc/extfs.d direcotry.

Priority of plugins installed in user home directory
is highest. If there are two plugins with same names
exist in user home and system directories, the plugin
from user home is used.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-02-15 16:10:02 +00:00
Andrew Borodin ba1d909a7a extfs.ini file is replaced to extfs.d directory.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-02-15 16:10:02 +00:00
Andrew Borodin 2d43ad1bb4 Reimplemented work with plugin info.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-02-15 16:10:02 +00:00
Andrew Borodin 6e1c61da0e Optimization of symbolic link loop protection.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-02-15 16:10:02 +00:00
Andrew Borodin 5b96caa5f0 Optimization of extfs_get_path_from_entry() function.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-02-15 16:10:02 +00:00
Andrew Borodin ad9c1daad8 Ticket #1909: easy plugable EXTFS VFS.
Reimplemented EXTFS VFS to be friendly to package-based
systems. Currently, MC requires to edit extfs.ini file
to add new plugin to MC VFS. After upgrade, all changes
to this files will be lost.

To solve that problem, MC configuration system should
support ".d" pattern.

Initial step: refactoring of current extfs code:
cleanup, type accuracy, indentation.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-02-15 16:10:02 +00:00
Serhiy Storchaka d45554ffad urar.in: fixed work with filenames begining with spaces.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-02-15 13:39:30 +02:00
Serhiy Storchaka 786e6f548e Ticket #2029: Error in supporting rar-archives
Contents of rar-archives with filenames contained / \d\d:\d\d / are not listed correctly.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-02-15 13:06:42 +02:00
Slava Zanko 7ea4dfb4ca Ticket #1902: (reopened defect) Possible security risk in mcserv.c
Comment by Oswald Buddenhagen:
first, you decided to ignore my advice about not
obfuscating the code with nonsense-checks, and on top of that you
broke the string comparison (just see what happens when you try a user
named "ftpmaster").

This commit contain changes for respect this critic.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-02-05 17:36:19 +02:00
Pavel Vasilyev b3ea5f8ceb Ticket #1902: Possible security risk in mcserv.c
Look at mcserv.c near 1019
The chroot() call's return value isn't handled - this may a security risk.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-02-04 11:12:56 +02:00
Serhiy Storchaka 6191ca0b1f Ticket #1921: Fix lslR VFS
The lslR VFS does not work with ls-lR files created in en_US.UTF-8 locale and with files and directories started with whitespaces.
Followed patch fixes both issues.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-02-02 22:25:54 +02:00
Andrew Borodin 0bd03e07f5 Ticket #1990: code cleanup before 4.7.0.2 release.
Fixed warings: local variable shadows a global declaration.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-02-02 21:45:05 +03:00
Enrico Weigelt, metux IT service a295a9df47 Ticket #1925: Fixed conditional compile of mcserver 2010-01-27 21:56:46 +01:00
Rainer Tammer 476145a0f5 patches for AIX with ncurses support
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-01-27 10:04:38 +02:00
Slava Zanko e07ba16b3b Moved strecape.[ch] into library
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-01-26 10:30:25 +02:00
Slava Zanko 25155c311a Move all interface includes from subdirs lib/*/*.h into lib/*.h
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-01-26 10:30:25 +02:00
Slava Zanko cd4dbf3a09 Changes for build after moving strutil into lib
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-01-26 10:30:24 +02:00
Slava Zanko c764f3b84c Changes for build after moving util.[ch]
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-01-26 10:30:24 +02:00
Slava Zanko 93dbc46e9c Reorganization of sources. Part 1.
* moved src/global.h into lib/global.h
 * moved glibcompat.[ch] from ./src/ into ./lib/
 * moved fs.h from ./src/ into ./lib/

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-01-26 10:30:23 +02:00
Slava Zanko 39d5b94cac Reorganized pathes to files in '#include' directives 2010-01-26 10:30:22 +02:00
Slava Zanko ddb9ada2e8 Changes in sources matched with mass movement of $(srcdir)/src/*/ into $(srcdir)/lib/*/
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-01-26 10:30:22 +02:00
Slava Zanko 52f6bed7d0 Moved dir $(srcdir)/vfs into $(srcdir)/lib/vfs/mc-vfs
Also, initial support of library directory.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-01-26 10:30:21 +02:00