Commit Graph

294 Commits

Author SHA1 Message Date
Andrew Borodin 664b3efcda Ticket #2623: vfs: use data after free.
(vfs_s_close): vfs-specific data of file handler
vfs_file_handler_t::data is freed in vfs_s_subclass::fh_close method and
then can be used in vfs_s_subclass::file_store_one. Bug is related to
ftp and fish VFSes.

Added new vfs_s_subclass::fh_free_data method to free vfs-specific data
of file handler vfs_file_handler_t::data. Use it in ftp and vfs VFSes.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-19 12:45:28 +04:00
Slava Zanko 0138645541 Ticket 1551: Update GPL version from 2 to 3
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-10-18 14:08:34 +03:00
Andrew Borodin 6dabcb5f55 VFS small optimization
(vfs_class_data_find_by_handle, vfs_class_find_by_handle): move same
code to the separate function vfs_get_openfile().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:03 +03:00
Andrew Borodin b61e0fc6a9 (_vfs_get_cwd): fixed memory leak.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:03 +03:00
Slava Zanko 12dfe1bd55 VFS ftpfs: fixed broken filenames in unaligned 'ls' command output
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-09-08 20:10:48 +03:00
Slava Zanko 20c4694ee5 Ticket #2594: ftp failures - leading white space in file name
Code cleanup: move 'ls' output parser (and functions-satellites) to
new file parse_ls_vga.c

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-09-08 20:10:48 +03:00
Slava Zanko 20a79d52ab Ticket #2595: Broken panels recode in current master
Fixed path recoding

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-09-08 13:50:02 +03:00
Slava Zanko 4e56efafe6 Ticket #81: savannah: can't access files on ftp starting with space
files starting with space can't be acessed by mc through ftp - it
shows the file as not having the leading space and attempts to
access it produce 'permission denied' errors.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-07-11 19:50:32 +03:00
Slava Zanko 0f249bd9b5 Fixed errors while connect to IPv6 hosts
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-07-05 16:09:57 +03:00
Slava Zanko 32a9f8257d Deprecated parser now used just in Hotlist widget.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-07-05 16:09:57 +03:00
Slava Zanko 12af8e5db0 fixed relative symlink operations. Symlink now stay relative
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-07-05 16:09:57 +03:00
Andrew Borodin ea4078e52e Ticket #2361: VFS URI reimplementation
Code cleanup:

 * (vfs_set_raw_current_dir): remove redundant check.
 * VFS: minor optimizations.
 * Fixed type of mode argument of vfs_class:chmod method.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-07-05 16:09:23 +03:00
Slava Zanko c8ae0a5aaf Code cleanup
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:02 +03:00
Slava Zanko 91fe0d71bb vfs_path_get_by_index(): added check for valid element index
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:02 +03:00
Slava Zanko 5fa1070225 Fixed memory leaks in folowing functions:
* mc_opendir()
 * mc_chdir()
 * vfs_release_path()
 * check_panel_timestamp()

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:02 +03:00
Slava Zanko 60123b7c99 Removed function vfs_s_get_path(); Function vfs_s_get_path_mangle() renamed to vfs_s_get_path()
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:02 +03:00
Slava Zanko 04a4ed0ece added vfs_path_element_valid() function
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:01 +03:00
Slava Zanko bba132381e vfs_path_to_str() now return URL string instead of old representation
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:01 +03:00
Slava Zanko 2ec4cc59ab Added URL-like path parser
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:01 +03:00
Slava Zanko 39462b9b76 Reorder VFS parser to work with VFS parameters:
* Removed vfs_path_element_t->raw_url_str;
 * Changed some VFS prefixes (colon now used when need to split VFS prefix and VFS parameters);
 * Removed vfs_translate_url() functions and related code;
 * added converter of VFS parameters to string representation.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:01 +03:00
Slava Zanko e6ec447585 Following prototypes of functions was changed in VFS-module API:
* archive_check
 * archive_same
 * open_archive

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:00 +03:00
Slava Zanko e9ed6a41cf Added function vfs_path_url_split() for parse VFS parameters
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:00 +03:00
Slava Zanko 3d1e2df9b7 Removed vfs_get_class() function
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:00 +03:00
Slava Zanko 922114a1d0 Following prototypes of functions was changed in VFS-module API:
* archive_check
 * archive_same
 * open_archive

Added new functions:

 * vfs_path_element_clone()
 * vfs_path_clone()
 * vfs_path_remove_element_by_index()

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:00 +03:00
Slava Zanko 997876a109 Remove vfs_url_t structure (replace with vfs_path_element_t)
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:00 +03:00
Slava Zanko 3eafe7308a Added serialization and deserialization for vfs_path_t object
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:00 +03:00
Slava Zanko e8d58f188d Fixed segfault while trying create dir in r/o VFS'es
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:00 +03:00
Slava Zanko ac939a1bea Fixed path recoding in VFS modules
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:59 +03:00
Slava Zanko 691c06ce30 removed vfs_path_t->unparsed variable
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:59 +03:00
Slava Zanko a5dc2de78b Added vfs_change_encoding() and vfs_path_element_need_cleanup_converter() functions.
Changes for handling directory encoding.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:59 +03:00
Slava Zanko c0004807d4 vfs_path_element_t->encoding now handled in lib/vfs/path.c
Added testcase for testinh path encoding.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:59 +03:00
Slava Zanko cedad03833 Move vfs_get_encoding() to path.c and make as static function.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:59 +03:00
Slava Zanko b0df841a4a Removed vfs_path_t->unparsed_encoding.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:59 +03:00
Slava Zanko ebe519ef15 remove struct dirinfo definition
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:59 +03:00
Slava Zanko 405cc98cea VFS: Make functions vfs_canon_and_translate() and vfs_canon() as static in lib/vfs/path.c
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:59 +03:00
Slava Zanko 8ea49095c3 Changed functions vfs_file_is_local() and vfs_file_class_flags() for handle vfs_path_t type
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:59 +03:00
Slava Zanko 7745006b60 VFS: removed interface.h
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:59 +03:00
Slava Zanko 093128c532 VFS: Current directory handler now have type vfs_path_t
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:59 +03:00
Slava Zanko a12fdfbb0e VFS: many changes for use vfs_path_t
* completed vfs_path_from_str();
 * completed vfs_path_to_str() and vfs_path_to_str_elements_count();
 * removed deprecated vfs_split();
 * changes in all related code;
 * new unit tests.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:59 +03:00
Slava Zanko 9e4dc03e9e lib/vfs/direntry.c: vfs_s_inode_from_path() and vfs_s_get_path() now handle vfs_path_t
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:59 +03:00
Slava Zanko 6329976c89 VFS: fixed # sign in passwd or in path string
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:58 +03:00
Slava Zanko 152124d9b7 Following prototypes of functions was changed in VFS-module API:
* getid
 * mkdir
 * rmdir
 * setctl

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:58 +03:00
Slava Zanko d67da5dfa8 Following prototypes of functions was changed in VFS-module API:
* readlink
 * symlink
 * rename
 * link
 * unlink
 * mknod

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:58 +03:00
Slava Zanko 1406eb5035 Following prototypes of functions was changed in VFS-module API:
* opendir
 * stat
 * lstat
 * chdir

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:58 +03:00
Slava Zanko dd19ca201d Following prototypes of functions was changed in VFS-module API:
* chmod
 * chown
 * utime

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:58 +03:00
Slava Zanko 479902f83e Following prototypes of functions was changed in VFS-module API:
* open
 * getlocalcopy
 * ungetlocalcopy

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:58 +03:00
Slava Zanko 41f2e27f8d VFS: Use vfs_path_t in some interface functions
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:58 +03:00
Slava Zanko 3a1936aade Added vfs_path_t structure
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:57 +03:00
Slava Zanko 2c0ae5aa55 Moved interface functions from lib/vfs/vfs.[ch] to lib/vfs/interface.[ch]
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:57 +03:00
Andrew Borodin 42bc3171c3 Ticket #2361: VFS URI reimplementation
Created vfs_url_t structure

...and use it to parse and store network VFS options.

vfs_s_super structure now has a special member for network VFS options.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:57 +03:00
Ilia Maslakov 5acb75c6cd Check whether VFS provides an open_archive() method.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-04-12 12:53:49 +04:00
Andrew Borodin 1796c8536a Ticket #2535: segfault in FTP VFS
...because of uninitialized pointer usage. The bug was introduced
in 68628184b1 commit.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-04-12 12:31:55 +04:00
Slava Zanko b46d2a3d62 Renamed struct vfs_s_fh to vfs_file_handler_t
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-04-07 13:45:46 +04:00
Andrew Borodin 68628184b1 vfs_s_super and vfs_s_fh now don't contain members specific to any vfs.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-04-07 13:45:46 +04:00
Andrew Borodin 519246eccd Use GList to store directory content in vfs_s_inode.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-04-07 13:45:46 +04:00
Andrew Borodin 401aaa5014 Ticket #2501: continue split of VFS core library and VFS plugins.
Use GList for list of vfs_s_super objects in vfs_s_subclass.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-04-07 13:45:46 +04:00
Slava Zanko 5a458c702d Use events to show VFS messages.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:51 +02:00
Slava Zanko 4005b7924e Use events to check timestamp of panel directories
...instead of direct access to panels in VGS GC.

Inlcudes clean up.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:51 +02:00
Slava Zanko 6016620f42 Remove backlinks from lib to src - move global variables(used in lib) to mc_global structure (see lib/global.c)
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:50 +02:00
Slava Zanko 6c5f5bf768 VFS structure changes:
* moved from lib/vfs/mc-vfs to lib/vfs;
  * split by directories for VFS-plugins and moved to src/vfs;
  * lib/vfs/vfs-impl.h was merged into lib/vfs/vfs.h.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 11:48:26 +02:00
Andrew Borodin c30c82ee48 ftpfs.c: added include of stdio.h needed for sscanf().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-02-05 16:54:56 +02:00
Andrew Borodin d9fc47453b Optimization: get rid of triple run of isoinfo -d.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-02-04 19:25:30 +03:00
Sergey 3293c5b237 Ticket #2471: isoinfo adds ";1" to the end of file name when Joliet w/o Rock Ridge is used.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-02-04 19:25:18 +03:00
Yury V. Zaytsev afd8ec8934 Ticket #2401: Make AI_ADDRCONFIG optional for RFC 3493 non-compliant systems
Unfortunately not all systems claiming POSIX support actually define
AI_ADDRCONFIG macro, and those who define it not always implement it
(this is indeed optional). This patch makes ftpfs only set AI_ADDRCONFIG
flag to speed up lookups if it is defined, and in this case, retry the
lookup if it was rejected due to unimplemented flags.

Based upon the code by Joe Orton <jorton@redhat.com> from APR:

Copyright (C) 2003 Red Hat, Inc.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.

Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2011-02-01 10:06:33 +01:00
Slava Zanko f31863a80a Renamed variables mc_home to mc_sysconfig_dir and mc_home_alt to mc_share_data_dir for more sence
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-01-20 17:38:27 +02:00
Slava Zanko acbe048486 Ticket #1851: Home config directory [xdg-user-dirs]
Instead of hardcoded (via MC_USERCONF_DIR) path mc mc now used
dynamic directories specified by environment variables:
 * XDG_CONFIG_HOME - dir for config files . By default is ~/.config/mc
 * XDG_DATA_HOME - dir for some data, such as user defuned Syntax file, menu etc By default is ~/.local/share/mc
 * XDG_CACHE_HOME - dir for temp files, such as cooledit.clip etc. By default is ~/.cache/mc

This is mainstream standard already adopted by many projects.

Old settings will be migrated at first time from ~/.mc to these dirs.

See http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html for more info.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-01-20 17:38:27 +02:00
Andrew Borodin 0f9af9315c (fish_fill_names): remove unexpected break.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-12-28 11:33:50 +03:00
Jindrich Novy a3344024c1 fix VFS crashes.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-12-27 15:57:16 +03:00
Andrew Borodin 71a2eeec21 Replaced remaining grep with @GREP@ in iso9660 VFS plugin.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-12-27 15:57:16 +03:00
Andrew Borodin 7a8dc2665e Ticket #2447: code cleanup before 4.7.5 release.
VFS: post-indentation fixups.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-12-27 15:57:09 +03:00
wjaguar 4de95fe89f Ticket #1963: use grep instead of awk in iso9660 extfs plugin.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-12-14 16:16:38 +03:00
Ilia Maslakov 424069e958 examine results of perl script execution.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-12-07 15:54:23 +00:00
Ilia Maslakov 73fee4232c Ticket #2031 (FISH fix for Sun Solaris)
Removed bashism, fixed incorrect work under Solaris.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-12-07 15:54:01 +00:00
Andrew Borodin 72ee546a59 Ticket #2419: configure script doesn't set samba configdir.
lib/vfs/mc-vfs/samba/configure can't set the value of SAMBA_CFLAGS
in lib/vfs/mc-vfs/Makefile.am.

The solution: to avoid configuration code duplication, use environment
variables SMBCONFIGDIR and SMBCODEPAGEDIR to set up values of configdir
and codepagedir variables in lib/vfs/mc-vfs/samba/Makefile because
samba configure is child process of main configure.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-12-03 15:36:47 +03:00
Andrew Borodin fe8c5390ad Fix of uintmax_t variables output.
Use PRIuMAX and PRIXMAX instead of ju and jX modifiers respectively
for formatted output of uintmax_t variables.
If PRIXMAX is not defined (i.e. in Solaris9), use PRIxMAX instead.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-12-03 10:58:39 +03:00
Andrew Borodin 15013927e7 Include inttypes.h instead of stdint.h.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-26 11:31:18 +03:00
Slava Zanko bbf1f4e857 Moved filemanager-related stuff to src/filemanager directory
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:51:32 +03:00
Andrew Borodin fdb61594df Cleanup of main.[ch].
All file panels related stuff was moved to midnight.[ch].

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:51:31 +03:00
Slava Zanko 0ef9273598 Changes for avoid compiler warnings
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:51:31 +03:00
Slava Zanko 62f3c368c9 Renamed keybind-related functions:
* lookup_action          -> keybind_lookup_action
* lookup_keymap_shortcut -> keybind_lookup_keymap_shortcut
* lookup_keymap_command  -> keybind_lookup_keymap_command

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:51:31 +03:00
Slava Zanko 045debaa8a Moved charsets.[ch] from src to lib directory
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:51:31 +03:00
Andrew Borodin 71364f88c3 Split lib/widget/widget.[ch] and lib/widget/wtools.[ch] files
...into small: one widget in one file.
Renamed most if WInput functions.
Minor optimization.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:51:30 +03:00
Andrew Borodin 8d1708225c Don't include lib/util.h via lib/global.h.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:51:30 +03:00
Andrew Borodin d543be11d9 Use g_file_get_contents() instead of load_file().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:51:30 +03:00
Slava Zanko 8b018db98f Some WIDGET-related stuff moved to lib/widget directory
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:51:30 +03:00
Slava Zanko c57566af00 Avoid compiler warnings.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:27:47 +03:00
Matthieu Crapet 32a9d93978 VFS: Added 7zr executable detection in u7z
On many distributions by default only the reduced version of p7zip (7zr)
is installed (e.g. on Debian p7zip package provides 7zr executable and
p7zip-full package provides 7za executable).

This patch adds the detection of 7zr in case if 7za is not available.
2010-11-24 10:27:47 +03:00
Andrew Borodin 97aa4e99c9 Use g_strndup() directly instead of str_dup_range.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:27:47 +03:00
Andrew Borodin 9ec4d4c08b Check variable before g_array_free() call.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:27:47 +03:00
Slava Zanko feb733663f Code indentation in lib directory
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:27:20 +03:00
Ilia Maslakov 88dc2e93bd replace print_vfs_message to printf
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-10-27 18:12:02 +04:00
Ilia Maslakov 8b46518619 Apply code identation policy.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-10-27 18:10:50 +04:00
Andrew Borodin 0a5f93eeb5 fish.c: some fixups.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-10-27 18:10:50 +04:00
Ilia Maslakov 3cef64306e Split function fish_open_archive_int() to fish_open_archive_pipeopen() and fish_open_archive_talk().
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-10-27 18:10:50 +04:00
Ilia Maslakov 3ba4abac41 Ticket #2268 (FISH: hide panels before connecting)
FISH: now hide the panel before connecting.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-10-27 18:10:49 +04:00
Enrico Weigelt, metux IT service fb05515d82 lib/vfs/mc-vfs/smbfs.c: fixed printf() arguments.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-10-11 11:00:29 +03:00
Andrew Borodin 9678ef3b02 Fixed type mismatches in formatted output arguments in VFS.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-10-11 11:00:29 +03:00
Andrew Borodin ec8d6f0751 Get rid of some '#ifdef ENABLE_VFS' conditions.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-09-27 21:44:20 +04:00
Andrew Borodin c36a810c09 Fix of file panel encoding change w/o VFS support.
Now --disable-vfs doesn't mean the total disabling of VFS.
With --disable-vfs option, the localfs module is built
to use the change of file panel encoding.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-09-27 21:43:43 +04:00
Andrew Borodin 48318f3e5d Cleanup of includes in VFS sources.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-09-27 21:43:43 +04:00
Andrew Borodin 268c364292 Fix of VFS encoding parsing.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-09-27 21:35:11 +04:00
Andrew Borodin 5007553299 Remove only supported encodings from path.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-09-27 21:34:40 +04:00
Andrew Borodin aff8e42d64 Created macro VFS_ENCODING_PREFIX for "#enc:" encoding prefix.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-09-27 21:33:16 +04:00
Ilia Maslakov ee80601316 Removed useless g_free() calls
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-09-27 14:33:24 +04:00
Ilia Maslakov 47b7e46b3f Ticket #2347 (hardcoded fish scripts is outdate)
fixed: hardcoded fish scripts in lib/vfs/mc-vfs/fishdef.h

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-09-27 14:33:17 +04:00
Yury V. Zaytsev e0d1d53cbf Added myself to the authors list
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2010-09-15 13:49:03 +02:00
Yury V. Zaytsev 6586dcf78b Fixed DATA connection initialization logic
Factored out error checking from ftpfs_initconn into
ftpfs_init_data_socket and fixed the logic of the initialization of DATA
connection. Now initialization of passive connection is retried if
needed after the failure to open the socket.

Got rid of goto statements and divided the code in two parts (passive &
active). Initial state is now properly restored after the function runs.

Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2010-09-15 13:49:02 +02:00
Yury V. Zaytsev a27725d7a3 Refactored IPV4/IPV6 FTP connection setup code
Miscellaneous refactoring:

    * Factored out the active IPV4/IPV6 FTP connection mode setup
      routine in a separate function (ftpfs_setup_active) to make the
      logic more clear.

    * Factored out ftpfs_init_data_socket from ftpfs_initconn in order
      to make it possible to fix the logic later on.

Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2010-09-15 13:49:02 +02:00
Yury V. Zaytsev ada1848268 Fixed passive FTP connection logic
In current implementation few issues were fixed making passive
connection scheme more reliable:

    * If it's IPV4, try PASV first, as some servers and ALGs get
      confused by EPSV, and only then EPSV as a fallback

    * When trying PASV or EPSV, actually try to connect to the provided
      port and if the connection fails, still try the next method

    * PASV and EPSV response parsing code was factored out in separate
      routines for clarity

Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2010-09-15 13:49:02 +02:00
Yury V. Zaytsev a402ebc981 Ticket #121: Fixed IPV4 FTP connection scheme
* Fixed endianness issue introduced by IPV6 patch, which prevented
      active connections to be established via PORT mechanism.

      FTP server always expects to see the port broken down into bytes
      in network byte order, so the transformation to host byte order is
      only needed when using EPRT.

    * Some IPV4 FTP servers and FTP ALGs / NATs with connection tracking
      become confused when you try to use EPSV or EPRT instead of PASV or
      PORT respectively.

      This commit changes current FTP connection scheme: if we deal with
      an IPV4 host, instead of first trying to use EPRT, first try to
      use PORT and only if it fails try EPRT as a fallback.

Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2010-09-15 13:49:02 +02:00
Andrew Borodin 232ca56501 Ticket #123: fixed types to avoid file size limitation in VFS layer.
Fixed modifiers and removed types recastin in envoronment
variables and messages forming.
Minor code cleanup.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-29 12:57:04 +04:00
Andrew Borodin da8e14bcbb Define ENABLE_VFS_NET in C code not in M4 one.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-24 09:27:27 +04:00
Andrew Borodin 11c00959f3 Fixup of conditions for networking VFS.
Clean up of code duplicate in configure.ac.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-21 16:43:50 +04:00
Slava Zanko 12446899f7 Changes for configure and build with samba:
* m4: AC_CONFIG_SUBDIRS() macros should be always called without relation to enable/disable samba support
 * vfs/samba: configure.ac: renamed --with-configdir to --with-smb-configdir
 * vfs/samba: configure.ac: renamed --with-codepagedir to --with-smb-codepagedir

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-07-21 16:43:50 +04:00
Enrico Weigelt, metux IT service 9b89d60522 VFS: cleaned up smbfs.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-07-21 16:43:50 +04:00
Enrico Weigelt, metux IT service 67d6ebfd16 VFS: fishfs can now be switched off
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-21 16:43:50 +04:00
Enrico Weigelt, metux IT service 05516fbac8 VFS: ftpfs can now be switched off
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-21 16:43:50 +04:00
Enrico Weigelt, metux IT service bc1de7cd78 VFS: extfs can now be switched off
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-21 16:43:50 +04:00
Enrico Weigelt, metux IT service 6f289617d2 VFS: sfs can now be switched off
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-21 16:43:50 +04:00
Enrico Weigelt, metux IT service f33f7a5031 VFS: tarfs can now be switched off
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-21 16:43:50 +04:00
Enrico Weigelt, metux IT service 19390ab2d7 VFS: cpiofs can now be switched off
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-21 16:43:50 +04:00
Slava Zanko f7ac8acd29 Type accuracy in undelfs vfs.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-07-21 16:43:50 +04:00
Enrico Weigelt, metux IT service 5df06e7630 VFS: fixups of UNDELFS VFS switch on/off.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-21 16:43:50 +04:00
Andrew Borodin 7d765e4050 Cleanup of lib/vfs/mc-vfs/Makefile.am file.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-21 16:43:50 +04:00
Andrew Borodin 699ecb5e21 VFS: Type accuracy in netutil.[ch].
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-21 16:43:50 +04:00
Enrico Weigelt, metux IT service bd8a2d4c79 VFS: Moved vfs_split_url() function from netutil.c into utilvfs.c.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-21 16:43:50 +04:00
Andrew Borodin 9df2f96e75 Some reorginizing of VFS private and public APIs.
Clean up of remained mcfs support.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-21 16:43:49 +04:00
Andrew Borodin 57281c6e0b Added type for VFS class flags.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-21 16:43:49 +04:00
Ilia Maslakov 0795cc2bc9 Ticket #2267 (fish: resume download)
implemented resuming file downloads (reget) in FISH VFS

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-07-20 18:31:28 +00:00
Andrew Borodin 17d8107e8d Ticket #171: fixed remained plain int types in VFS.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-07-20 09:26:38 +04:00
Andrew Borodin 6a55c9320e Ticket #2279: mcserver is deprecated.
Removed mcserver and mcfs support.

Reasons:
(1) no longer builds
(2) no one is willing to support it
(3) possibly contains unfixed security holes
(4) makes no sense in view of the availability of FISH

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-17 18:36:54 +04:00
Oswald Buddenhagen 69903712b9 Ticket #2274: Adjust extfs script modes to installed permissions
Some extfs script modes in the repository differ from the ones they get
when installed. This is annoying for those, who hardlink files to the
installed location instead of copying, because git status will show
these files as modified.

Fixing permissions in the repository will resolve this issue.

Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2010-07-12 20:25:38 +02:00
Slava Zanko 41adaf7493 Added missing files for making tarballs
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-07-05 22:40:58 +03:00
Andrew Borodin 8be8851b2a Removed unused vfs_die() function from mcserv.c.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-05 21:35:18 +04:00
Andrew Borodin 63c290fef2 The major number of device wasn't initialized in parsing of 'list' command output.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-05 21:35:18 +04:00
Ilia Maslakov ce0ac8e66d Applied MC indentation policy.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-07-05 16:49:01 +00:00
Yury V. Zaytsev 8c9ac5ec55 Updated protocol description in README.fish
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-07-05 15:36:14 +00:00
Ilia Maslakov 36d59acf97 Ticket #2242 (improved FISH)
fixed configure.ac
    added lib/vfs/mc-vfs/fish/Makefile.am lib/vfs/mc-vfs/fishdef.h
    moved lib/vfs/mc-vfs/fish/README.fish
    fixed lib/vfs/mc-vfs/Makefile.am
    added external scripts in lib/vfs/mc-vfs/fish/
        * ls - get gile list
        * mkdir - make directory
        * rmdir - remove directory
        * unlink - delete file
        * chown - change owner/group of file
        * chmod - change mode of file
        * mv - move file
        * ln - make symlink
        * hardlink - make hardlink
        * send - copy file to target host
        * append - append file to target host (if exists)
        * get - copy file from target host
        * info - return resalts of scan remote host (have: perl, sed, awk, etc)

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>

fish.c: optimization and code cleanup
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>

optimization of FISH environment variables.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-05 15:35:42 +00:00
Andrew Borodin 0cb04aec3b g_strncasecmp() function is deprecated.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-08 13:07:11 +04:00
Andrew Borodin 8b4124dfa5 g_strup() function is deprecated. g_ascii_strup() is used instead.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-08 13:07:11 +04:00
Andrew Borodin 3ddec0f89d g_strcasecmp() function is deprecated.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-08 13:07:11 +04:00
Andrew Borodin aa0d96bd8b Ticket #1646: removed leading and trailing spaces in i18n resources.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-07 21:42:46 +04:00
Andrew Borodin 8657fd5f01 Ticket #2203: VFS: use codepage list loaded from mc.charsets file.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-28 14:55:16 +04:00
Andrew Borodin 7843203257 mc_ungetlocalcopy(): fixed wrong condition.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-16 11:24:50 +04:00
Slava Zanko 8f48bf2aec Fixed errors and warnings in compilation stage.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-05-05 16:24:14 +04:00
Andrew Borodin 873880edc2 vfs_timeout and use_netrc variables were moved to vfs.h file.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-05 16:24:14 +04:00
Vit Rosin 993d678ed9 Use EXIT_FAILURE symbolic name as return code.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-05 16:24:14 +04:00
Andrew Borodin 933aba001d Some optimizatioms in vfs.c.
Avoid some else branches. Type accuracy.

Thanks Vit Rosin for original patch.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-05 16:24:14 +04:00
Andrew Borodin e70db42deb Grammar.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-05 16:24:13 +04:00
Andrew Borodin 4cea5be1ac Ticket #2097: clean up before 4.7.2 release.
Split assignments and conditions. Type accuracy. Minor optimization.

Thanks Vit Rosin for original patch.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-05 16:23:51 +04:00