Commit Graph

1453 Commits

Author SHA1 Message Date
Serhiy Storchaka
fc9c24c6f9 Ticket #1920: Issues with deba and debd VFS
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.
2010-01-02 17:04:18 +01:00
Enrico Weigelt, metux IT service
8c9619cef1 Replaced WITH_SMBFS by ENABLE_VFS_SMB 2010-01-02 16:29:24 +01:00
Enrico Weigelt, metux IT service
c47852cbfe vfs/smb: removed own obsolete and broken substitution of strchr 2010-01-02 16:29:24 +01:00
Enrico Weigelt, metux IT service
3e034c77ac vfs/smb: configure script fixups (for breaks on -Werror) 2010-01-02 16:27:36 +01:00
Enrico Weigelt, metux IT service
304d876d5a Ticket #1915: vfs/smb: fixed breakage on strcpy()/strcat() 2010-01-02 16:27:36 +01:00
Slava Zanko
cbdf86f4f8 Removed calls to strerror() function from own libsamba implementation.
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>
2010-01-02 07:11:01 +01:00
Enrico Weigelt, metux IT service
f6637e4871 Ticket #1780: removing own declaration of errno and strerror() 2010-01-02 07:11:01 +01:00
Slava Zanko
c73e282823 Rewritten vfs_canon_and_translate() function for using glib functions.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-12-30 11:06:11 +02:00
Enrico Weigelt, metux IT service
ec1a52fb0a VFS: renamed USE_VFS to ENABLE_VFS 2009-12-30 11:06:11 +02:00
Enrico Weigelt, metux IT service
43fa57ed65 VFS: added non-vfs version of vfs_canon_and_translate() 2009-12-30 11:06:10 +02:00
Enrico Weigelt, metux IT service
b3a0216000 VFS: added non-vfs version of vfs_translate_path_n() 2009-12-30 11:06:10 +02:00
Enrico Weigelt, metux IT service
2153b3c5cd VFS: added non-vfs version of vfs_get_encoding() 2009-12-30 11:06:10 +02:00
Enrico Weigelt, metux IT service
e2e490a054 VFS: fixing symbol clash on mc_ungetlocalcopy() at non-vfs build 2009-12-30 11:06:10 +02:00
Enrico Weigelt, metux IT service
9571b0ac15 VFS: fixing symbol clash on mc_readlink() at non-vfs build 2009-12-30 11:06:10 +02:00
Enrico Weigelt, metux IT service
1ee19ccdc2 VFS: fixing symbol clash on mc_utime() at non-vfs build 2009-12-30 11:06:10 +02:00
Enrico Weigelt, metux IT service
8cade48b13 VFS: fixing symbol clash on mc_write() at non-vfs build 2009-12-30 11:06:10 +02:00
Enrico Weigelt, metux IT service
1b11c35b2b VFS: fixing symbol clash on mc_read() at non-vfs build 2009-12-30 11:06:10 +02:00
Enrico Weigelt, metux IT service
54f302e2c9 VFS: fixing symbol clash on vfs_file_is_local() at non-vfs build 2009-12-30 11:06:09 +02:00
Enrico Weigelt, metux IT service
49c83d786c VFS: fixing symbol clash on vfs_current_is_local() at non-vfs build 2009-12-30 11:06:09 +02:00
Enrico Weigelt, metux IT service
b86788822d VFS: fixing symbol clash on vfs_init() and vfs_shut() at non-vfs build 2009-12-30 11:06:09 +02:00
Enrico Weigelt, metux IT service
c4776385bc Ticket: #1914: src/mcserv.c: fixed break on unused parameter 2009-12-30 11:03:28 +02:00
Yury V. Zaytsev
cb0d7a36ff Ticket #1867: fish: omit '-l' parameter for userless URLs.
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
2009-12-25 18:57:27 +03:00
Sergei Trofimovich
8abe72112a vfs: ftp: fix build breakage on absent CANON_PATH_RMDBLDT
Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
2009-12-25 17:18:50 +02:00
Slava Zanko
4f36622725 Ticket #1828: Improved symlink handling in ftpfs
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>
2009-12-25 15:53:48 +02:00
Jakob Kemi
6908e6fc48 Ticket #272: Extfs: added S3 backend by Jakob Kemi 2009-12-24 22:26:14 +01:00
Andrew Borodin
b9400e140f Ticket #1892: fixed resource leaks.
Fixed memory leak.
Fixed unclosed file descriptors.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-12-23 22:31:30 +03:00
Slava Zanko
cf8ae36637 Ticket #1605: Incorrect parsing FTP-string
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>
2009-12-22 11:07:24 +02:00
Andrew Borodin
dc604d811a The check result of g_new(), g_new0(), g_malloc(), g_malloc0() and g_realloc() is useless.
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>
2009-12-16 11:10:43 +02:00
Slava Zanko
2a17d8460f Added glib library for mcserv
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-12-16 11:10:43 +02:00
Vit Rosin
b6875454b2 Unifying of g_strconcat() calls
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-12-16 11:10:43 +02:00
Andrew Borodin
ec3c4c37c3 More usage of GLib functions.
Use g_snprintf instead of snprintf and g_free instaed of free.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-12-16 11:10:42 +02:00
Sergei Trofimovich
66371454c7 doxygen: various warning fixes
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>
2009-12-16 11:10:42 +02:00
Enrico Weigelt, metux IT service
d579bb7877 Ticket #1789: Removed obsolete checks for setuid(), getuid(), etc
Removed obsolete checks for setuid(), getuid(), etc

Signed-off-by: Enrico Weigelt <weigelt@metux.de>
2009-12-15 18:13:40 +03:00
Enrico Weigelt, metux IT service
551ac003a4 Ticket #1788: remove obsolete checks for <pwd.h> and <grp.h>
remove obsolete checks for <pwd.h> and <grp.h>

Signed-off-by: Enrico Weigelt, metux IT service <weigelt@metux.de>
2009-12-15 18:00:02 +03:00
Enrico Weigelt, metux IT service
2b4f8103ce Ticket #1786: remove obsolete check for <sys/wait.h>
remove obsolete check for <sys/wait.h>
    This file is C standard, so no explicit check necessary.

Signed-off-by: Enrico Weigelt <weigelt@metux.de>
2009-12-15 17:20:36 +03:00
Slava Zanko
c0ebaf5bd3 Ticket #1796: FTPFS does not work in active mode.
Fix commit for work in passive ftp-mode.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-12-15 13:26:03 +02:00
Enrico Weigelt, metux IT service
e9b01c6400 Ticket #1787: remove obsolete checks for <stdlib.h> 2009-12-13 05:29:35 +01:00
Enrico Weigelt, metux IT service
294f58e85d Ticket #1783: remove own declaration of bzero() 2009-12-12 21:06:40 +01:00
Enrico Weigelt, metux IT service
c99db81350 Ticket #1782: Remove own declaration of ftruncate() 2009-12-12 21:01:46 +01:00
Enrico Weigelt, metux IT service
996029c3e6 Ticket #1784: remove own declaration of strdup 2009-12-12 20:59:08 +01:00
Slava Zanko
3a9f0024da Ticket #1450: FISH: timestamps don't show correctly
Fixed forgotten variable substitution: now substitute value of variable instread of variable name

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-12-07 17:59:44 +02:00
Slava Zanko
d712d2638e Ticket #1796: FTPFS does not work in active mode
Fixed error with active mode of ftpfs.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-12-02 16:05:26 +02:00
Slava Zanko
4fc08a729e Fix broken filenames and timestamps on really poor busybox devices.
This good patch for FISH'ing to devices like my D-Link-500T :)

'busybox ls -lan'  and native 'ls -lan' is different. For example

$ busybox ls -lan /dev

drwxr-xr-x    1 0  0  0     0      0 Jan  1  1970 .
drwxrwxrwx    1 0  0  0     0      68 Dec 12  2007 ..
crw-------    1 0  0  0     0 8,   0 Jan  1  1970 .devfsd
crw-------    1 0  0  0     0 5,   1 Jan  1 12:01 console
crw-rw-rw-    1 0  0  0     0 1,   7 Jan  1  1970 full
...

and
$ ls -lan /dev
drwxr-xr-x  12 0   0     4340 Ноя 20 09:33 .
drwxr-xr-x  23 0   0     4096 Июл 29  2004 ..
crw-rw----+  1 0   0  14,  12 Июл 29  2004 adsp
crw-------   1 0   0  10, 175 Июл 29  2004 agpgart
crw-rw----+  1 0   0  14,   4 Июл 29  2004 audio

output of 'busybox ls' have two additional columns, therefore
names on filesystem shows like:
/1 12:00 proc
/1 1970 dev
/12 2007 bin
/12 2007 etc
/12 2007 lib
/12 2007 sbin
...

This patch will fix it behavior.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-12-01 21:49:12 +02:00
Alexander Moiseenko
11928eeff0 Ticket #1450: FISH: timestamps don't show correctly
Test case:
1) Make FISH-connect to some host;
2) sort files by modification time;
3) will see older files (from previous year) as new files

For check, connect to same host and enter in command line:

ls -lt

Thanks for bugreport to Alexander Glyzov.

Fix issue:
Because first part of FISH-ls script is Perl script.
But localtime function returns dates like:
Fri Sep 18 10:40:28 2009

But in utilvfs.c is written: So both year and time is not allowed.
This commit fixed write format of date.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-12-01 21:49:12 +02:00
Slava Zanko
e7ed071be7 /vfs/extfs/rpm wrapper is totally rewritten.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-11-23 10:16:28 +02:00
Andrew Borodin
d53630b800 Drop srpm VFS at all. rpm VFS is used instead.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-11-23 10:16:28 +02:00
Arkadiusz Miśkiewicz
03fd0a6cd0 Ticket #1590: single rpm script that also does srpm job.
Use rpm script for srpm job, too.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-11-23 10:16:28 +02:00
Andrew Borodin
f84917a188 Fixed skip of empty directories in the root of cpio archive.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-11-19 20:34:25 +03:00
Andrew Borodin
698385bdd0 Ticket #1732: cpio VFS skips empty directories in the root of archive
Initial step: some optimization and type accuracy.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-11-19 20:34:25 +03:00
Slava Zanko
4f6c5e7811 Ticket #1708: ftp permissions
Some FTP-servers don't have chmon support (or don't able to change permissions in some cases).

This commit will add "ignore_ftp_chattr_errors" section into config file.

Now default behavior: ignore FTP errors related to chmod operations.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-11-12 11:06:52 +02:00