Commit Graph

593 Commits

Author SHA1 Message Date
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
6f3a7c8029 * direntry.c (vfs_s_open): Don't pass O_LINEAR to open() -
this flag is for VFS only, and causes side effects in Cygwin.
* extfs.c (extfs_open): Likewise.
* sfs.c (sfs_open): Likewise.
Reported by Pavel Tsekov <ptsekov@gmx.net>
2002-07-10 17:56:27 +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
6ecbdd05ab * extfs.c (extfs_fill_names): Generate filename#vfsname/dir
instead of #vfsname/filename/dir.  Use PATH_SEP_STR.
2002-07-03 15:54:01 +00:00
Pavel Roskin
694468d9bb * sfs.c (sfs_free): Fix memory leak.
(sfs_init): Use PATH_SEP_STR.
2002-07-03 15:27:36 +00:00
Pavel Roskin
3738d4cee0 * cpio.c (cpio_open_cpio_file): Fix type initialization.
From Andrew V. Samoilov <kai@cmail.ru>
2002-07-03 13:10:01 +00:00
Pavel Roskin
23ef3d3a9d * Makefile.am: Add samba to SUBDIRS. Forcedly set DISTDIRS to
extfs.  Remove parts that are now handled by samba/Makefile.
* samba/Makefile.in: Add more empty targets for Automake
compatibility.
2002-07-02 23:10:15 +00:00
Pavel Roskin
7f6c3c3bb6 is_gunzipable() -> get_compression_type() 2002-07-02 21:12:10 +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
Pavel Roskin
5389b39585 * vfs.c: Add protection against NULL strings to all is_*() functions. 2002-06-25 21:51:37 +00:00
Andrew V. Samoilov
8583c24ea4 * samba/lib/system.c (sys_ftruncate): Commented out.
* samba/lib/util.c (set_filelen): Likewise.
(setbuffer): Likewise.

* Makefile.am (SAMBA_DIST): Remove tests/ftruncate.c
* samba/tests/ftruncate.c: Removed.
* samba/configure.in: Don't check if ftruncate() can
extend a file.
2002-06-21 16:31:20 +00:00
Andrew V. Samoilov
6b843b1b44 * samba/configure.in: Don't check if ftruncate() can extend a file. 2002-06-21 16:28:45 +00:00
Andrew V. Samoilov
3663bff65f * Makefile.am (SAMBA_DIST): Remove tests/ftruncate.c
* samba/tests/ftruncate.c: Removed.
* samba/configure.in: Don't check if ftruncate() can
extend a file.
2002-06-21 16:25:02 +00:00
Andrew V. Samoilov
d3aceae9f7 * samba/lib/system.c (sys_ftruncate): Commented out.
* samba/lib/util.c (set_filelen): Likewise.
(setbuffer): Likewise.
2002-06-21 16:01:53 +00:00
Andrew V. Samoilov
dabc54bbcd * smbfs.c: Undefine PACKAGE_BUGREPORT, PACKAGE_NAME,
PACKAGE_STRING, PACKAGE_TARNAME and PACKAGE_VERSION
before including "samba/include/config.h" to prevent warnings.
(smbfs_init): Set DEBUGLEVEL to 0.
(do_connect): Rename to ...
(smbfs_do_connect): ... this to avoid namespace clash and
make static.  Make server const. Adjust all callers.
(smbfs_add_dots): Remove.
(smbfs_stat): Remove code duplication.
(smbfs_lstat): Define as smbfs_stat.
2002-06-21 12:26:45 +00:00
Andrew V. Samoilov
1d9879b0be Fix offset calculation for symbolic links. 2002-06-06 15:16:29 +00:00
Andrew V. Samoilov
64b2eb4db3 * cpio.c (cpio_read_oldc_head): Use char[] for buf instead
of char*[].  Remove unneeded casts.  Fix error message.
(cpio_create_entry): G_free name.
2002-06-06 12:42:23 +00:00
Andrew V. Samoilov
14ed580196 * cpio.c (cpio_read_oldc_head): Use char[] for buf instead
of char*[].  Remove unneeded casts.  Fix error message.
(cpio_create_entry): G_free name.
2002-06-06 10:54:35 +00:00
Pavel Roskin
272cf8fd96 * Makefile.am (mcserv_SOURCES): Remove $(top_srcdir)/src/mad.c,
it breaks "make distcheck".
2002-05-22 17:26:56 +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
Pavel Roskin
19121d3c08 * Makefile.am: Set samba_libsamba_a_SOURCES to an empty value
to override the default.
2002-05-22 16:12:55 +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
12ba0fc8a4 * direntry.c (vfs_s_retrieve_file): Please, care about
fish.local_stat ...
* fish.c (linear_close): ... here.
2002-05-21 17:27:30 +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
2b3c6b8f0b * fish.c (fish_fh_open): Don't retrieve file if it is
opened for writting only.
2002-05-21 10:50:55 +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
05a0bd1240 * samba/include/includes.h: Eliminate all references to
HAVE_LIBREADLINE.
2002-05-17 11:38:05 +00:00
Andrew V. Samoilov
a844c07aac * direntry.c (vfs_s_read): Move MEDATA->linear_start() ...
* (vfs_s_open): ... here.
2002-05-17 07:08:03 +00:00
Andrew V. Samoilov
ae8e84d163 * Makefile.am (noinst_LIBRARIES): Add samba/libsamba.a
if USE_SAMBA_FS is true.
* (libvfs-mc.a): Don't merge object files with libsamba.a.
2002-05-14 12:41:04 +00:00
Andrew V. Samoilov
baf5611b51 * vfs.c (MC_RENAMEOP): Make arguments const.
* vfs.h (mc_rename): Adjust declaration.
* (mc_link): Likewise.
2002-05-13 15:39:22 +00:00
Andrew V. Samoilov
2a0dde7539 * Makefile.am (mcserv_SOURCES): Add $(top_srcdir)/src/mad.c. 2002-05-13 15:17:38 +00:00
Andrew V. Samoilov
1f557447b9 Don't check setreuid, setregid, setegid and setluid. 2002-05-11 12:12:53 +00:00
Andrew V. Samoilov
f2912b052c * samba/configure.in: Add AC_SYS_LARGEFILE.
Don't check atexit.
2002-05-11 12:03:05 +00:00
Pavel Roskin
1c61b5e0ca * samba/acconfig.h: Remove.
* Makefile.am: Remove references to samba/acconfig.h.
* samba/Makefile.in: Likewise.
* samba/aclocal.m4: Remove unused test AC_DIRENT_D_OFF.
* samba/configure.in: Add descriptions to AC_DEFINE calls.
Remove unused tests.
* samba/include/includes.h: Cleanup for the symbols that
samba/configure.in doesn't define.
* samba/lib/netmask.c: Likewise.
2002-05-01 03:17:56 +00:00
Pavel Roskin
f37f1f90f8 * samba/include/includes.h: Eliminate all references to
HAVE_EXPLICIT_LARGEFILE_SUPPORT.
* samba/lib/system.c: Likewise.
2002-05-01 02:07:37 +00:00
Andrew V. Samoilov
25f700675f Removed. 2002-04-24 08:23:13 +00:00
Andrew V. Samoilov
bef57252f4 * vfs.c (vfs_print_stats): s/transfered/transferred/ 2002-04-24 08:11:07 +00:00
Andrew V. Samoilov
f7c7879add * samba/lib/signal.c: Remove.
* samba/lib/debug.c (sig_usr2): Commented out.
(sig_usr1): Likewise.
* samba/lib/util_file.c (gotalarm): Commented out.
(gotalarm_sig): Likewise.
(do_file_lock): Likewise.
(file_lock): Likewise.
(file_unlock): Likewise.
(startfilepwent): Likewise.
(endfilepwent): Likewise.

* samba/Makefile.in (SAMBAFILES): Remove lib/signal.o.
* Makefile.am (SAMBA_DIST): Remove lib/signal.c.
2002-04-24 08:07:56 +00:00
Andrew V. Samoilov
a0ae265bbc * vfs.c (vfs_init) [!WITH_MCFS]: Don't register mcfs. 2002-04-19 07:25:32 +00:00
Pavel Roskin
1908a816e5 * extfs/trpm: update to work with rpm 4.x.
Reported by m.lusini@palazzochigi.it
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=62306
2002-04-12 16:27:59 +00:00
Andrew V. Samoilov
291ab2422f * cpio.c (cpio_skip_padding): Handle old ASCII format. 2002-04-12 13:16:00 +00:00
Andrew V. Samoilov
7df53e2bd2 * direntry.c (vfs_s_resolve_symlink): Comment out buggy code.
(vfs_s_retrieve_file): Set fh->handle to -1.
(vfs_s_read): Don't manipulate with FH->handle if it is -1.
(vfs_s_write): Likewise.
(vfs_s_close): Likewise.
2002-03-06 08:46:35 +00:00
Andrew V. Samoilov
0924daa8f5 * samba/lib/debug.c: Remove syslog support. 2002-02-27 14:17:45 +00:00
Pavel Roskin
eb18605ecc * Makefile.am: Don't compile mcserv if VFS is disabled.
* extfs/Makefile.am: Don't install anything if VFS is disabled.
2002-02-20 03:07:42 +00:00
Pavel Roskin
4408c4e091 * extfs.c (extfs_open): Only create a new entry if it has not
been found and O_CREAT is set.  Consider file as changed only
if it has been successfully created.
(extfs_getlocalcopy): Open file only for reading.  This prevents
marking file as changed.  Actually use the has_changed argument.
Reported by Nerijus Baliunas <nerijus@users.sourceforge.net>
2002-02-19 21:32:24 +00:00
Pavel Roskin
ceef847ec4 * extfs/lslR.in: Fix parsing of old entries (with year number).
From Daniel Skarda <0rfelyus@atrey.karlin.mff.cuni.cz>
2002-02-12 17:47:27 +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