rsync.git
25 years agofixed the relative paths bug pointed out by Alberto Accomazzi
Andrew Tridgell [Thu, 23 Jul 1998 03:09:14 +0000 (03:09 +0000)]
fixed the relative paths bug pointed out by Alberto Accomazzi

25 years agopreparing for release of 2.1.0 v2.1.0
rsync-bugs [Mon, 20 Jul 1998 05:43:51 +0000 (05:43 +0000)]
preparing for release of 2.1.0

25 years agoI think I might havefinally fixed the rsync hanging bug. It was caused
Andrew Tridgell [Mon, 20 Jul 1998 05:36:25 +0000 (05:36 +0000)]
I think I might havefinally fixed the rsync hanging bug. It was caused
by a read during an io_flush() triggered during a readfd(). A simple
logic bug in the io code :(

25 years agoalways use a timeout to select, even if --timeout is not
Andrew Tridgell [Sun, 19 Jul 1998 10:51:26 +0000 (10:51 +0000)]
always use a timeout to select, even if --timeout is not
specified. This makes things easier to debug.

25 years ago- defer the error message from the options parsing until after the
Andrew Tridgell [Sun, 19 Jul 1998 05:22:05 +0000 (05:22 +0000)]
- defer the error message from the options parsing until after the
socket is multiplexed. This allows clients sending new options which
the remote server doesn't understand to get a sensible error message.

25 years ago- close stdout and stderr and reopen then as /dev/null when running as
Andrew Tridgell [Sun, 19 Jul 1998 04:50:48 +0000 (04:50 +0000)]
- close stdout and stderr and reopen then as /dev/null when running as
a daemon. This prevents library functions (such as getopt) stuffing up
our protocol stream when errors are detected.

- defer the error message from the options parsing until after the
socket is multiplexed. This allows clients sending new options which
the remote server doesn't understand to get a sensible error message.

25 years agopreparing for release of 2.0.19 v2.0.19
rsync-bugs [Fri, 17 Jul 1998 14:53:00 +0000 (14:53 +0000)]
preparing for release of 2.0.19

25 years agohandle hard links on systems with 16 bit ino_t
Andrew Tridgell [Fri, 17 Jul 1998 14:42:59 +0000 (14:42 +0000)]
handle hard links on systems with 16 bit ino_t

25 years agoadded a bit in the man page about the clean shell error
Andrew Tridgell [Fri, 17 Jul 1998 14:25:14 +0000 (14:25 +0000)]
added a bit in the man page about the clean shell error

25 years agocheck whether there is a / before a : in the rsync command line. If
Andrew Tridgell [Fri, 17 Jul 1998 14:05:57 +0000 (14:05 +0000)]
check whether there is a / before a : in the rsync command line. If
there is then assume that the : is from a filename, not a host:dir
separator. This allows you to copy files with a : in them. (suggestion
from pfeifer@wait.de)

25 years agomake rsync behave more like GNU cp with regard to file permissions
Andrew Tridgell [Fri, 17 Jul 1998 13:18:32 +0000 (13:18 +0000)]
make rsync behave more like GNU cp with regard to file permissions
when -p (preserve permissions) isn't set.

It works by taking the sending file permissions and masking them with
the umask to create the destination file permissions. (There is really
no "correct" way of doing this but at least we now behave like GNU cp
which fits the principle of least surprise.)

also fixed a race condition in copy_file()

25 years agoadded the --safe-links option to disallow symlinks outside the
Andrew Tridgell [Fri, 17 Jul 1998 10:00:48 +0000 (10:00 +0000)]
added the --safe-links option to disallow symlinks outside the
destination tree

25 years agoadded the --safe-links option to disallow symlinks outside the
Andrew Tridgell [Fri, 17 Jul 1998 10:00:43 +0000 (10:00 +0000)]
added the --safe-links option to disallow symlinks outside the
destination tree

25 years agosome code reformatting
Andrew Tridgell [Fri, 17 Jul 1998 07:42:04 +0000 (07:42 +0000)]
some code reformatting

25 years agoremoved old "make dist" target
Andrew Tridgell [Fri, 17 Jul 1998 07:26:08 +0000 (07:26 +0000)]
removed old "make dist" target

25 years agochanged wording of an error message
Andrew Tridgell [Fri, 17 Jul 1998 07:25:42 +0000 (07:25 +0000)]
changed wording of an error message

25 years agomoved getopt.h above unistd.h to prevent problems with uwin on NT
Andrew Tridgell [Fri, 17 Jul 1998 07:17:11 +0000 (07:17 +0000)]
moved getopt.h above unistd.h to prevent problems with uwin on NT

25 years agofixed a problem with rsync buffering the debug output when redirected
Andrew Tridgell [Fri, 17 Jul 1998 07:07:23 +0000 (07:07 +0000)]
fixed a problem with rsync buffering the debug output when redirected
to a file.

25 years agomake a function static
Andrew Tridgell [Fri, 17 Jul 1998 05:38:51 +0000 (05:38 +0000)]
make a function static

25 years agoremove a useless debug message
Andrew Tridgell [Fri, 17 Jul 1998 05:38:21 +0000 (05:38 +0000)]
remove a useless debug message

25 years agocode style change
Andrew Tridgell [Fri, 17 Jul 1998 05:37:56 +0000 (05:37 +0000)]
code style change

25 years agouse error to detect lockfile open failures vs. max connections reached
Andrew Tridgell [Fri, 17 Jul 1998 05:37:18 +0000 (05:37 +0000)]
use error to detect lockfile open failures vs. max connections reached
and report an appropriate error message

25 years ago- use explicit flushes instead of setlinebuf. I've had reports of
Andrew Tridgell [Thu, 2 Jul 1998 10:57:20 +0000 (10:57 +0000)]
- use explicit flushes instead of setlinebuf. I've had reports of
  verbose info not being line buffered to files.

- add a call to localtime() in open_log() in order to prime the C
  libraries timezone cache before the chroot(). This should fix the
  problem of rsyncd log entries being in GMT time.

25 years agoremove a redundent continue statement
Andrew Tridgell [Thu, 2 Jul 1998 03:02:14 +0000 (03:02 +0000)]
remove a redundent continue statement

25 years agoprioritise reading over writing in the select loop. (this is another
Andrew Tridgell [Thu, 2 Jul 1998 02:59:04 +0000 (02:59 +0000)]
prioritise reading over writing in the select loop. (this is another
ssh-friendly attempt)

25 years agofix the problem of --timeout waiting for twice the specified time.
Andrew Tridgell [Thu, 2 Jul 1998 02:48:09 +0000 (02:48 +0000)]
fix the problem of --timeout waiting for twice the specified time.

25 years ago- don't show "created directory" message unless verbose is selected
Andrew Tridgell [Thu, 2 Jul 1998 02:08:55 +0000 (02:08 +0000)]
- don't show "created directory" message unless verbose is selected

- check for null buf in show_progress

25 years agooutput progress % every 1k instead of every 1%, this is better for
Andrew Tridgell [Thu, 2 Jul 1998 01:28:39 +0000 (01:28 +0000)]
output progress % every 1k instead of every 1%, this is better for
large files.

25 years agothe recv_generator can be static
Andrew Tridgell [Thu, 2 Jul 1998 01:27:51 +0000 (01:27 +0000)]
the recv_generator can be static

25 years agoenable output buffering in the recv generator. This makes a
Andrew Tridgell [Thu, 2 Jul 1998 01:27:14 +0000 (01:27 +0000)]
enable output buffering in the recv generator. This makes a
significant difference when the transport is ssh as ssh will otherwise
output a complete frame for each checksum record, which increases the
checksum data in size by a factor of around 4.

25 years agodon't need to send --progress option to server as the server never
Andrew Tridgell [Thu, 2 Jul 1998 00:48:20 +0000 (00:48 +0000)]
don't need to send --progress option to server as the server never
prints progress info.

25 years agoadded --progress option which shows the progress of transfers. This
Andrew Tridgell [Thu, 2 Jul 1998 00:47:13 +0000 (00:47 +0000)]
added --progress option which shows the progress of transfers. This
gives bored users something to watch.

25 years ago- only keep a partial file if some literal data has been transferred,
Andrew Tridgell [Wed, 1 Jul 1998 11:03:50 +0000 (11:03 +0000)]
- only keep a partial file if some literal data has been transferred,
this prevents a second interrupted transfer from reducing the size of
the transferred file.

- set SIGUSR1 to SIG_IGN early to prevent a race condition that
prevents the --partial code from working properly

25 years agoI've had reports of rsyncd leaving zombies under digital unix. This
Andrew Tridgell [Wed, 1 Jul 1998 05:10:42 +0000 (05:10 +0000)]
I've had reports of rsyncd leaving zombies under digital unix. This
patch tries to address the problem in two ways:

1) reinstall the SIGCHLD handler before each fork
2) reap any children not caught by the handler using waitpid with
WNOHANG.

I expect this will fix the problem.

25 years agoadded a --partial option which tells rsync to keep partially
Andrew Tridgell [Wed, 1 Jul 1998 03:36:03 +0000 (03:36 +0000)]
added a --partial option which tells rsync to keep partially
transferred files if the transfer is interrupted.

added a "options summary" section to the man page

25 years agoif we get EWOULDBLOCK on a write then reduce the amount of data we are
Andrew Tridgell [Fri, 19 Jun 1998 00:55:19 +0000 (00:55 +0000)]
if we get EWOULDBLOCK on a write then reduce the amount of data we are
trying to write. This guarantees that the maximum amount of data that
can be written at any one time is written.

25 years agouse LDFLAGS in Makefile.in (fix from arndt@schoenewald.de)
Andrew Tridgell [Thu, 18 Jun 1998 14:15:16 +0000 (14:15 +0000)]
use LDFLAGS in Makefile.in (fix from arndt@schoenewald.de)

25 years agofixed chmod bug pointed out by Han Holl <jeholl@euronet.nl>
Andrew Tridgell [Thu, 18 Jun 1998 13:26:10 +0000 (13:26 +0000)]
fixed chmod bug pointed out by Han Holl <jeholl@euronet.nl>

25 years agopreparing for release of 2.0.18 v2.0.18
rsync-bugs [Thu, 18 Jun 1998 13:06:00 +0000 (13:06 +0000)]
preparing for release of 2.0.18

25 years agofixed a race condition in rsync that opened a security hole. The
Andrew Tridgell [Thu, 18 Jun 1998 12:17:23 +0000 (12:17 +0000)]
fixed a race condition in rsync that opened a security hole. The
temporary files were being created with the same permissions as the
original file. So if the file was setuid but not owned by the user
doing the transfer then there was a window of opportunity for a
malicious user to execute it with the wrong permissions while it was
being transferred.

Thanks to snabb@epipe.fi for pointing this out.

25 years agopreparing for release of 2.0.17 v2.0.17
rsync-bugs [Thu, 18 Jun 1998 10:30:48 +0000 (10:30 +0000)]
preparing for release of 2.0.17

25 years agoif as non-root we failed to update the group of a file then don't
Andrew Tridgell [Thu, 18 Jun 1998 10:03:44 +0000 (10:03 +0000)]
if as non-root we failed to update the group of a file then don't
print the file name.

25 years agofor consistency use memcpy/memset everywhere instead of bcopy/bzero
Andrew Tridgell [Thu, 18 Jun 1998 09:51:44 +0000 (09:51 +0000)]
for consistency use memcpy/memset everywhere instead of bcopy/bzero

25 years agomove include of compat.h after other includes.
Andrew Tridgell [Thu, 18 Jun 1998 09:37:21 +0000 (09:37 +0000)]
move include of compat.h after other includes.

25 years agochange the order of chmod and chown calls so that setuid bits don't
Andrew Tridgell [Thu, 18 Jun 1998 09:36:24 +0000 (09:36 +0000)]
change the order of chmod and chown calls so that setuid bits don't
get removed by chown calls.

25 years agoset network file descriptors non-blocking before starting main rsync
Andrew Tridgell [Thu, 18 Jun 1998 09:34:56 +0000 (09:34 +0000)]
set network file descriptors non-blocking before starting main rsync
algorithm.

25 years agohandle non-blocking file descriptors for both read and write. Add a
Andrew Tridgell [Thu, 18 Jun 1998 09:33:46 +0000 (09:33 +0000)]
handle non-blocking file descriptors for both read and write. Add a
workaround for buggy systems that say there is space to write when
there isn't.

25 years agoput set_nonblocking() code back in.
Andrew Tridgell [Thu, 18 Jun 1998 09:32:45 +0000 (09:32 +0000)]
put set_nonblocking() code back in.

25 years ago--help changes suggested by Francois
Andrew Tridgell [Thu, 18 Jun 1998 09:31:42 +0000 (09:31 +0000)]
--help changes suggested by Francois

25 years agomanpage updates, mostly suggested by Francois
Andrew Tridgell [Thu, 18 Jun 1998 09:30:51 +0000 (09:30 +0000)]
manpage updates, mostly suggested by Francois

25 years agothe tag table should be of type int* not tag*.
Andrew Tridgell [Wed, 3 Jun 1998 02:47:52 +0000 (02:47 +0000)]
the tag table should be of type int* not tag*.

This bug resulted in rsync being much less efficient that it could be
for files with more than 64k blocks. With the adaptive block size code
giving a maximum block size of 16k this means that files larger than
1GB were handled very inefficiently. The transfer was still accurate,
just slow.

25 years agoif the user passes a block size on the command line then don't adapt
Andrew Tridgell [Wed, 3 Jun 1998 02:35:51 +0000 (02:35 +0000)]
if the user passes a block size on the command line then don't adapt
the block size.

25 years agoadded note to docs saying that --stats doesn't work unless -v is used
Andrew Tridgell [Tue, 2 Jun 1998 12:50:23 +0000 (12:50 +0000)]
added note to docs saying that --stats doesn't work unless -v is used

25 years agoadded some fflush() calls to make sure the statistics lines are
Andrew Tridgell [Tue, 2 Jun 1998 12:46:46 +0000 (12:46 +0000)]
added some fflush() calls to make sure the statistics lines are
printed when redirecting output to a file.

25 years agopreparing for release of 2.0.16 v2.0.16
rsync-bugs [Mon, 1 Jun 1998 13:49:12 +0000 (13:49 +0000)]
preparing for release of 2.0.16

25 years agoadded some notes to test.sh
Andrew Tridgell [Mon, 1 Jun 1998 13:44:06 +0000 (13:44 +0000)]
added some notes to test.sh

25 years agoreplace calls to strcmp() with a u_strcmp() function that uses only
Andrew Tridgell [Mon, 1 Jun 1998 13:39:54 +0000 (13:39 +0000)]
replace calls to strcmp() with a u_strcmp() function that uses only
unsigned comparisons. Transferring files between two machines that
treated strcmp() differently led to the files being given the wrong
name at the destination if the filenames had characters > 128 (such as
Kanji characters) and the source and destination machines treated
strcmp() differently (ie. one treated strings as signed and the other
as unsigned).

We now treat all string comparisons for file list sorting as unsigned.

25 years agoupdated the usage info
Andrew Tridgell [Mon, 1 Jun 1998 10:38:24 +0000 (10:38 +0000)]
updated the usage info

25 years agoadded --stats option for verbose stats on the file transfer
Andrew Tridgell [Mon, 1 Jun 1998 03:42:14 +0000 (03:42 +0000)]
added --stats option for verbose stats on the file transfer

25 years agopreparing for release of 2.0.15 v2.0.15
rsync-bugs [Sat, 30 May 1998 02:10:18 +0000 (02:10 +0000)]
preparing for release of 2.0.15

25 years agoreplace BAD with zBAD so it compiles on AIX
Andrew Tridgell [Sat, 30 May 1998 02:07:36 +0000 (02:07 +0000)]
replace BAD with zBAD so it compiles on AIX

25 years agocosmetic fix.
Andrew Tridgell [Sat, 30 May 1998 02:03:29 +0000 (02:03 +0000)]
cosmetic fix.

reset offset to 0 at the start of each loop so the filenames get
printed correctly when sending directories followed by local names.

25 years agomake sure that io_flush() doesn't call writefd_unbuffered from within
Andrew Tridgell [Sat, 30 May 1998 02:02:23 +0000 (02:02 +0000)]
make sure that io_flush() doesn't call writefd_unbuffered from within
a writefd_unbuffered call!

this should fix the "decompressor lost sync" bug

25 years agoreplaced chdir and getcwd calls with push_dir/pop_dir functions. These
Andrew Tridgell [Fri, 29 May 1998 14:36:39 +0000 (14:36 +0000)]
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.

25 years agopreparing for release of 2.0.14 v2.0.14
rsync-bugs [Fri, 29 May 1998 02:29:33 +0000 (02:29 +0000)]
preparing for release of 2.0.14

25 years agofixed a bug in the flist sending code that caused the flist sending to
Andrew Tridgell [Fri, 29 May 1998 02:28:33 +0000 (02:28 +0000)]
fixed a bug in the flist sending code that caused the flist sending to
get out of sync.

25 years agouse Realloc instead of realloc
Andrew Tridgell [Thu, 28 May 1998 06:40:25 +0000 (06:40 +0000)]
use Realloc instead of realloc

25 years agofix realloc call for systems that don't handle realloc(NULL, ...)
Andrew Tridgell [Thu, 28 May 1998 06:29:57 +0000 (06:29 +0000)]
fix realloc call for systems that don't handle realloc(NULL, ...)

25 years agodon't do recursive deletion if the recurse option is not selected.
Andrew Tridgell [Thu, 28 May 1998 05:05:26 +0000 (05:05 +0000)]
don't do recursive deletion if the recurse option is not selected.

25 years agocosmetic fix. don't display a EOF error when displaying just the motd
Andrew Tridgell [Thu, 28 May 1998 01:58:33 +0000 (01:58 +0000)]
cosmetic fix. don't display a EOF error when displaying just the motd
from a rsync server

25 years agopreparing for release of 2.0.13 v2.0.13
rsync-bugs [Wed, 27 May 1998 13:54:41 +0000 (13:54 +0000)]
preparing for release of 2.0.13

25 years agoreduce IO_BUFFER_SIZE by 4 bytes so when then length word gets added
Andrew Tridgell [Wed, 27 May 1998 13:47:34 +0000 (13:47 +0000)]
reduce IO_BUFFER_SIZE by 4 bytes so when then length word gets added
it is a power of 2.

25 years agoadded new include/exclude options to man page
Andrew Tridgell [Wed, 27 May 1998 13:39:40 +0000 (13:39 +0000)]
added new include/exclude options to man page

25 years ago- always flush the IO write buffer when reading
Andrew Tridgell [Wed, 27 May 1998 13:05:05 +0000 (13:05 +0000)]
- always flush the IO write buffer when reading

- handle start of line in exclude properly

25 years agoheaps of cleanup in the io code.
Andrew Tridgell [Wed, 27 May 1998 12:37:22 +0000 (12:37 +0000)]
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

25 years agoadded support for --include, --include-from and the +/- syntax
Andrew Tridgell [Wed, 27 May 1998 11:02:33 +0000 (11:02 +0000)]
added support for --include, --include-from and the +/- syntax

25 years agonew test code from Phil
Andrew Tridgell [Wed, 27 May 1998 06:31:37 +0000 (06:31 +0000)]
new test code from Phil

25 years agofixed a race condition in the --delete handling code. The bug led to
Andrew Tridgell [Wed, 27 May 1998 06:30:50 +0000 (06:30 +0000)]
fixed a race condition in the --delete handling code. The bug led to
spurious error messages about not be able to delete some files.

this fix also makes --delete processing more efficient

25 years agopreparing for release of 2.0.12 v2.0.12
rsync-bugs [Tue, 26 May 1998 14:45:05 +0000 (14:45 +0000)]
preparing for release of 2.0.12

25 years agofixed a bug in the handling of very long filenames (longer than 255
Andrew Tridgell [Tue, 26 May 1998 14:39:18 +0000 (14:39 +0000)]
fixed a bug in the handling of very long filenames (longer than 255
chars) where two neighboring filenames share more than 255 characters
at the start of their names.

25 years agocheck for munmap as well as mmap. NextStep only has mmap in standard
Andrew Tridgell [Tue, 26 May 1998 14:18:59 +0000 (14:18 +0000)]
check for munmap as well as mmap. NextStep only has mmap in standard
libs

25 years agoformatting changes
Andrew Tridgell [Tue, 26 May 1998 14:17:27 +0000 (14:17 +0000)]
formatting changes

25 years agoerror formatting changes
Andrew Tridgell [Tue, 26 May 1998 14:16:20 +0000 (14:16 +0000)]
error formatting changes

25 years ago- don't allow chown for the group of a file if running as a daemon and
Andrew Tridgell [Sat, 23 May 1998 05:57:08 +0000 (05:57 +0000)]
- don't allow chown for the group of a file if running as a daemon and
  uid!=0

- reset am_root after startup as a daemon

25 years agodon't treat intermediate link directories as links in the relative
Andrew Tridgell [Sat, 23 May 1998 03:13:46 +0000 (03:13 +0000)]
don't treat intermediate link directories as links in the relative
path code

25 years agoneed strchr check in configure.in
Andrew Tridgell [Fri, 22 May 1998 14:22:41 +0000 (14:22 +0000)]
need strchr check in configure.in

25 years agouse a simpler mmap() test in autoconf as we don't need all the
Andrew Tridgell [Fri, 22 May 1998 14:03:30 +0000 (14:03 +0000)]
use a simpler mmap() test in autoconf as we don't need all the
features of mmap that the standard test uses, and it reports Ultrix as
having no working mmap() when in fact any mmap will do what we want
for rsync.

25 years agoneed a ifdef around some mmap code
Andrew Tridgell [Fri, 22 May 1998 13:51:26 +0000 (13:51 +0000)]
need a ifdef around some mmap code

25 years agopreparing for release of 2.0.11 v2.0.11
rsync-bugs [Fri, 22 May 1998 13:46:30 +0000 (13:46 +0000)]
preparing for release of 2.0.11

25 years agoadd a cast to initialisation of mask
Andrew Tridgell [Fri, 22 May 1998 13:27:55 +0000 (13:27 +0000)]
add a cast to initialisation of mask

25 years agochange WRAP to ZWRAP so it doesn't conflict with IRIX includes
Andrew Tridgell [Fri, 22 May 1998 13:02:22 +0000 (13:02 +0000)]
change WRAP to ZWRAP so it doesn't conflict with IRIX includes

25 years agoadded a README.rsync to explain what we have changed in zlib and to
Andrew Tridgell [Fri, 22 May 1998 12:20:07 +0000 (12:20 +0000)]
added a README.rsync to explain what we have changed in zlib and to
tell people that any bugs are our responsibility.

25 years agono longer needed
Andrew Tridgell [Fri, 22 May 1998 12:13:07 +0000 (12:13 +0000)]
no longer needed

25 years ago- fix redefinition of MAX
Andrew Tridgell [Fri, 22 May 1998 12:08:49 +0000 (12:08 +0000)]
- fix redefinition of MAX
- fix shadow of variable "overflow"

25 years agofix shadowed variable
Andrew Tridgell [Fri, 22 May 1998 12:07:23 +0000 (12:07 +0000)]
fix shadowed variable

25 years agoremoving an unused variable
Andrew Tridgell [Fri, 22 May 1998 12:06:25 +0000 (12:06 +0000)]
removing an unused variable

25 years agodon't need two AC_OUTPUT lines in configure.in
Andrew Tridgell [Fri, 22 May 1998 12:05:53 +0000 (12:05 +0000)]
don't need two AC_OUTPUT lines in configure.in

25 years agoUpdate to use the new zlib-1.1.2 code.
Paul Mackerras [Fri, 22 May 1998 06:58:52 +0000 (06:58 +0000)]
Update to use the new zlib-1.1.2 code.
The compressed token code now handles the null (-2)
token from the match logic.

25 years agothis fixes two problems:
Andrew Tridgell [Fri, 22 May 1998 01:53:02 +0000 (01:53 +0000)]
this fixes two problems:

1) handle 64 bit file offsets in the token code. I wonder how large
bit files worked up till now?

2) send a null token when we have passed over a large lump of data
without finding a token match. This reduces the number of IOs
considerably as it removes the need for seeks/reads on the checksum
calculation and literal send code. This is not enabled yet for the
compressed case as the deflate token code can't handle it yet.

25 years agoformatting changes. committed separately so they don't mask the coming
Andrew Tridgell [Thu, 21 May 1998 05:57:15 +0000 (05:57 +0000)]
formatting changes. committed separately so they don't mask the coming
token changes.