tcp_init() is now called by every vfs which needs it and prevents
itself from duplicate initialization.
this is the first step to get rid of --enable-netcode and so clean
up things a bit.
The NAME_MAX constant is defined on Linux but not on Solaris.
This blocks building MC on (Open)Solaris systems.
However, there is another symbolic constant with same purpose -
MAXNAMLEN - which is defined on Linux, Solaris and BSD systems.
This commit replaces NAME_MAX constant with MAXNAMLEN one.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Currently, deba and debd VFS contains fake directories a-la "14:21
DEBIAN", "14:21 CONTENTS". Items from DEBIAN directory (conffiles,
md5sums, ...) not accessible.
The patch fixes this issues.
Thanks to Serhiy Storchaka for the patch.
Please remember: own libsamba will dropped in near time (we will use libsmbclient instead)
Therefore no need to much changes in own deprecated code.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Add the user name to the ssh command line only if it's not the same as
the local logged-in user. OpenSSH will take it as a default value
anyway, but otherwise we'll override ~/.ssh/config settings which might
be not what the user wants.
* Factored out vfs_get_local_username()
* Moved default-user detection to fish subsystem (URL_USE_ANONYMOUS)
* Slight modifications to the comments and wording
Originally from: http://mail.gnome.org/archives/mc-devel/2005-April/msg00035.html
The routines `vfs_s_find_entry_linear()' and `vfs_s_find_entry_tree()'
call `canonicalize_pathname()' on entry. This routine eats `..' path
components in certain cases. In case of ftpfs this is not desired -
the path should be kept as is since the code in direntry.c doesn't have
enough knowledge of the directory structure on the remote end.
Assume that
there is a path like this on the remote server
/path1/path2/path3
The `path2' component is a symlink to some directory and `path3' is a
symlink stored in `path2' which is relative to `path2' i.e.
path2
path3 -> ../some/other/path
Now, the code in direntry.c will determine that `path3' is a symlink and
will try to resolve (vfs_s_resolve_symlink) it by passing the following path
/path1/path2/../some/other/path
to `vfs_s_find_entry_linear' . As I've said above this routine calls
`canonicalize_pathname' on entry which will modify the path like this:
/path1/some/other/path
Now this is clearly wrong since `path2' is a symlink and it should be
resolved first. In the case of ftpfs the code in direntry.c doesn't have
enough knowledge about physycal directory layout on the remote filesystem
so it shouldn't try to canonicalize the path. The path should be left as
is and passed to the remote end for processing.
Fix issue:
Changed function canonicalize_pathname (as fact, renamed to custom_canonicalize_pathname)
In this function added ability to partial canonicalize of pathname.
And some functions from vfs/direntry.c calls custom_canonicalize_pathname without
removal of '..' stuff.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
ENTRY "example.net" URL "/#ftp:examplenet:5wDJP1B/y@example.net"
When I try connect to it I saw:
"ftpfs: making connection to examplenet"
off course this is failed by timeout.
Fix issue:
Now search for '@' sign.
If present - search for slash at found position
If not present - search at start of string.
Also fixed parce '@' sign into password area of URI.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
g_new(), g_new0(), g_malloc(), g_malloc0() and g_realloc() functions
never return NULL and call abort() on fail. So check result of these
functions is useless. g_try_new(), g_try_new0(), g_try_malloc(),
g_try_malloc0() and g_try_realloc() functions are used instead.
Some minor optimization and code formatting are also performed.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Fixes such warnings:
mc/src/viewer/mcviewer.h:1: Warning: the name `view.h' supplied as the second argument
in the \file statement is not an input file
mc/vfs/vfs.c:267: Warning: explicit link request to 'op' could not be resolved
mc/src/strescape.c:219: Warning: Found unknown command `\params'
mc/src/strescape.c:153: Warning: Found unknown command `\params'
mc/src/strescape.c:187: Warning: Found unknown command `\params'
mc/src/strescape.c:219: Warning: Found unknown command `\params'
mc/src/strescape.c:153: Warning: Found unknown command `\params'
mc/src/strescape.c:187: Warning: Found unknown command `\params'
mc/vfs/fish.c:33: Warning: explicit link request to 'sh' could not be resolved
mc/vfs/fish.c:33: Warning: Found unknown command `\host'
mc/vfs/ftpfs.c:43: Warning: Found unknown command `\hobit'
mc/vfs/sfs.c:26: Warning: explicit link request to 'ugz' could not be resolved
mc/vfs/vfs.c:267: Warning: explicit link request to 'op' could not be resolved
mc/vfs/vfs.c:267: Warning: explicit link request to 'op' could not be resolved
Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>