Commit Graph

441 Commits

Author SHA1 Message Date
Wayne Davison
87f2984df0 Improve how negotiated info affects batch files. 2020-05-25 19:19:59 -07:00
Wayne Davison
a7303a3d3d Fix a bug in the writing of the batch.sh file
Fix the code that writes the options and the default destination path
into the batch.sh file to be able to handle options being specified
after source/dest args.
2020-05-22 08:27:07 -07:00
Wayne Davison
e448d31d63 Need to flush early errors before we exit. 2020-05-17 21:20:15 -07:00
Wayne Davison
c5fabfb068 Set Copyright years and make them easier to update
I replaced git-set-file-times with an improved version that I wrote
recently (in python3). A new script uses it to figure out the
last-modified year for each *.[ch] file and updates its copyright.
It also puts the latest year into the latest-year.h file for the
output of --version.
2020-04-09 15:11:37 -07:00
Wayne Davison
2598ca668b Fix the default skip-compress list.
The default value of the skip-compress list actually comes from the
daemon's default lp_dont_compress() value, but a while back the vars
stopped getting default values in a non-daemon run. I added a call to
reset_daemon_vars() so that the "Vars" values get set from "Defaults".
2020-04-07 18:15:09 -07:00
Wayne Davison
70cbc66b7f Set RSYNC_PORT in the env for a daemon-over-rsh connection.
Fixes bug #14163.
2020-04-05 19:34:27 -07:00
Wayne Davison
15fa9ab06d Add progress output via SIGINFO and SIGVTALRM
On BSD-ish systems you can type Ctrl+T to see the current file and
the progress output (in --info=progress2 format).  On hosts w/o
SIGINFO, use something like "killall -VTALRM rsync" or a more
targetted "kill -VTALRM PID ..." call (as needed).
2020-04-05 15:07:31 -07:00
Wayne Davison
b32aa4797d Make exit_cleanup() use _exit() if called from a signal handler.
Fixes bug #13982.
2020-04-05 10:26:40 -07:00
Wayne Davison
08650cb14c Add a --copy-as=USER[:GROUP] option
This can be used by a root-run rsync to try to make reading or writing
files safer in a situation where you can't run the whole rsync command
as a non-root user.
2020-03-29 13:18:20 -07:00
Wayne Davison
3e2e4b5a33 Tweak the copyright year. 2019-03-16 09:15:49 -07:00
Wayne Davison
5df9847f06 Allow some pre-/post-xfer exec shell restrictions.
Support both RSYNC_SHELL & RSYNC_NO_XFER_EXEC environment variables.
2018-03-25 11:02:50 -07:00
Wayne Davison
473108ae6e Tweak copyright date. 2018-01-14 19:55:07 -08:00
Wayne Davison
0350f95e7b Add an extra argc validation in do_server_sender().
Fixes bug 13104.
2017-10-29 15:52:56 -07:00
Wayne Davison
a5a7d3a297 Add --checksum-choice option to choose the checksum algorithms. 2016-05-01 17:06:54 -07:00
Wayne Davison
d1c80404fe Output "UNKNOWN" if starttime or endtime is -1.
Fixes bug 11382.
2016-04-17 16:11:04 -07:00
Wayne Davison
0f7db203fb Only output about new backup dirs when requested.
Fixes bug 11812.
2016-04-17 11:06:58 -07:00
Wayne Davison
abfb41e63e Avoid creating even the top-level backup dir until needed.
Fixes bug 11423.
2015-08-23 21:58:18 -07:00
Wayne Davison
453914e35b Update the copyright year. 2015-08-08 12:47:03 -07:00
Wayne Davison
23afe20780 Brant Gurganus's autoconf updates.
This improves some obsolete autoconf macros and increases the minimum
autoconf version from 2.60 to 2.69.  Fixes bug 11369.
2015-07-07 10:37:12 -07:00
Wayne Davison
962f8b9004 Complain if an inc-recursive path is not right for its dir.
This ensures that a malicious sender can't use a just-sent
symlink as a trasnfer path.
2014-12-31 13:48:42 -08:00
Wayne Davison
dfa5b49110 Bump the year to 2014. 2014-01-26 09:29:15 -08:00
Wayne Davison
7e1a9c4d79 Update copyright year. 2013-01-19 11:05:53 -08:00
Wayne Davison
48b51d0004 make repeated --fuzzy option look into alt-dest dirs. 2011-11-23 12:29:25 -08:00
Wayne Davison
3527677043 Let's cast getpid() to an int instead of a long for snprintf(). 2011-10-08 09:15:36 -07:00
Wayne Davison
de407c03d2 Fix a potential hang on an empty file list.
Fixes bug 8423.
2011-09-11 11:08:14 -07:00
Wayne Davison
5bfe006882 Make daemon-exclude errors more error-like.
Fixes bug 7765.
2011-06-18 12:44:26 -07:00
Wayne Davison
58663df432 Turn empty remote args into dot dirs. 2011-05-07 12:42:16 -07:00
Wayne Davison
4403b1332f Fix --force with --one-file-system w/o --delete. 2011-02-22 08:26:13 -08:00
Wayne Davison
8f30d21584 Protect a remote filename that starts with a dash. 2010-12-23 22:09:45 -08:00
Wayne Davison
9541770faf Get rid of some trailing whitespace. 2010-06-19 10:49:09 -07:00
Wayne Davison
d1fe65fc5e Make an empty-string dest-dir the same as "." again. 2010-05-02 17:05:07 -07:00
Wayne Davison
9fbec6e44c May as well use do_mkdir() directly these days. 2010-04-30 12:58:17 -07:00
Matt McCutchen
9a54a640f7 Don't set the umask to 0 any more: it's ugly and pointless. 2010-04-24 09:28:58 -07:00
Wayne Davison
05c36015f7 More --timeout improvements, especially for the receiving side:
- The receiver now sends keep-alive messages to the generator
  when it is actively doing work and hasn't sent anything
  recently.  This ensures that the generator won't timeout
  if the receiver is working hard.
- The perform_io() code has improved keep-alive participation.
- Allow the sender to send some keep-alive messages, which
  ensures that if it is in a lull, it can probe the socket.
2010-01-02 10:58:39 -08:00
Wayne Davison
92d021488e Improve --timeout method to take into account all I/O that is going on.
The receiving side also switches timeout handling from the receiver to
the generator, which obviates the need for the sender to send any
keep-alive messages at all (for protocol 31 and beyond).  Given this
setup, all keep-alive messages are now sent as empty MSG_DATA messages,
with MSG_NOOP messages only being understood and (when necessary) acted
upon to forward a keep-alive event to an older receiver.  This is both
safer and more compatible with older versions.
2009-12-19 11:00:36 -08:00
Wayne Davison
82b2a31a46 Added an am_receiver variable. 2009-12-19 10:14:49 -08:00
Wayne Davison
f8e1fa6272 Free a strdup() in do_cmd() that checker was complaining about. 2009-12-13 19:28:01 -08:00
Wayne Davison
7d0fe4da70 Fix checker compile warning. 2009-12-12 15:51:03 -08:00
Wayne Davison
2885270b52 Fix a hang that can happen when the sender is sending an extra file-list
and no one is reading (i.e. do advantageous reading in perform_io()).
2009-12-12 09:46:02 -08:00
Wayne Davison
0c2e8f9364 Don't send MSG_ERROR_EXIT messages at the end of the transfer.
Added some debug output for MSG_ERROR_EXIT messages.
2009-12-12 08:54:36 -08:00
Wayne Davison
2907af472d Try to silence some warnings from "checker". 2009-11-07 09:46:20 -08:00
Wayne Davison
a0f1ed55cd Change the daemon-timeout conveyance into a protocol-31 message. 2009-10-27 12:38:04 -07:00
Wayne Davison
705132bcee Fixed some backward-compatibility issues with --files-from. 2009-10-24 11:12:37 -07:00
Wayne Davison
d720569422 Moved a few group-related functions with some minor tweaks; 2009-10-20 07:54:21 -07:00
Wayne Davison
20caffd2b3 A major overhaul of I/O routines, creating perform_io().
Files-from data is now sent as multiplexed I/O so that it can mingle
with any messages (such as debug output).  Requires protocol 31.

Protocol 31 no longer disables output verbosity in a couple instances
that used to cause protocol issues.

Got rid of MSG_* messages that have implied raw data that follows after
them.  We instead send a negative index value as a part of the raw data
stream, which is guaranteed to be output together with the following
data.  This only affects the (in-progress) protocol 31 and the (self-
contained) communication stream from the receiver to the generator.

Added --debug=IO and improved --debug=FLIST.  Some --debug=IO output
requires --msgs2stderr to be used to see it (i.e. sending a message
about sending a message would send another message, ad infinitum).
2009-10-17 00:03:32 -07:00
Wayne Davison
41000dffc1 Avoid stopping multiplexed out over the message fd.
Use simpler multiplexed-out stopping method.
Make sure we can't false-match a socket fd.
2009-10-12 09:10:50 -07:00
Wayne Davison
d8587b4690 Change the msg pipe to use a real multiplexed IO mode
for the data that goes from the receiver to the generator.
2009-10-02 14:18:51 -07:00
Wayne Davison
3b83a22057 Define and use "our_gid" variable. 2009-09-02 08:56:34 -07:00
Wayne Davison
7b6c5c7794 Use typedefs for the filter structures. 2009-05-23 09:07:43 -07:00
Wayne Davison
4e9c7fae8f The suffix must be non-empty if the backup-dir is the same as the dest
dir.
2009-04-11 17:31:13 -07:00