Andrew V. Samoilov
b93ffeaa80
Security fix patch. Fix insecure temporary file and directory creations. (CAN-2004-0231).
2004-08-17 08:24:59 +00:00
Andrew V. Samoilov
e9be8219a0
* sfs.c (sfs_init): Fix possible buffer overflows for invalid sfs.ini.
2004-08-14 10:56:09 +00:00
Andrew V. Samoilov
5b290ada65
* extfs.c (extfs_init): Fix possible off-by-one buffer underflow
...
for empty lines in extfs.ini.
2004-08-14 10:51:00 +00:00
Andrew V. Samoilov
622e6a368e
Fix missed name_status() function name.
2004-08-09 14:09:52 +00:00
Pavel Roskin
8ab694ba2d
* tar.c: Eliminate struct hstat, use stack arguments instead.
2004-06-14 16:04:07 +00:00
Andrew V. Samoilov
b55db9788b
* samba/lib/debug.c (Debug1): Don't try to open/create logfile if debugf is empty string.
2004-03-07 06:40:28 +00:00
Andrew V. Samoilov
722f4e684a
* utilvfs.c (vfs_parse_ls_lga): Handle device without whitespace(s)
...
between major and minor.
2004-03-07 06:17:12 +00:00
Andrew V. Samoilov
02db8a9660
* direntry.c (vfs_s_resolve_symlink): Check vfs_s_fullpath()
...
return value to avoid NULL dereference.
Reported by wwp <subscript@free.fr>.
2004-03-07 06:12:49 +00:00
Andrew V. Samoilov
2f7bbc2c31
* vfs.c (mc_def_ungetlocalcopy): Fix missed "%s".
...
* utilvfs.c (vfs_parse_ls_lga): Likewise.
2004-03-07 06:07:43 +00:00
Pavel Roskin
05e6a61834
* smbfs.c (smbfs_reconnect): Revert changes in a translated
...
message.
2004-01-28 00:01:30 +00:00
Pavel Roskin
79b4c398de
* extfs/rpm: Workaround for spaces and single quotes in the path
...
name.
2004-01-24 00:48:46 +00:00
Pavel Roskin
a8261b28d6
* mcserv.c: Use HAVE_CRYPT instead of USE_CRYPT. Remove
...
references to HAVE_LIBCRYPT and HAVE_LIBCRYPT_I. Reported by
Christian Laubscher <christian.laubscher@tiscalinet.ch>
2004-01-22 08:44:20 +00:00
Pavel Roskin
8db3838b57
* samba/configure.in: Rename to ...
...
* samba/configure.ac: ... this. Adjust dependencies.
2004-01-22 06:30:30 +00:00
Pavel Roskin
fe12438ed6
* fish.c (fish_open_archive_int): Save some stack and place -C
...
flag before host.
2003-12-06 04:24:56 +00:00
Pavel Roskin
e9827066d1
* undelfs.c: Use ext2fs/ext2_fs.h instead of linux/ext2_fs.h
...
when possible.
2003-11-28 06:20:57 +00:00
Pavel Roskin
fc9bf6040f
* gc.c (vfs_ncs_getid): Merge with vfs_getid().
2003-11-26 21:25:30 +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
8ed2cc4594
* direntry.c (vfs_s_resolve_symlink): Eliminate
...
g_strdup_printf().
(vfs_s_fullpath): Likewise.
2003-11-24 20:30:30 +00:00
Pavel Roskin
ffb686bfa9
* ftpfs.c (ftpfs_login_server): Explicit password should have
...
priority over the netrc password and the anonymous password.
Reported by Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>
2003-11-21 06:57:37 +00:00
Pavel Roskin
3ba446981a
Typo fix.
2003-11-20 18:40:11 +00:00
Pavel Roskin
2eeab44b93
* undelfs.c (undelfs_loaddel): Use g_try_malloc()/g_try_relloc()
...
since we want to recover and not abort the program if we don't
have enough memory.
(com_err): Fix implementation.
2003-11-14 21:36:35 +00:00
Pavel Roskin
8147825da3
Typo fixes from Andrew.
2003-11-14 16:55:35 +00:00
Pavel Roskin
54b8c9aaad
* vfs.c (vfs_split): Deconstify.
...
* direntry.c (vfs_s_get_path_mangle): Likewise. "mangle" is in
the name for a reason. Use vfs_s_get_path() instead where the
path should be preserved.
* extfs.c (extfs_get_path_mangle): Likewise.
* sfs.c (sfs_vfmake): Protect against changes in vfs_split().
2003-11-14 08:25:50 +00:00
Pavel Roskin
30c4bd1b6d
* vfs.h: Constify chdir() and opendir() methods. Adjust all
...
dependencies.
* vfs.c (mc_chdir): Constify, eliminate protection against
broken implementations of chdir() method.
(mc_opendir): Constify.
2003-11-13 08:29:37 +00:00
Pavel Roskin
4b5a2a0b62
* direntry.c (vfs_s_stamp_me): Generalize and move ...
...
* gc.c (vfs_stamp_create): ... here. Use whenever possible.
2003-11-13 08:03:03 +00:00
Pavel Roskin
de12104436
* gc.c: Use NULL instead of -1 for empty vfsid. Adjust all
...
dependencies.
* undelfs.c (undelfs_get_path): Don't shadow static ext2_fname.
(undelfs_getid): Likewise. Use fs for non-empty vfsid.
2003-11-12 23:00:16 +00:00
Pavel Roskin
d2e2f5c544
* cpio.c (cpio_create_entry): Fix possible buffer underflow
...
and memory leak.
2003-11-12 17:10:48 +00:00
Pavel Roskin
4eab382dba
* gc.c: Make getid(), nothingisopen() and free() methods
...
optional. Eliminate trivial implementations.
(vfs_getid): New function - safe wrapper around getid(). Use
it everywhere.
(vfs_ncs_getid): Remove dead code, inprove readability.
2003-11-08 23:53:00 +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
106a90ae99
* vfs.c: Eliminate MC_OP. Reorder other MC_* macros for
...
readability.
2003-11-05 06:34:20 +00:00
Pavel Roskin
0318ed5d0b
* vfs.c: Move all parsing code, vfs_die() and vfs_get_password()
...
to utilvfs.c, vfs_print_stats() to direntry.c.
* utilvfs.c (vfs_parse_ls_lga): Disable caching current date,
it's done incorrectly.
2003-11-05 06:08:16 +00:00
Pavel Roskin
c468c1b6e9
* vfs.c: Allocate handles dynamically.
...
(get_bucket): Rewrite as vfs_new_handle().
(vfs_op): Make a function.
(vfs_info): Likewise.
(vfs_free_bucket): Replace with vfs_free_handle().
(mc_readdir): Expand, eliminate MC_DIROP.
2003-11-05 00:12:25 +00:00
Pavel Roskin
f613c51eb5
* HACKING: New file - technical documentation for VFS.
...
* Makefile.am: Distribute it.
2003-10-30 06:00:41 +00:00
Pavel Roskin
24dd87b714
* vfs.c (vfs_rmstamp): Rescan the tree after the parents have
...
been removed. Otherwise using old data causes data corruption
in some combinations (e.g. extfs inside tatfs).
2003-10-30 05:58:06 +00:00
Pavel Roskin
cb2aaf4c16
* extfs.c: Remove current_dir field, its role was purely
...
decorative. Rename names starting with underscore.
2003-10-29 23:16:31 +00:00
Pavel Roskin
f2550b08ee
* extfs.h: Merge ...
...
* extfs.c: ... here.
* Makefile.am: Remove extfs.h.
2003-10-29 23:05:27 +00:00
Pavel Roskin
cea13079c3
* ftpfs.c: Use HAVE_STRUCT_LINGER_L_LINGER instead of
...
HAVE_STRUCT_LINGER.
2003-10-29 17:23:35 +00:00
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
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