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>