Commit Graph

298 Commits

Author SHA1 Message Date
Wayne Davison
b936741032 Added --atimes and --set-noatime options. 2020-04-23 13:24:15 -07:00
Wayne Davison
d29702134a Spelling fixes from a Fossies run done by Jens. 2020-04-15 17:42:23 -07:00
Wayne Davison
1c82a1e1e5 A few file-data improvements. 2020-04-12 15:51:20 -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
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
3e2e4b5a33 Tweak the copyright year. 2019-03-16 09:15:49 -07:00
Wayne Davison
0f8e9e2d86 Don't force nanoseconds if a file wasn't transferred or checksummed. 2018-01-15 10:58:31 -08:00
Wayne Davison
473108ae6e Tweak copyright date. 2018-01-14 19:55:07 -08:00
Jeriko One
70aeb5fddd Sanitize xname in read_ndx_and_attrs. 2017-12-03 16:13:05 -08:00
Wayne Davison
b973bffa94 If a backup fails (e.g. full disk) rsync should fail.
Fixes bug 11668.
2016-04-17 16:31:57 -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
5b34561cf7 Call set_modtime even if only NSEC is different. 2014-12-31 13:10:37 -08:00
Wayne Davison
dfa5b49110 Bump the year to 2014. 2014-01-26 09:29:15 -08:00
Wayne Davison
0e3152febd Change owner+group before setting xattrs to avoid xattr loss.
Fixes bug 10163.
2013-12-23 09:49:17 -08:00
Wayne Davison
d4070db631 Avoid I/O via signal-handler thread.
The cleanup code will try to flush the output buffer in some
circumstances, which is not valid if we're handling an async signal
(since it might have interrupted some partial I/O in the main thread).
These signals now set a flag and try to let the main I/O handler take
care of the exit strategy.  Fixes a protocol error that could happen
when trying to exit after a kill signal.
2013-05-26 16:22:56 -07:00
Wayne Davison
cb784f18ec Improve iconvbufs() to do more buffer size checks.
- If iconv() returns EINVAL or EILSEQ and the error is being ignored, make
  sure that there is room in the output buffer to store the erroneous char.
- When accepting an erroneous char, be sure to break if there are no more
  input characters (without calling iconv() with a zero input length).
2013-05-19 23:56:34 +00:00
Wayne Davison
7e1a9c4d79 Update copyright year. 2013-01-19 11:05:53 -08:00
Wayne Davison
d42e7181d5 Add free_stat_x() inline function. 2013-01-19 10:25:18 -08:00
Wayne Davison
0d34fbdf5a Make daemon listener exit w/code 0 on SIGTERM. 2012-06-16 10:31:14 -07:00
Wayne Davison
eee2c77a93 Some uid/gid fixes for (id_t)-1 and other large ID values.
The code now avoids any special internal meaning for uid/gid -1, which
allows it to be mapped to a better value (use 4294967295 instead of -1
as the ID to map).  Replaced atol() with something than can return a
value > 0x7FFFFFFF and that will error-out if the value overflows.  If
chown() is called with a uid or gid of -1, complain that the ID is not
settable and signal a transfer error.  Fixes bug 6936.
2011-02-22 10:27:35 -08:00
Wayne Davison
69be312b5e Some minor variable and flag cleanup. 2011-01-29 22:01:37 -08:00
Wayne Davison
743348e848 Fix issues with unchanged_attrs() for symlinks. 2010-12-18 08:48:07 -08:00
Wayne Davison
ba342e22e7 Undo unintended mode-reference tweak. 2010-08-28 18:02:22 -07:00
Wayne Davison
2624e005e2 Add --omit-link-times and use CAN_SET_SYMLINK_TIMES less. 2010-08-26 11:12:58 -07:00
Wayne Davison
3b22184d4c Avoid a non-writable-by-the-user file when copying xattrs.
Fixes part of the problem in bug 5147.
2010-08-21 14:14:31 -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
d03c0b1ed3 Fix a comment. 2009-11-23 22:45:29 -08:00
Wayne Davison
907e6a32a0 Change the handling of circular buffers to not waste 4 bytes
all the time (we only waste from 1-3 bytes some of the time).
2009-11-23 08:16:18 -08:00
Wayne Davison
23a0d1e200 Get rid of some unneeded externs. 2009-10-27 12:38:30 -07:00
Wayne Davison
d8a7290f86 Give iconvbufs() an ICB_INIT flag. 2009-10-23 22:51:29 -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
ee1c00fea8 Pass "new_mode" to set_acl() and change its return values. 2009-09-12 09:27:07 -07:00
Wayne Davison
1a2e41af94 Add support for transferring & setting nsec time values. 2009-09-07 14:11:58 -07:00
Wayne Davison
ce827c3e50 Have the sender use dead time to pad out the file list. 2009-08-22 08:15:26 -07:00
Wayne Davison
21cddef2b4 Improved the backup code:
- Backups do not interfere with an atomic update (when possible).
- Backing up a file will remove a directory that is in the way
  and visa versa.
- Unify the backup-dir and non-backup-dir code in backup.c.
- Improved the backup tests a little bit.
2009-01-03 12:02:47 -08:00
Wayne Davison
b3bf9b9df9 Update the copyright year. 2009-01-03 10:57:14 -08:00
Wayne Davison
09ca0d15d3 Added init_stat_x() to avoid duplication of acl/xattr init code. 2009-01-03 08:53:59 -08:00
Wayne Davison
08b7c3ed83 Fixed send_protected_args() to send "." in place of an empty arg. 2008-10-11 10:27:16 -07:00
Wayne Davison
8b3e60523a Improved the fix that ensures that the generator gets notified about an
I/O error for the incremental directory that generated the error.  The
PROTOCOL_VERSION was bumped to 31 to implement this.
2008-08-31 09:43:39 -07:00
Wayne Davison
e982d59146 Changed flist_for_ndx() to optionally die with an error
if the index isn't found.
2008-08-14 07:40:56 -07:00
Wayne Davison
f303b749f2 Added logic to the receiving side to ensure that the --delete-during
code will not delete in a directory prior to receiving an I/O error
for that directory (or not receiving it, as the case may be).
2008-08-02 09:14:36 -07:00
Wayne Davison
c9f540f37d Changed the iconv-related message that was being output as the
lone --info=misc2 message into a --debug=iconv message so that
all iconv info will be output when requesting iconv debugging.
2008-08-01 18:15:28 -07:00
Wayne Davison
eabc85ef5e Added a debug-helping option, --msgs2stderr, than should help all
messages to be seen in a situation where rsync is dying (as long
as stderr is a viable output method for the remote rsync).
2008-07-20 20:08:08 -07:00
Wayne Davison
951e826b75 Added the --info=FLAGS an --debug=FLAGS options, which allows
fine-grained output control (in addition to the coarse -v).
2008-07-13 20:51:08 -07:00
Wayne Davison
4337eeb754 A cuple more fixes for --xattrs combined with --backup, this time to
handle when --link-dest is also used.
2008-05-22 07:32:11 -07:00
Wayne Davison
e9489cd6cb Fixed several issues with preserving xattrs when using --backup. 2008-05-17 09:35:46 -07:00