Commit Graph

92 Commits

Author SHA1 Message Date
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
Pavel Machek a1d1728dc8 ftpfs . / .. is broken, but previous fix was worse than disease. 2000-08-08 15:12:39 +00:00
Pavel Machek 127611ec77 Fix . and .. in ftpfs directories. 2000-08-04 12:15:46 +00:00
Pavel Machek 392c7489e3 2000-05-18 Andrew V. Samoilov <sav@bcs.zp.ua>
* ftpfs.c: (my_get_host_and_username) space between macro name and
       parentheses removed
2000-05-19 13:09:41 +00:00
Pavel Machek c319041ba8 2000-05-15 Andrew V. Samoilov <sav@bcs.zp.ua>
* tar.c (read_header): memory leaking for empty symlink's names fixed

	* utilvfs.c (vfs_split_url): *host is not assigned if host is null

	* ftpfs.c (login_server): new features of vfs_split_url () used,
	  my_get_host_and_username became macro

	* vfs.c (mc_opendir, mc_chdir): unneeded calls to concat_dir_and_file
	  removed (vfs_canon removes trailing '/')

	* sfs.c (vfmake, redirect): allocated memory realeased on errors
2000-05-16 14:59:33 +00:00
Pavel Machek d7bf5305b1 2000-04-26 Andrew V. Samoilov <sav@bcs.zp.ua>
* direntry.c (vfs_s_find_entry_tree): segfault fixed when root is NULL

        (vfs_s_new_inode, vfs_s_new_entry): g_new replaced by g_new0

        * ftpfs.c (dir_load): ent->name is free()d for "." and ".."

        (ftpfs_directory_timeout): default value changed to 900

        (netrc_next): "const char * const keywords" go to rodata and is shared
2000-04-28 07:43:13 +00:00
Timur Bakeyev ec83d4571e 2000-04-15 Timur Bakeyev <mc@bat.ru>
* ftpfs.c (netrc_next): "const char * keywords" is pretty nice.

	* ftpfs.c (dir_load): At last, found place, that broke handling
	directories with spaces in name. Problem was in prepending "/"
	to "." for current directory. Which was, obviously, wrong. Hacked
	to make just "LIST -la ." instead.

	* vfs.c: Changed to BUF_* constants in some places.
2000-04-14 01:14:26 +00:00
Pavel Machek f5f1ec0523 2000-04-05 Andrew V. Samoilov <sav@bcs.zp.ua>
* utilfs.c (vfs_split_url): don't assign *pass if pass is NULL
        * fish.c (archive_open, archive_same): memory allocated by
          vfs_split_url () must be released after use, don't strdup()
          values allocated by vfs_split_url () and NULL passed to
          vfs_split_url () when password value is unused
        * ftpfs.c (archive_open, archive_same): ditto plus same for
          ftpfs_get_proxy_host_and_port ()
2000-04-10 12:00:43 +00:00
Timur Bakeyev 3bfe8a0b3c 2000-04-06 Timur Bakeyev <mc@bat.ru>
* ftpfs.c (netrc_next): Turned strange "const char * const keywords"
	into more alike "const char const * keywords". Still, think, it's
	too strict.

	* smbfs.c: Add #define BOOL_DEFINED before inclusion of samba headers.
	Libncurses(or slang?) defines BOOL and that can cause problems. (In fact,
	I can't find references to that const, but sure, I hade reason to do that:)

	* util-alone.h: Declare load_anon_passwd() to avoid warnings.
2000-04-09 23:06:59 +00:00
Pavel Machek 425dbd07c1 2000-03-31 Andrew V. Samoilov <sav@bcs.zp.ua>
* vfs.c (mc_def_getlocalcopy): free() replaced by g_free() to prevent
	  crushes with mad, thanks to Timur I. Bakeyev <timur@bat.ru>
	* fish.c (linear_start): name wasn't freed after usage
	* cpio.c (cpio_ungetlocalcopy): return type changed to int,
	  function return 0 now
	* direntry.c (vfs_s_close, vfs_s_resolve_symlink): memory, allocated
	  by vfs_s_fullpath () is freed after use
	* ftpfs.c (linear_start): ditto;
2000-04-05 13:08:42 +00:00
Pavel Machek 24c6ab65f5 Do not free paths returned from vfs_s_get_path_mangle. 2000-04-03 10:35:48 +00:00
Chris Toshok 749789cdf8 include sys/types.h 2000-03-20 01:57:58 +00:00
Pavel Machek 0b25d26cf0 2000-02-25 Pavel Machek <pavel@artax.karlin.mff.cuni.cz>
Patch by  Andrew V. Samoilov <sav@bcs.zp.ua>

        * vfs.[ch] (vfs_canon, mc_open, vfs_file_is_local,
          mc_(un)?getlocalcopy): added const qualifier
        (mc_def_getlocalcopy): tempnam() returns malloc()ed buffer,
          so, free() it, not g_free();
        (vfs_canon): prepend filename by cwd when tilde '~' cannot be expanded;
2000-02-25 12:53:06 +00:00
Norbert Warmuth e37737c0c9 2000-02-23 Norbert Warmuth <nwarmuth@privat.circular.de>
* vfs/ftpfs.c: Definition of PORT changed in the middle of ftpfs.c
with unexpected side effects (only when HSC_PROXY was
defined). Introduce HSC_PROXY_PORT and FTP_COMMAND_PORT and use
where appropriate.

(dir_load): Do not hard code the directory cache timeout to 10
seconds. Instead use the setting from Options/Virtual VFS ...

* vfs/fish.c (file_store): honour changed semantics for return value
(on error -1 is expected).

* vfs/ftpfs.c (file_store): dito


* gtkedit/editcmd.c (edit_replace_prompt): fix incorrect
initialization of array of structure (gcc version 2.96 20000131
chokes on it).

* lib/mc.hint: C-y and not C-u can be used to insert text in input
lines (e. g. text which has been deleted with M-d).

* configure.in: Fix the extfs-configure-fragment-in-final-output bug

* src/main.c (parse_control_file): add missing right parentheses

* src/boxes.c: fix incorrect initialization of array of structure (gcc
version 2.96 20000131 chokes on it).
2000-02-23 07:43:14 +00:00
Pavel Machek d332550407 Fixed error where relative paths were errorneously used. 2000-02-03 21:59:04 +00:00
Pavel Machek 28eb60242d ftpfs can not handle homes nicely. Is there good way to solve this? 2000-01-24 12:35:52 +00:00
Pavel Machek dcb64cee6d 2000-01-18 Pavel Machek <pavel@artax.karlin.mff.cuni.cz>
* ftpfs.c: cosmetic fixes + killed ugly infinite loop, patch
	from Andrew V. Samoilov
2000-01-12 23:45:51 +00:00
Pavel Machek 748e4c38f9 1999-12-15 Pavel Machek <pavel@artax.karlin.mff.cuni.cz>
* Merged changes by Andrew V. Samoilov <sav@bcs.zp.ua>. They are
	mostly internationalization + fixing stupid bugs of mine
1999-12-16 12:55:16 +00:00
Pavel Machek bcfd532240 1999-12-08 Pavel Machek <pavel@artax.karlin.mff.cuni.cz>
* ftpfs.c: basically replaced ftpfs with new one. Unlike the
        previous one, this uses new direntry.c layer, so shared_ftp_fish.c
        can be killed.

        This is new code, so beware.
1999-12-08 11:39:14 +00:00
Miguel de Icaza 098040d52b Typo fix 1999-10-19 18:34:48 +00:00
Miguel de Icaza 7db5c96a00 1999-10-07 Miguel de Icaza <miguel@gnu.org>
* ftpfs.c (linear_read): Applied patch from Alexander V. Lukyanov
	<lav@yars.free.net> that makes the code compliant to RFC959
1999-10-07 05:24:54 +00:00
Miguel de Icaza 897a4a5c6f 1999-08-30 Miguel de Icaza <miguel@gnu.org>
* ftpfs.c (insert_dots): Use g_new here.

	* shared_ftpfs_fish.c: Style fixes and small fixes

1999-09-22  Bjorn Eriksson <mdeans@algonet.se>

	* extfs/uzip.in: Better handling of zip-archives that contain files
	which contain spaces.
1999-09-25 20:25:20 +00:00
Norbert Warmuth d836e5a79a 1999-09-19 Andrew V. Samoilov <sav@bcs.zp.ua>
* src/user.c (check_patterns): char* is used instead of char [] in sizeof

* src/util.c (string_perm): prefix named pipes by 'p' and not by `s'


1999-09-19  David Martin <dmartina@usa.net>

* gtkedit/editcmd.c (edit_print_string): Use unsigned char so that
8 bit chars from strftime get displayed when inserting date.

* lib/mc.ext.in: Add entries for bzip2 compressed pages as used in
Mandrake 6.0. The generic entry for bzip2 moved to the end of the
file to avoid interferences. In this one I changed the extension check
to a type check (as used for gzip) which might give problems in some
systems.

* configure.in: Use -Tlatin1 to format man pages when available and
"view" 8 bit chars.


1999-09-19  Norbert Warmuth  <nwarmuth@privat.circular.de>

* gtkedit/edit.h: Include files reordered in order to make it compile with
--with-debug

* gtkedit/editcmd.c (menu_save_mode_cmd): calculate dialog width
dependent on lenght of translated strings to display.

* src/mad.c, mad.h, util.c, util.h: Move mad-functions from util.[ch]
to mad.[ch]

* src/option.c: Include files reordered in order to make it compile with
--with-debug

* src/mad.c (mad_init): New function. Initialize debug FILE pointer to
stderr (moved to a function because not on every system stderr is
a constant).
(mad_set_debug): added const qualifier

* src/main.c (main): call mad_init

* po/*.po: s/defination/definition/

* gnome/Makefile.in ($(MAGICDEV_GENERATED)): Make it compile with $buildir
!= $srcdir.

* vfs/ftpfs.c (ftpfs_set_debug), vfs.h: added const qualifier.

* vfs/mcserv.c: removed definition of mad_strconcat which is also
in mad.c.
1999-09-19 23:09:07 +00:00
Miguel de Icaza ef2d3cbb1a 1999-08-30 Miguel de Icaza <miguel@nuclecu.unam.mx>
* ftpfs.c (translate_path): Remove static buffer from here.
	Return a strdupped string now.
	(send_ftp_command): Release translate_path result here.
	(open_data_connection): Release translate_path result here.
	(ftpfs_chdir_internal): Reease it here too.
1999-08-31 00:11:57 +00:00
Norbert Warmuth d393e2e098 1999-08-30 Norbert Warmuth <nwarmuth@privat.circular.de>
* lib/mc.sh: create temporary files in ~/.mc/tmp in order to avoid
symlink attacks (mcfn_install and the man page still needs to be
updated).

* src/main.c (print_mc_usage): Print the bug reporting address.
(main): Put prompt in a new line at termination.

* vfs/shared_ftp_fish.c (get_line): Fixed off by one error ('\0' might
have been written one slot past the supplied character array).

* vfs/ftpfs.c (resolve_symlink_without_ls_options): Don't dump core on
strange symlinks (ls -la doesn't reveal where the symlink points to
and ls -lLa doesn't resolve the symlink either)

Added protection against recursive symbolic links.
1999-08-30 06:01:37 +00:00
Norbert Warmuth d32e4e77e6 Fri Jun 18 11:29:56 1999 Norbert Warmuth <nwarmuth@privat.circular.de>
* src/user.c (user_menu_cmd): Allow national characters as hotkeys.
Don't dump core when the menu file contains only empty lines

* src/view.c (search, block_search): Use the correct column for the
percent display while searching.


Fri Jun 18 11:49:05 1999  Norbert Warmuth  <nwarmuth@privat.circular.de>

* vfs/ftpfs.c (resolve_symlink_with_ls_options): Some ftp servers don't
make a difference between "LIST -la" and "LIST -lLa". If we find such
a server don't use -lLa when resolving symbolic links.
1999-06-18 22:25:24 +00:00
Norbert Warmuth 52d700b4b0 Fri Apr 23 21:02:32 1999 Norbert Warmuth <nwarmuth@privat.circular.de>
* vfs/ftpfs.c (retrieve_dir): If we don't get any valid directory entry
(i.e. not even "." and "..") check whether the directory is empty
or not existend (instead of failing with "ftpfs: failed").
1999-04-24 05:40:11 +00:00
Miguel de Icaza b3bb157ad5 These are a bunch of changes to fix CORBA and session management. They
are almost complete (i.e. to handle all nitty gritty cases), but they
seem to be working OK right now.  SM should be much more stable now.
Please tell me if you find any weird behavior - Federico

1999-03-30  Federico Mena Quintero  <federico@nuclecu.unam.mx>

	* gdesktop-icon.c (desktop_icon_realize): Remove the
	WM_CLIENT_LEADER property from icon windows so that window
	managers will not store SM information for them.

	* gnome-open-dialog.c: Added missing #includes.

	* gdesktop-init.c (desktop_init_at): Removed an unused variable.

	* gdesktop.h: Added some missing prototypes.

	* gmain.h: Added some missing prototypes.

	* Makefile.in: Added gsession.[ch] to the list of sources.

	* gmain.c (create_panels): Consider whether we have a CORBA server
	and session management.

	* gdesktop.c: #include "gdesktop-init.h"
	* gdesktop.c: Added a missing cast to GNOME_DIALOG.

	* gmain.c (create_panels): Removed the run_desktop global
	variable.

	* glayout.c (create_container): Set the wmclass of the panel to
	include its unique ID.

	* gsession.[ch]: New file with the functions that deal with
	session management.

	* glayout.c (gnome_exit): Use session_set_restart().

	* gcorba.c (corba_init): Now returns an int with an error value.
	(corba_init_server): Initialize the server properly.
	Fixed all the object implementation code.
	(corba_create_window): New function used to create a window with
	the CORBA server.

	* gmain.c (gnome_check_super_user): Now the check for running as
	root is done here.  There should be no GUI code in src/.

1999-03-30  Federico Mena Quintero  <federico@nuclecu.unam.mx>

	* dlg.c (dlg_run_done): Do not call the callback of a NULL current
	widget.

	* setup.h: Added missing prototype for setup_init().

	* filegui.c (check_progress_buttons): Added a missing return
	value.

	* dlg.c (remove_widget): Added a missing return value.

	* main.c: Removed the global directory_list variable.
	Removed the main_corba_register_server() function.

	* main.h: Removed the global run_desktop variable.

	* panel.h: Now the panel structure has a unique numerical ID used
	for session management.

	* screen.c (panel_new): Maintain a unique ID for each panel.

	* main.c (maybe_display_linksdir): Handle display of the desktop
	init dir here.
	(main): Call gnome_check_super_user().
	(init_corba_with_args): Call corba_init_server().

	* main.c (init_corba_with_args): Do CORBA initialization here.  Also
	removed the global force_activation option.

1999-03-30  Federico Mena Quintero  <federico@nuclecu.unam.mx>

	* vfs.c (vfs_add_current_stamps): Only do stamping of the panels
	if they exist.

	* mcserv.c: #include <sys/wait.h>
	(get_client): Put `#ifdef __EMX__' around an otherwise-unused
	variable.

	* utilvfs.c (vfs_split_url): Fix NULL <-> 0 confusion when
	comparing characters.

	* ftpfs.c (retrieve_dir): Removed unused variable dot_dot_found.

	* extfs.c (extfs_init): Assign `key' to c, not `&key'.
1999-03-30 06:09:56 +00:00
Miguel de Icaza ff1a8f6a3b Ok, I am finally back.
Basically, I had to setup an ssh tunnel to be able to use CVS.  After
5 hours trying to get the damn thing to cvs update it was clear to me
why the .es people do not like to use the gnome cvs.

We really need a tunnel for .es hackers (as they have excellent connectivity
to the rest of Europe, they are just routed trough a 2 byte link to the US).

1999-03-22  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* treestore.c (process_special_dirs): Free memory here.

	Fix test: Skip only "." and "..", before it could skip "?.".

1999-03-22  David Martin <dmartina@mailexcite.com>

	* wtools.c (real_input_dialog_help): Do a strncmp with the lenght
	of th same translated "Password:" string.

1999-03-22  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* glayout.c (create_new_menu_from): closedir after running.

1999-03-20  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* gnome-file-property-dialog.c (apply_metadata_change): Fix the
	test for setting the icon.  It was being done incorrectly and thus
	it was never possible to change the icon.

	* glayout.c (gnome_launch_mime_editor): Add mime-type-edit command
	to the menu: this launches mime-type-capplet

1999-03-22  David Martin <dmartina@mailexcite.com>

	* ftpfs.c: Internationalize the messages that are displayed as
	hints.

1999-03-22  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* extfs.c (extfs_init): Fix the code here:  If the key is empty or
	only contains a new line, C would be pointing into an invalid location.
1999-03-24 12:16:52 +00:00