summaryrefslogtreecommitdiff
path: root/rsync.c
AgeCommit message (Collapse)AuthorFilesLines
2014-01-26Bump the year to 2014.Wayne Davison1-1/+1
2013-12-23Change owner+group before setting xattrs to avoid xattr loss.Wayne Davison1-25/+25
Fixes bug 10163.
2013-05-26Avoid I/O via signal-handler thread.Wayne Davison1-0/+15
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-19Improve iconvbufs() to do more buffer size checks.Wayne Davison1-0/+7
- 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-01-19Update copyright year.Wayne Davison1-1/+1
2013-01-19Add free_stat_x() inline function.Wayne Davison1-10/+2
2012-06-16Make daemon listener exit w/code 0 on SIGTERM.Wayne Davison1-1/+6
2011-02-22Some uid/gid fixes for (id_t)-1 and other large ID values.Wayne Davison1-3/+7
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-01-29Some minor variable and flag cleanup.Wayne Davison1-2/+0
2010-12-18Fix issues with unchanged_attrs() for symlinks.Wayne Davison1-1/+1
2010-08-28Undo unintended mode-reference tweak.Wayne Davison1-1/+1
2010-08-26Add --omit-link-times and use CAN_SET_SYMLINK_TIMES less.Wayne Davison1-2/+4
2010-08-21Avoid a non-writable-by-the-user file when copying xattrs.Wayne Davison1-4/+2
Fixes part of the problem in bug 5147.
2010-01-02More --timeout improvements, especially for the receiving side:Wayne Davison1-1/+1
- 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.
2009-12-19Improve --timeout method to take into account all I/O that is going on.Wayne Davison1-4/+3
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-19Added an am_receiver variable.Wayne Davison1-1/+5
2009-11-23Fix a comment.Wayne Davison1-1/+1
2009-11-23Change the handling of circular buffers to not waste 4 bytesWayne Davison1-46/+64
all the time (we only waste from 1-3 bytes some of the time).
2009-10-27Get rid of some unneeded externs.Wayne Davison1-1/+0
2009-10-23Give iconvbufs() an ICB_INIT flag.Wayne Davison1-4/+4
2009-10-17A major overhaul of I/O routines, creating perform_io().Wayne Davison1-15/+56
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-09-12Pass "new_mode" to set_acl() and change its return values.Wayne Davison1-2/+4
2009-09-07Add support for transferring & setting nsec time values.Wayne Davison1-1/+1
2009-08-22Have the sender use dead time to pad out the file list.Wayne Davison1-1/+10
2009-01-03Improved the backup code:Wayne Davison1-2/+3
- 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-03Update the copyright year.Wayne Davison1-1/+1
2009-01-03Added init_stat_x() to avoid duplication of acl/xattr init code.Wayne Davison1-6/+1
2008-10-11Fixed send_protected_args() to send "." in place of an empty arg.Wayne Davison1-2/+5
2008-08-31Improved the fix that ensures that the generator gets notified about anWayne Davison1-14/+1
I/O error for the incremental directory that generated the error. The PROTOCOL_VERSION was bumped to 31 to implement this.
2008-08-14Changed flist_for_ndx() to optionally die with an errorWayne Davison1-20/+37
if the index isn't found.
2008-08-02Added logic to the receiving side to ensure that the --delete-duringWayne Davison1-1/+14
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-01Changed the iconv-related message that was being output as theWayne Davison1-11/+10
lone --info=misc2 message into a --debug=iconv message so that all iconv info will be output when requesting iconv debugging.
2008-07-20Added a debug-helping option, --msgs2stderr, than should help allWayne Davison1-2/+5
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-13Added the --info=FLAGS an --debug=FLAGS options, which allowsWayne Davison1-12/+11
fine-grained output control (in addition to the coarse -v).
2008-05-22A cuple more fixes for --xattrs combined with --backup, this time toWayne Davison1-1/+2
handle when --link-dest is also used.
2008-05-17Fixed several issues with preserving xattrs when using --backup.Wayne Davison1-2/+5
2008-03-16Moved declaration of "int i" outside the ifdef in send_protected_args().Wayne Davison1-1/+2
2008-03-15Fixed the use of --protect-args (-s) with a daemon.Wayne Davison1-0/+35
2008-03-11Fixed the 'T' itemized output for a symlink the right way this time.Wayne Davison1-2/+1
2008-03-01Include 2008 in the copyright years.Wayne Davison1-1/+1
2008-02-18Only set FLAG_TIME_FAILED if receiver_symlink_times is set.Wayne Davison1-1/+2
2008-02-18Extended the protocol-30 info-passing code at startup, and use it toWayne Davison1-0/+2
tell the client if the server can set the times on a symlink (both the server->client byte and the client->server use of -e). Make use of this info to allow the proper output of the 't' flag when rsync can set the time on a symlink (and we're talking protocol >= 30). Added output of "[no] symtimes" info in the --version message. Fixed the itemize.test so that it works when rsync believes that it can set the time of a symlink, but it can't really do it.
2008-02-07Re-indent some code in set_file_attrs() to make the flow clearer.Wayne Davison1-18/+18
2007-12-31Fixed a case where the receiver indicates a successful update when theWayne Davison1-16/+23
transfer succeeded, but the final rename failed.
2007-12-08Updated indexing for accurate progress and improved raw ndx values.Wayne Davison1-4/+5
The sending side now has a sorted file-list in iconv mode so that it can output progress in sorted order. Simplified the over-the-wire index values to ensure both sides will always agree on the values. Optimized the allocation of the dir_flist->sorted array on the receiving side with --iconv and incremental recursion.
2007-11-25We now call set_stat_xattr() before set_xattr().Wayne Davison1-2/+2
2007-11-24Fixed a problem with --fake-super not getting the fully tweaked new_modeWayne Davison1-4/+4
value. Also fixed the removal of rsync-internal xattr values on the destination files when we aren't copying rsync-internal xattr values.
2007-11-22New logging categories added to allow differentiation betweenWayne Davison1-6/+6
transfer errors, normal errors, and warnings. New messages are translated into old FERROR/FINFO categories for older protocols.
2007-11-03Avoid verbose output during the forwarding of flist data (for now,Wayne Davison1-3/+5
at least).
2007-10-31Avoid a crash if we read an index value without a valid first_flist.Wayne Davison1-1/+2