Commit Graph

120 Commits

Author SHA1 Message Date
Pavel Roskin
5cb2ef30f3 Fix duplicate declarations. 2002-11-15 06:38:55 +00:00
Pavel Roskin
6b2d184d9e * ftpfs.c (ftpfs_open_socket): Use INADDR_NONE, not -1. 2002-11-15 05:41:27 +00:00
Andrew V. Samoilov
5959aff123 * ftpfs.c (linear_abort): Close data socket dsock. 2002-11-12 15:26:18 +00:00
Pavel Roskin
b684aa93dc Comment change. 2002-11-02 16:58:18 +00:00
Pavel Roskin
43b3170fc4 * ftpfs.c (linear_abort): Close data socket, ProFTPD 1.2.6
expects the client to close it.
2002-10-25 21:50:21 +00:00
Andrew V. Samoilov
24a4e98387 (FH_SOCK): Remove second C++ commented definiation 2002-10-25 08:23:57 +00:00
Pavel Roskin
604950704a * ftpfs.c (linear_abort): Add a timeout after which a reconnect
is performed instead of further fetching of the remaining data.
2002-10-07 17:56:15 +00:00
Pavel Roskin
95ffa342bd * container.h: Remove, it's unused. 2002-10-01 03:54:05 +00:00
Pavel Roskin
da7e82d253 Global removal of RCS Id: flags. 2002-09-26 23:13:45 +00:00
Pavel Roskin
b5700cf6f8 * configure.in: Remove support for HSC proxy - it's obsolete.
Remove all references to HSC proxy everywhere.
2002-09-22 06:14:16 +00:00
Pavel Roskin
3c7cc35025 * ftpfs.c: Check for existance of arpa/inet.h when using it.
* mcfs.c: Likewise.
* mcserv.c: Likewise.
* tcputil.c: Likewise.
* utilvfs.c: Likewise.
2002-09-06 01:02:25 +00:00
Pavel Roskin
0d7af2cdba * acinclude.m4: Remove Termnet support, it's too old and obscure
to be supported properly.
2002-09-03 17:58:26 +00:00
Andrew V. Samoilov
a3668cd14a * ftpfs.c (dir_load): Don't handle empty remote_path in special
way.
2002-08-21 08:22:33 +00:00
Pavel Roskin
2be225d9e0 * ftpfs.c: Don't use SUP.home, use SUP.cwdir.
* fish.c: Likewise.
(dir_load): Update SUP.cwdir.
* xdirentry.h: Remove "home" field for fish and ftpfs.
2002-07-19 16:36:32 +00:00
Pavel Roskin
982a256ee0 * xdirentry.h: Get rid of ifree(), it's equivalent to g_free().
* direntry.c: Likewise.
* fish.c: Likewise.
* ftpfs.c: Likewise.
2002-07-19 16:04:27 +00:00
Pavel Roskin
0b4a33c10f * undelfs.c (undelfs_opendir): Use parametrized messages without
VFS name for success and failure.
* fish.c (dir_load): Use new messages from undelfs.c, indicate
success by printing "done".
* ftpfs.c (dir_load): Likewise.
2002-07-19 04:29:37 +00:00
Pavel Roskin
7978b33a9d * ftpfs.c: Replace bzero and bcopy with memset and memcpy.
* mcfs.c: Likewise.
* mcserv.c: Likewise.
* smbfs.c: Likewise.
* tar.c: Likewise.
2002-07-15 05:31:43 +00:00
Pavel Roskin
00700a9ce2 * ftpfs.c (login_server) [HSC_PROXY]: Fix crash. 2002-07-13 00:22:49 +00:00
Pavel Roskin
afd132617d * ftpfs.c (ftp_split_url): Implement looking up password in
.netrc for known user.
2002-07-12 23:41:43 +00:00
Pavel Roskin
e88191dd7c * ftpfs.c (ftp_split_url): Don't expect lookup_netrc() to always
return a username.
(netrc_has_incorrect_mode): Don't free anything, it can result
in freeing some variables twice.
(find_machine): New function to find matching "machine" or
"default" token.
(lookup_netrc): Eliminate external loop - scan for login and
password, but don't fallback to another string in case of
trouble.
2002-07-12 23:20:03 +00:00
Pavel Roskin
14bac1dda4 * ftpfs.c: Introduce enum keyword_t to improve readability.
(netrc_next): Fix return value for unknown keywords.
(lookup_netrc): Remove special processing of "*netrc*".
2002-07-12 20:00:03 +00:00
Pavel Roskin
1accbb4789 * ftpfs.c (ftp_split_url): Move protection against pass being
NULL ...
(lookup_netrc): ... here.
2002-07-12 17:39:01 +00:00
Pavel Roskin
4f52b831df * xdirentry.h: Eliminate use_proxy field.
* ftpfs.c (open_archive_int): Use SUP.proxy instead of
SUP.use_proxy.
(open_archive): Set SUP.proxy to ftpfs_proxy_host.
* ftpfs.h: Eliminate unused structures.
2002-07-12 00:05:11 +00:00
Pavel Roskin
6ddf5f78ed * vfs.h: Rename URL_DEFAULTANON to URL_ALLOW_ANON.
* utilvfs.c (vfs_split_url): Return NULL as username if
URL_ALLOW_ANON is set and no username is found in the URL,
otherwise use current name.
* ftpfs.c (ftp_split_url): New function - split URL and look up
username and password if needed.
(login_server): Use ftp_split_url().
(archive_same): Likewise.
2002-07-11 23:08:30 +00:00
Pavel Roskin
2acfb89cd4 * tcputil.h: Move use_netrc declaration ...
* vfs.h: ... here.
* ftpfs.c: Implement .netrc support unconditionally.
(lookup_netrc): Make static.
* utilvfs.c: Initialize default_is_netrc.
From Thomas Zajic <zlatko@gmx.at>
2002-07-10 21:26:55 +00:00
Pavel Roskin
e385a9c9ab * ftpfs.c (setup_passive): Cast arguments to isdigit() to
unsigned char for compatibility with non-GNU libc.
* tar.c (from_oct): Likewise with isspace().
Reported by Roland Illig <1illig@informatik.uni-hamburg.de>
2002-07-03 19:09:03 +00:00
Pavel Roskin
c8ef2d7ace * ftpfs.c (send_ftp_command): Use "anonymous@" as default
anonymous password.
From Eduardo Perez Ureta" <eperez@it.uc3m.es>
2002-07-02 17:08:10 +00:00
Andrew V. Samoilov
a60f38583a * xdirentry.h (vfs_s_fh.u.ftp): Add append field.
(vfs_s_data.file_store): Change second argument
to (vfs_s_fh *fh).
* direntry.c (vfs_s_close): Adjust.
* fish.c (file_store): Likewise.
* ftpfs.c (file_store): Likewise.  Use "APPE" if
fh->u.ftp.append is true.
(linear_start): Care about fh->u.ftp.append.
(ftpfs_fh_open): Likewise.
2002-05-22 17:19:24 +00:00
Andrew V. Samoilov
b314cad164 * fish.c (fish_fh_open): Generate fh->ino->localname
if this one is NULL and file is opened for writting only.
* ftpfs.c (ftpfs_fh_open): Likewise if control_connection_buzy
is true.
2002-05-22 13:31:15 +00:00
Andrew V. Samoilov
c5626b241c * ftpfs.c (linear_read): Unset control_connection_buzy
on EOF.
(ftpfs_fh_close): Call vfs_s_invalidate ().
2002-05-21 17:10:50 +00:00
Andrew V. Samoilov
09bad78c80 * xdirentry.h (vfs_s_super): Add control_connection_buzy
field to ftp struct.

	* ftpfs.c (linear_start): Set control_connection_buzy.
	(linear_abort): Unset control_connection_buzy.
	(ftpfs_fh_open): Don't retrieve file if it is
	opened for writting only.  Open data connection as
	fh->handle and unlink/unset local temporary file
	if control connection isn't buzy.
	(ftpfs_fh_close): New function to serve opened in
	ftpfs_fh_open() data connection.  Unset fh->changed
	to prevent MEDATA->file_store() call from vfs_s_close().
2002-05-17 13:32:02 +00:00
Andrew V. Samoilov
1711c0ab8b * direntry.c (vfs_s_retrieve_file): Use off_t for total
and stat_size.

* vfs.c (vfs_s_resolve_symlink): Use snprintf
instead of sprintf.
(vfs_print_stats): Use off_t for have and need.  Cast
have to double to eliminate negative percent(s).
Fix print_vfs_message string formats.

* vfs.h (vfs_print_stats): Adjust declaration.

* ftpfs.c (file_store): Use off_t for total.
Fix print_vfs_message string format.
2002-02-08 09:42:38 +00:00
Andrew V. Samoilov
ccdd8e8859 * ftpfs.c (dir_load): Speed up cd_first calculation.
(ftpfs_flushdir): Resurrect.
2002-02-07 19:22:20 +00:00
Andrew V. Samoilov
0314076889 (ftpfs_chmod): Don't ignore errors. 2002-02-06 12:32:52 +00:00
Andrew V. Samoilov
e32151bb9e * ftpfs.c (dir_load): Use "LIST -la" instead of "LIST -la ."
to eliminate problem with wu-ftpd.
Close sock on error. Eliminate goto.

(reconnect): Restore cwdir if login_server fails.
2002-02-06 12:28:08 +00:00
Andrew V. Samoilov
20c71f0c51 * ftpfs.c (translate_path): Remove leading slash(es) more
carefully.
(initconn): Check getsockname() return value.
Eliminate goto.
(linear_abort): Make ipbuf const array.
2002-02-01 12:21:55 +00:00
Andrew V. Samoilov
d4f5c90dd6 * ftpfs.c (reconnect): New function to restore closed connection.
(command): Use reconnect if EPIPE received.
(dir_load): Eliminate recursion.
(login_server): Constify netrcpass parameter.
(is_same_dir): Constify path parameter.
2002-01-29 08:09:20 +00:00
Andrew V. Samoilov
38a5875f4c * ftpfs.c (ftpfs_chmod): Add missed '/'. 2002-01-22 09:42:41 +00:00
Pavel Roskin
2b9f5265b4 * ftpfs.c (command): Declare with the printf attribute.
* undelfs.c: Remove declaration of print_vfs_message().
2001-10-20 07:12:55 +00:00
Pavel Roskin
0c52fb0f99 * fish.c (file_store): Fix incorrect format string
for print_vfs_message().
* ftpfs.c (file_store): Likewise.
2001-10-20 07:04:31 +00:00
Andrew V. Samoilov
1e23c4fb68 * ftpfs.c (ftpfs_fill_names): New function.
(vfs_ftpfs_ops): Use ftpfs_fill_names insted of vfs_s_fill_names.
2001-08-06 15:39:08 +00:00
Pavel Roskin
680f3f7ed2 * cpio.c: Include <config.h> before everything else.
* direntry.c: Likewise.
* fish.c: Likewise.
* ftpfs.c: Likewise.
* local.c: Likewise.
* tar.c: Likewise.
* utilvfs.h: Don't include <config.h> - it should be included
in all C files instead.
* xdirentry.h: Likewise.
2001-06-25 21:34:46 +00:00
Pavel Roskin
5da3b42969 * ftpfs.c: Declare functions without declarations static. Don't
omit `void' in declarations.
* cpio.c: Likewise.
* direntry.c: Likewise.
* extfs.c: Likewise.
* mcfs.c: Likewise.
* tar.c: Likewise.
* vfs.c: Likewise.
* vfs.h: Likewise.
* mcserv.c: Likewise. Remove unused functions.
2001-06-14 20:08:27 +00:00
Pavel Roskin
6fe51516de * cpio.c (vfs_cpiofs_ops): Use short name for the filesystem.
This avoids creating long filenames in dirent.c when the "name"
field is used.
* extfs.c (vfs_extfs_ops): Likewise.
* fish.c (vfs_fish_ops): Likewise.
* ftpfs.c (vfs_ftpfs_ops): Likewise.
* local.c (vfs_local_ops): Likewise.
(vfs_nil_ops): Likewise.
* mcfs.c (vfs_mcfs_ops): Likewise.
* sfs.c (vfs_sfs_ops): Likewise.
* tar.c (vfs_tarfs_ops): Likewise.
* undelfs.c (vfs_undelfs_ops): Likewise.
2001-06-11 21:58:58 +00:00
Pavel Roskin
da80aef5a8 * ftpfs.c: Warning fixes. 2001-05-14 23:34:43 +00:00
Pavel Roskin
447597a790 * vfs.h: Include sys/timeb.h if it's present. Include time.h and
sys/time.h as recommended by Autoconf documentation.
* cpio.c: Remove all time-related includes - they are in vfs.h.
* extfs.c: Likewise.
* ftpfs.c: Likewise.
* mcfs.c: Likewise.
* mcserv.c: Likewise.
* tar.c: Likewise.
* util-alone.c: Likewise.
* vfs.c: Likewise. Include xdirentry.h.
2001-02-20 16:55:58 +00:00
Andrew V. Samoilov
94bcfc289d * ftpfs.c (vfs_ftpfs_ops): typo fixed 2000-12-04 19:14:52 +00:00
Pavel Machek
55e56a1426 Fixes from Roland: we may not g_free() strdup-ed text. 2000-10-31 15:43:49 +00:00
Andrew V. Samoilov
a1e4132357 * ftpfs.c (open_data_connection): don't generate //filename, some
ftp servers can't store it;

	(command): g_strdup_vprintf() and g_strconcat() replaced
	by g_strdup_vprintf(), g_realloc() and strcpy()
	to reduce memory usage when trailing "\r\n" added;

	(ftpfs_set_debug, ftp_data): ftp_data.logfile assigned with logfile
	value to log servers replies
2000-10-16 18:37:54 +00:00
Pavel Roskin
e828211662 Updated address of Free Software Foundation 2000-08-22 22:50:00 +00:00