Commit Graph

270 Commits

Author SHA1 Message Date
Andrew Tridgell
e1b3d5c4be set network file descriptors non-blocking before starting main rsync
algorithm.
1998-06-18 09:34:56 +00:00
Andrew Tridgell
fc8a6b9705 added some fflush() calls to make sure the statistics lines are
printed when redirecting output to a file.
1998-06-02 12:46:46 +00:00
Andrew Tridgell
a800434a82 added --stats option for verbose stats on the file transfer 1998-06-01 03:42:14 +00:00
Andrew Tridgell
5243c216d6 replaced chdir and getcwd calls with push_dir/pop_dir functions. These
are faster and don't cause problems in a chrooted environment on any
systems.
1998-05-29 14:36:39 +00:00
Andrew Tridgell
4c36ddbeec heaps of cleanup in the io code.
we no longer use non-blocking IO, instead it uses select a lot more,
being careful to always allow for reading whenever a valid read fd is
available and chcking timeouts.

also split the file io calls into fileio.c
1998-05-27 12:37:22 +00:00
Andrew Tridgell
1ff5450d31 formatting changes 1998-05-26 14:17:27 +00:00
Andrew Tridgell
ba5e128d23 fixed a bug in the glob expansion code (pointed out by
hazard.bsn@blkseanet.net.eu.org)
1998-05-18 14:00:24 +00:00
Andrew Tridgell
e08c961083 handle rsh clients that don't like half-open connections 1998-05-18 09:34:33 +00:00
Andrew Tridgell
8d9dc9f99d this is a large commit which adds io multiplexing, thus giving error
messages from the server when using the socket code.

I've doen a fair bit of testing and I don't seem to have broken
anything, but it is a very complex change. More testing needed!
1998-05-18 08:20:26 +00:00
Andrew Tridgell
593fde2d3b if f_in == f_out then don't close one of them 1998-05-17 15:18:25 +00:00
Andrew Tridgell
22d6234e04 close some unnecessary file descriptors in do_recv() 1998-05-17 07:22:53 +00:00
Andrew Tridgell
08ac228fbd moved usage mesage after am_daemon test (I'd broken daemon mode) 1998-05-17 03:51:41 +00:00
Andrew Tridgell
6c29af2251 close the other half of the pipe in do_recv(). This fixes the problem
where a rsync receive process could hang around after the connection
has gone away if a fatal error occurs (such as someone killing the
other end)
1998-05-17 01:24:16 +00:00
Andrew Tridgell
6c00346849 check for right number of arguments _after_ the option parsing.
this stops "rsync -v" causing a segv.
1998-05-16 15:18:07 +00:00
Andrew Tridgell
d186eb1a56 - print the stats at the right place when uploading in the rsync
daemon
- update spec file
1998-05-16 05:24:40 +00:00
Andrew Tridgell
7b372642ec - distinguish downloads and uploads in the syslog messages
- add stats on uploads in syslog
1998-05-16 03:03:57 +00:00
Andrew Tridgell
e42c9458c2 use strlcat() strlcpy() and slprintf() whenever possible to avoid any
chance of a buffer overflow
1998-05-15 09:26:01 +00:00
Andrew Tridgell
248fbb8c23 syslog some stats 1998-05-14 04:49:30 +00:00
Andrew Tridgell
874895d51a added globbing support in the rsync daemon. This will allow you to
specify wildcards when grabbing files from a anon rsync daemon.
1998-05-13 15:44:04 +00:00
Andrew Tridgell
df5e03da7b check argc and show usage if no args 1998-05-13 07:04:40 +00:00
Andrew Tridgell
d7ff63cf1a the statistics reporting was the wrong way around for client receipt
mode! It reported the read/written backwards.
1998-05-10 13:01:59 +00:00
Andrew Tridgell
ff8b29b8c6 use syslog instead of /var/adm/rsyncd.log 1998-05-10 08:24:38 +00:00
Andrew Tridgell
7a6421fa76 split the options parsing code into options.c
added the --port and --config options

use strlcpy() instead of strncpy()

some cleanups and formatting changes
1998-05-10 07:25:40 +00:00
Andrew Tridgell
3591c0660c cleanup code a bit 1998-05-10 01:46:06 +00:00
Andrew Tridgell
f0fca04e4e first vesrion of working socket based rsync. It still needs a lot of
work, but at least it works :-)
1998-05-09 13:58:54 +00:00
Andrew Tridgell
9486289ce4 some large systematic changes to make socket conversion easier. The
biggest one is the use of rprintf() instead of fprintf()
1998-05-07 14:50:22 +00:00
Andrew Tridgell
5d6bcd4472 some code cleanup in preparation for a cleaner client/server split 1998-05-07 12:30:47 +00:00
Andrew Tridgell
efb2f6bf62 use floating point for printout of stats - this wrks on machines
without long long but with a 64 bit off_t
1998-05-06 06:07:06 +00:00
Andrew Tridgell
bcacc18bdf added support for 64 bit file offsets under Solaris 2.6. Not tested
yet.
1998-05-06 05:43:36 +00:00
Andrew Tridgell
317302412e not quite so many decimal places in "speedup" :-) 1998-04-13 04:44:49 +00:00
Andrew Tridgell
1b2d733af2 a couple more system calls wrapped in syscall.c 1998-04-05 06:26:24 +00:00
Andrew Tridgell
366345fe05 in local->local mode don't use exec to start the "remote" rsync,
instead just fork()
1998-04-05 06:07:37 +00:00
Andrew Tridgell
6ba9279fb2 - added an internal io_error flag. Whenever an io error occurs (such
as not being able to open a directory) this flag is set and propogated
to the other end. When this flag is set the --delete code is
disabled. This prevents the problem that io or permission errors could
cause files to be incorrectly deleted on the destination.

- added a --timeout option. This allows you to set an IO timeout in
seconds. If no io occurs in that time then rsync exits with a timeout
error.

- changed some FERROR fds to FINFO
1998-03-26 04:18:47 +00:00
Andrew Tridgell
71c4617611 - on systems (such as intel linux) where off_t is 32 bits but "long long"
is 64 bits use long long to get the totals right when transferring
  more than 2^32 bytes of data.

- use inline on flist_up if the compiler supports it
1998-03-25 11:08:32 +00:00
Andrew Tridgell
3cb6f5d6cb added a --force option.
This options tells rsync to delete directories even if they are not
empty. This applies to both the --delete option and to cases where
rsync tries to copy a normal file but the destination contains a
directory of the same name. Normally rsync will refuse to do a
recursive directory deletion in such cases, by using --force the
recursive deletion will be done.
1998-03-25 06:05:47 +00:00
Andrew Tridgell
76076c4bbd fixed the problem where you couldn't specify multiple remote
filenames. The fix will need some testing.
1998-03-25 00:40:47 +00:00
Andrew Tridgell
0d0e2e93e8 test for "long long" and %lld in configure. 1998-03-23 14:46:03 +00:00
Andrew Tridgell
3a6a366fc5 finished 64 bit file offset support. Hopefully rsync can now transfer
files up to 2^64 bytes in size. Now I just need to find enough disk
space to test this :-)

The 64 bit offset code only works if off_t is 64 bits (or bigger!) on
both ends of the link. If one end tries to send a file greater than
2^31 in size and the other end doesn't support it then rsync will
abort.

This commit also cleans up some static declarations so they are in a
unitinitialised segment to save load time.
1998-03-23 12:52:57 +00:00
Andrew Tridgell
3ba62a8308 - keep a list of pids and send them a SIGUSR1 for cleanup rather than
using setpgrp()

- adapt the block size for really large files to reduce the checksum
  size and memory overheads
1998-03-23 04:44:44 +00:00
Andrew Tridgell
950ab32d38 *** empty log message *** 1998-01-13 18:35:10 +00:00
Andrew Tridgell
f6c347425a *** empty log message *** 1998-01-13 15:57:26 +00:00
Andrew Tridgell
dc7a947853 fixed the --suffix option. It wasn't being propogated to the remote
end in the server_options() function.
1997-12-30 10:54:47 +00:00
Andrew Tridgell
e3cd198f8e - fixed spelling errors in man page
- fixed bug in hard link handling that could lead to spurious hard
links.
- fixed bug in the string handling in flist.c
1997-12-28 22:13:40 +00:00
Andrew Tridgell
82306bf6d6 *** empty log message *** 1997-12-17 11:07:17 +00:00
Andrew Tridgell
cbbe489208 handle things more grecefully when one machine supports hard links and
the other doesn't or one machine supports soft links and the other
doesn't.
1997-12-16 23:09:22 +00:00
Andrew Tridgell
6dd1782c42 - check for setlinebuf() in autoconf. Apparently HPUX doesn't have it
- use @exec_prefix@ and @prefix@ in more useful ways in Makefile.in
1997-12-16 22:39:55 +00:00
Andrew Tridgell
7c59690640 process directory permissions and times ater hard links becuase the
hard link processing can modify the directory times
1997-12-15 22:23:30 +00:00
Andrew Tridgell
aa7ed20141 setup line buffering for debug messages 1997-12-15 17:46:58 +00:00
Andrew Tridgell
6574b4f7d9 added a --relative (== -R) option. This is what Anthony Thyssen
suggested on the list recently. See the man page entry for details but
basically it changes the behaviour so that paths are not stripped,
thus allowing you to specify a single rsync command to sync lots of
directories/files while preserving the full path name of each file.
also fixed a bug in the handling of umasks when both the source and
destination machines are local. We need to reset the umask before the
exec to ensure that the child gets a correct umask.
1997-12-15 14:43:27 +00:00
Paul Mackerras
774ef68f00 minor bugfixes 1997-04-11 06:18:02 +00:00