Commit Graph

74 Commits

Author SHA1 Message Date
Leonard den Ottolander 133196d197 vfs/tar.c (tar_read_header): Properly handle non \0 terminated tar entries
with name of length NAMSIZ.
2005-07-06 14:15:54 +00:00
Pavel Roskin 1f60f44145 Update postal address of Free Software Foundation. 2005-05-27 03:35:10 +00:00
Roland Illig d7e7ec48dd * *.c: Declared unused variables with (void) to avoid the gcc
warnings.
	* extfs.c (extfs_get_path_mangle, extfs_get_path): Removed unused
	parameter.
	* ftpfs.c (ftpfs_netrc_bad_mode): Likewise.
	* vfs.c (mc_def_getlocalcopy): Likewise.
2005-02-22 18:35:22 +00:00
Roland Illig 54cccec688 * utilvfs.h: Removed unneeded #includes.
* *.c: Added the #includes that have been removed from utilvfs.h.
	* tcputil.c: Just removed the unneeded #include "utilvfs.h".
2005-02-19 16:36:38 +00:00
Andrew V. Samoilov 65f99d5493 * tar.c (tar_read_header): Skip over records containing
incremental tar specific info.
2004-12-01 08:43:25 +00:00
Roland Illig 75ec336c52 * tar.c (tar_read_header): Fix pathname canonicalization. 2004-11-01 07:49:36 +00:00
Andrew V. Samoilov fd913b65b6 * tar.c tar_read_header(): q should not point to a static string.
Canonicalize q.
2004-10-27 12:44:48 +00:00
Roland Illig 689afa899a * tar.c (tar_read_header): Fixed handling of filenames starting
with "./".
2004-10-16 17:17:31 +00:00
Andrew V. Samoilov c060826178 * direntry.c (vfs_s_free_entry): g_free handles NULL argument too,
no need for the comparison.
        * extfs.c (extfs_free_archive): Likewise.
            (extfs_open_archive): Likewise.
            (extfs_read_archive): Likewise.
            (extfs_remove_entry): Likewise.
            (extfs_free_entry): Likewise.
        * fish.c (fish_open_archive): Likewise.
            (fish_archive_same): Likewise.
        * ftpfs.c (ftpfs_split_url):  Likewise.
        * local.c       (local_closedir): Likewise.
        * mcserv.c (close_handle): Likewise.
        * smbfs.c (smbfs_free_bucket): Likewise.
        * tar.c (tar_read_header): Likewise.
        * undelfs.c (undelfs_shutdown): Likewise.
        * vfs.c (vfs_shut): Likewise.
2004-09-24 23:00:18 +00:00
Roland Illig 4bc786735e * cpio.c: Replaced NULL with (char *) NULL. Likewise for 0, where
NULL was meant.
	* direntry.c: Likewise.
	* extfs.c: Likewise.
	* fish.c: Likewise.
	* ftpfs.c: Likewise.
	* mcfs.c: Likewise.
	* tar.c: Likewise.
	* undelfs.c: Likewise.
	* vfs.c: Likewise.
2004-09-24 15:08:21 +00:00
Andrew V. Samoilov e04694309c * tar.c (tar_read_header): Fix missed *.
* extfs.c (extfs_readlink): Revert last change: readlink does not
        append a NUL character to buf.
        * ftpfs.c: Warning fix.
        * vfs-impl.h (struct vfs_class.readlink): Make "size" size_t.
        Adjust all callers.
2004-09-02 13:57:59 +00:00
Andrew V. Samoilov 15c6e5cae6 * direntry.c (vfs_s_readlink): Use g_strlcpy instead strncpy.
* ftpfs.c (ftpfs_get_reply): Use g_strlcpy instead strncpy.
* extfs.c (extfs_readlink): Fix return value. Use g_strlcpy
        instead strncpy.
* mcfs.c (mcfs_readlink): Fix return value. Use g_strlcpy
        instead strncpy.
* tar.c (tar_read_header): Add additional check for consistency.
        Fix memory leak.
* cpio.c (cpio_defer_find): Remove recursion.
        (cpio_free_archive): Fix memory leak.
        (cpio_read_bin_head): Use union for simplicity using of header
        structure. Add additional check for consistency.
        (cpio_read_oldc_head): Add additional check for consistency.
2004-09-02 00:09:02 +00:00
Pavel Roskin 8ab694ba2d * tar.c: Eliminate struct hstat, use stack arguments instead. 2004-06-14 16:04:07 +00:00
Pavel Roskin 6ffd35bf07 * gc.c: Eliminate all code for timestamping parent filesystems.
It's broken and undocumented.  Adjust all dependencies.
2003-11-26 21:10:42 +00:00
Pavel Roskin b33f2cbb47 * vfs.c: Split garbage collection code into ...
* gc.c: ... this.
* vfs.h: Corresponding code moved ...
* gc.h: ... here.
* Makefile.am: Adjustments for the above.
2003-11-07 23:43:55 +00:00
Pavel Roskin 8e3a0c9d65 * direntry.c (vfs_s_init_class): Improve interface to allow more
code reuse.  Change all callers.
(vfs_s_getlocalcopy): New implementation.  Don't use
mc_def_getlocalcopy().  Use vfs_s_open() to create local copy.
(vfs_s_ungetlocalcopy): New function.
* xdirentry.h: Add new field "flags" to struct vfs_s_subclass.
* extfs.c (extfs_ungetlocalcopy): Don't use
mc_def_ungetlocalcopy() in the dead branch.
* vfs.c (mc_def_getlocalcopy): Make static.
(mc_def_ungetlocalcopy): Likewise.
2003-10-28 07:09:39 +00:00
Pavel Roskin 7d16d65e35 * vfs.h: Constify some arguments for many functions.
* xdirentry.h: Likewise.  Adjust all dependencies.
2003-10-28 02:10:33 +00:00
Pavel Roskin 5bc20fd294 * *.c: Rename functions that don't have an a prefix indicating
what file they are defined in.  This simplifies debugging.
2003-10-28 00:57:02 +00:00
Pavel Roskin 4ee3f26133 * cpio.c (cpio_ungetlocalcopy): Remove.
* tar.c (tar_ungetlocalcopy): Likewise.
* vfs.c (mc_def_ungetlocalcopy): Add support for read-only
filesystems.
2003-10-27 21:01:00 +00:00
Pavel Roskin bc455d5840 * direntry.c (vfs_s_find_inode): Only allow search from root.
Change second argument to superblock to prevent abuse.
2003-10-27 03:09:40 +00:00
Pavel Roskin 511321bcfd * direntry.c (vfs_s_add_dots): Remove. Fix all callers.
(vfs_s_free_inode): Remove support for "." and ".." entries.
* ftpfs.c (dir_load): Likewise.
Support for "." and ".." entries was a hack that could make the
cache non-traversible from inodes to the root and cause infinite
loop in vfs_s_fullpath().
Reported by Frdric L. W. Meunier <lists1@pervalidus.net>
2003-10-27 01:26:18 +00:00
Pavel Roskin 211ce16fac * wtools.c: Merge mc_message() and message() into one background
safe function message().  Fix all callers.
2003-10-26 04:47:20 +00:00
Pavel Roskin 7cc31809be * tar.h: Merge into tar.c, as it doesn't provide any external
interface.
* Makefile.am: Remove tar.h.
2003-10-26 03:34:42 +00:00
Pavel Roskin 50045218ab Remove unneeded includes in ../src 2003-10-25 21:34:57 +00:00
Pavel Roskin 2d33b5047e * background.c: Replace all message stubs with a new function
mc_message().  Protect against strlen(MSG_ERROR).  Adjust all
dependencies.
2003-10-25 19:54:24 +00:00
Pavel Roskin 0b99804da2 * names.c: Merge ...
* utilvfs.c: ... here.
* names.h: Merge ...
* utilvfs.h: ... here.
* Makefile.am: Remove references to names.c and names.h.
2003-10-16 16:50:09 +00:00
Pavel Roskin 63740624ea * xdirentry.h: Rename vfs_s_data to vfs_s_subclass.
* cpio.c: Initialize only non-zero fields in vfs_s_subclass.
* fish.c: Likewise.
* ftpfs.c: Likewise.
* tar.c: Likewise.
2003-10-16 16:40:11 +00:00
Pavel Roskin fc7267906f * xdirentry.h: Move system includes to the files that need them. 2003-10-16 08:47:33 +00:00
Pavel Roskin a6754ce841 * xdirentry.h: Cleanup unused or write-only fields. Adjust all
dependencies.
2003-10-16 05:47:23 +00:00
Pavel Roskin 6cf97f4069 * xdirentry.h: Remove all typedefs, there is no need to hide the
fact that structures are structures.  Fix all dependencies.
2003-10-12 01:00:44 +00:00
Pavel Roskin 00b57fd4bf * vfs.h: Remove typedef vfs, it's too ambiguous. Massive
changes to use struct vfs_class instead.
2003-10-12 00:24:00 +00:00
Pavel Roskin 5cad1eb493 * tarfs.c: Switch to self-registration. 2003-10-11 09:55:13 +00:00
Pavel Roskin b246f3c7ea s/Could not/Cannot/ 2002-12-08 01:12:18 +00:00
Pavel Roskin b9c6a9b3d1 * vfs.h: Remove vfs_uid and vfs_gid. Fix all dependencies. 2002-12-06 02:14:28 +00:00
Pavel Roskin 7f6b843a94 * cpio.c (cpiofs_data): Warning fix in initization.
* tar.c (tarfs_data): Likewise.
2002-11-11 07:46:21 +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 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 7f6c3c3bb6 is_gunzipable() -> get_compression_type() 2002-07-02 21:12:10 +00:00
Pavel Roskin 6975fdf5e8 * vfs.h: Remove all tricks with system headers, they all should
be in global.h.
* cpio.c: Include utilvfs.h earlier.
* tar.c: Likewise.
2002-01-21 21:26:49 +00:00
Pavel Roskin 401ca73645 * tar.c (ReadStatus): Fix compilation on AIX.
From Dan McNichol <mcnichol@austin.ibm.com>.
2001-07-10 03:12:02 +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 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
Pavel Roskin e828211662 Updated address of Free Software Foundation 2000-08-22 22:50:00 +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 1139602a9b Return value is needed for mc_[un]getlocalcopy. 1999-11-11 14:23:40 +00:00
Norbert Warmuth 972271c9e2 1999-08-06 Norbert Warmuth <nwarmuth@privat.circular.de>
* gnome/gconf.h (PORT_STATIC_IN_STRING_FILE_XTIME): new port specific
feature. The Gnome edition first calls all string_file functions
and then uses the return values of these functions. Therefore additional
static buffers in string_file_[acm]time are needed.

* src/screen.c (string_file_[amc]time): These three functions use
file_date which returns a pointer to a static buffer. In the
Gnome edition this buffer has to be coppied to a static buffer
which isn't used in the other two functions (Fix Bug #1766).

* src/util.c, util.h: Moved some constants to util.h

* vfs/tar.c (read_header): Don't segfault when a symlink points to the
root directory.


1999-08-04  Norbert Warmuth  <nwarmuth@privat.circular.de>

* src/widget.c (push_history): Add SMB Link to the list of input dialogs
where urls are input without vfs prefix.

Translate the titles of these input dialogs only once.

Removed Gnome specific code because the Gnome edition doesn't use
the input history any more.

* src/util.c (strip_password): Add /#smb: to the list of urls which might
be input with password.
1999-08-06 19:24:04 +00:00
Norbert Warmuth 2441189d12 Sat Feb 6 23:44:28 1999 Norbert Warmuth <nwarmuth@privat.circular.de>
* vfs/tar.c (read_header): Treat hardlinks correctly.
1999-02-06 23:52:11 +00:00
Timur Bakeyev e57da1f7b3 Glibing....
Wed Jan 27 03:09:48 1999  Timur I. Bakeyev <mc@bat.ru>

	* All around the source: Changed copy_strings() to g_strconcat(). Modi-
	fy last parameter in concat_dir_and_file() to "" - to prevent stack from
	disbalancing.
1999-01-27 00:49:11 +00:00