Pavel Roskin
6b4f397f5b
* Makefile.am: Compile utilvfs.c even without USE_VFS_NET.
...
* utilvfs.c (vfs_split_url): Only compile with USE_NETCODE
defined.
2003-10-29 07:19:25 +00:00
Pavel Roskin
cd644b527c
* fish.c (fish_fh_open): Use vfs_mkstemps() for write buffers as
...
well, since the file can be reopened for reading later.
* ftpfs.c (ftpfs_fh_open): Likewise.
2003-10-29 01:35:36 +00:00
Pavel Roskin
edce41facd
* utilvfs.c (vfs_mkstemps): New function - create temporary file
...
with the name resembling the original, but safe for scripts.
* direntry.c (vfs_s_open): Use it.
(vfs_s_retrieve_file): Likewise.
* extfs.c (extfs_open): Likewise.
* sfs.c (sfs_redirect): Likewise.
2003-10-29 00:50:36 +00:00
Pavel Roskin
77bcdc8127
* vfs.c (mc_ungetlocalcopy): Free local path here, not in class
...
implementations.
* vfs.h (struct vfs_s_class): Constify "local" argument for
ungetlocalcopy. Adjust all implementations.
2003-10-28 21:52:06 +00:00
Pavel Roskin
bb184c9c8b
Typo in the last commit.
2003-10-28 08:47:04 +00:00
Pavel Roskin
67cd859ea3
* direntry.c (vfs_s_init_class): Use our getlocalcopy for remote
...
filesystems that cache files, not for archives.
(vfs_s_getlocalcopy): Corresponding changes.
2003-10-28 08:20:30 +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
520f6ddb6c
* vfs.c (mc_def_getlocalcopy): Use O_LINEAR when retrieving the
...
remote file. This avoids an extra temporary file.
2003-10-27 21:55:06 +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
ad670bade6
* direntry.c (vfs_s_find_entry_tree): Eliminate buffer of fixed
...
size. Don't prepare path for vfs_s_resolve_symlink().
(vfs_s_resolve_symlink): Remove unused argument "path".
2003-10-27 02:54:59 +00:00
Pavel Roskin
cc09ee51f1
Typo fixes.
2003-10-27 01:55:50 +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
24384e9a89
* panel.h: Fix duplication between cpanel and current_panel in
...
favor of current_panel. Ditto opanel and other_panel.
2003-10-26 06:45:59 +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
2c458dcc52
Don't include vfs.h.
2003-10-26 03:40:23 +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
a828849d50
* vfs.h: Remove redundant declaration of init_localfs().
2003-10-26 01:51:28 +00:00
Pavel Roskin
5a0b2b0806
* mcserv.c: Don't use HAVE_CRYPT from extraonf.h.
...
* samba/include/includes.h: Likewise.
2003-10-25 22:37:08 +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
be3fa535ba
* ftpfs.c: Remove the rest of source routing code.
...
* xdirentry.h: Likewise.
2003-10-24 20:08:38 +00:00
Pavel Roskin
79d3e0a85f
* ftpfs.c (setup_source_route): Remove. It's a badly
...
implemented hack that was never enabled.
2003-10-24 19:03:27 +00:00
Pavel Roskin
274a5a1c41
* direntry.c (vfs_s_find_entry_tree): Canonicalize path.
2003-10-17 03:25:43 +00:00
Pavel Roskin
e09739368e
* direntry.c (vfs_s_resolve_symlink): Don't use buffers of fixed
...
size. This fixes a security hole. Always start from the root.
Remove broken code for making symlinks relative.
(vfs_s_find_entry_tree): Protect against long path, since this
function uses a buffer of fixed size.
(vfs_s_fullpath): Implement support for archives (real trees).
2003-10-16 23:58:43 +00:00
Pavel Roskin
3b2e731d3d
* vfs.c (mc_open): Fix rare memory leak on failure.
2003-10-16 20:46:08 +00:00
Pavel Roskin
7c4fc715da
* direntry.c (vfs_s_setctl): Implement VFS_SETCTL_FLUSH.
...
* ftpfs.c: Remove ftpfs_flushdir. Use MEDATA->flush.
* fish.c: Use MEDATA->flush.
2003-10-16 18:51:41 +00:00
Pavel Roskin
e9ffcceae5
* direntry.c (vfs_s_setctl): Add support to VFS_SETCTL_LOGFILE.
...
* ftpfs.c (ftpfs_set_debug): Remove.
2003-10-16 17:08:38 +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
52844a3092
* vfs.h: Rename commands for mc_ctl() and mc_setctl() to make it
...
clear which function they are used with.
* vfs.c (mc_ctl): Change last argument to (void*).
(mc_set): Likewise.
Adjust all dependencies.
2003-10-16 16:12:19 +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
1504215498
More comment fixes.
2003-10-16 08:00:05 +00:00
Pavel Roskin
a8a471a282
Comment changes.
2003-10-16 06:50:05 +00:00
Pavel Roskin
dcd2b9e8fc
* xdirentry.h: Fix typos in field names.
2003-10-16 06:05:39 +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
b7efdfa380
* xdirentry.h: Remove magic numbers. Move some constants ...
...
* ftpfs.c: ... here.
2003-10-16 05:06:24 +00:00
Pavel Roskin
26ce05dfa3
* samba/lib/doscalls.c: Remove. Remove all references to it.
2003-10-15 07:32:45 +00:00
Pavel Roskin
426c1836d5
* vfs.h: Remove all references to seekdir and telldir. Adjust
...
all dependencies.
2003-10-14 22:24:26 +00:00
Pavel Roskin
600891d8d5
* vfs.c (_vfs_add_noncurrent_stamps): Fix incorrect casts.
2003-10-13 06:56:31 +00:00
Pavel Roskin
72c64a60e2
* extfs.c: Switch to self-registration.
...
* mcfs.c: Likewise.
* sfs.c: Likewise.
* smbfs.c: Likewise.
* undelfs.c: Likewise.
* vfs.s (_vfs_add_noncurrent_stamps): Temporary disable code
that uses vfs_extfs_ops.
(vfs_file_is_smb): Remove.
2003-10-12 22:25:53 +00:00
Pavel Roskin
9a5c3dda9e
Restore lost ifdef.
2003-10-12 20:01:48 +00:00
Pavel Roskin
2e524d3cad
* local.c: Switch to self-registration.
...
* vfs.c: Cache localfs class for the use in vfs_get_class().
2003-10-12 19:57:27 +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
ce356e2ce0
Remove useless comment.
2003-10-12 00:26:43 +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
4b1ec7399b
* vfs.c (vfs_setup_wd): Initialize current_vfs here, not
...
globally.
(vfs_type_from_op): Rename to vfs_prefix_to_class(), avoid using
vfs_local_fs.
(vfs_strip_suffix_from_filename): Don't use vfs_local_fs.
2003-10-11 22:17:52 +00:00
Pavel Roskin
4de9d4d10e
* vfs.h (ftpfs_hint_reread): Remove, it's unused.
2003-10-11 20:58:22 +00:00