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>
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.
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>
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>
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>
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>
* 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>
Fixed modifiers and removed types recastin in envoronment
variables and messages forming.
Minor code cleanup.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* 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>