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>
Fixed bug introduced in ad9c1daad8 commit:
incorrect handling of "." and ".." directories within atchives.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Applied MC indentation policy to all files modified in this branch
with some simple manual modifications.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
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>
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>
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>
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>
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>
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>
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>
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>
* 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>