Commit Graph

446 Commits

Author SHA1 Message Date
Wayne Davison
83b94efa6b Switch over to Matt's idea of using FLAG_OWNED_BY_US. 2011-01-29 22:19:14 -08:00
Wayne Davison
c499002e51 Fix a random flist data bug w/delete, inc-recurse, and no -o.
Fixes bug 7936.
2011-01-29 19:25:53 -08:00
Wayne Davison
c3ee6ac369 Avoid directory permission issues with --fake-super.
Fixes bug 7070.
2011-01-01 16:57:08 -08:00
Wayne Davison
ce41e68995 Itemize xattrs of a missing dir from an alt-dest dir.
Fixes bug 6576.
2011-01-01 13:03:23 -08:00
Wayne Davison
10cd07c225 Avoid infinite loop if the file's length is negative.
Fixes bug 4664.
2010-09-06 08:05:26 -07:00
Matt McCutchen
f532cede11 In "ignoring unsafe symlink" messages, show only the file-list path.
Rsync was showing the full destination path, which was confusing because
nothing is created at that path and was especially bogus in combination
with the source name of a solo file.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=506830
2010-07-03 09:19:01 -07:00
Wayne Davison
55dbbdeafe Fixed inconsistencies reported by packaging/var-checker. 2010-06-30 09:17:26 -07:00
Wayne Davison
11f4f34ed9 Fix daemon-filter crash issue (bug 7489). 2010-06-04 23:10:47 -07:00
Wayne Davison
ae358c1960 Revert to having the receiver handle timeouts on the receiving side.
This will give 3.0.7 the standard timeout handling with just a few
improvements: a fix for the detection of recent sender I/O, the use
of MSG_DATA for really old rsync versions, and better setting of
select_timeout for shorter timeout settings.
2009-12-23 11:36:27 -08:00
Wayne Davison
d94b958400 Improve --timeout method to take into account all socket I/O that is
going on.  The receiving side also switches timeout handling from the
receiver to the generator.  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 13:39:49 -08:00
Wayne Davison
79870bd269 Don't (wrongly) retouch dir permissions with --fake-super.
(Patch from Matt.)
2009-12-12 17:25:19 -08:00
Wayne Davison
4640ae85fe Change sending/receiving/storing of the rdev value for special files.
Since the value is not needed, the (superfluous) sending of the value
is optimized so that a valid rdev value is sent as efficiently as
possible.  The receiver no longer caches an rdev value for special
files, and the generator will always pass a 0 rdev value to do_mknod()
for special files. Fixes bug #6280.
2009-04-26 07:51:50 -07:00
Wayne Davison
feb8dacc14 Fixed the use of --xattrs with --only-write-batch. 2009-04-12 12:48:59 -07:00
Wayne Davison
8250d8a1c6 Fixed a hang in the inc_recurse batch-reading code. 2009-01-17 13:54:52 -08:00
Wayne Davison
445640e803 Update the copyright year. 2009-01-17 13:41:35 -08:00
Matt McCutchen
e512826786 Add flist_find_ignore_dirness() and change delete_in_dir() to use it.
This fixes an issue with -K noticed by eric casteleijn, avoids some
inconsistent itemizing when a file/dir is replaced by a dir/file,
and removes a now-obsolete chunk of code from make_file().
2008-11-10 07:46:41 -08:00
Wayne Davison
7c573428a9 Fixed skipping of unneeded updates in a batch file when incremental
recursion is active.  Added a test for this.  Made batch-mode handle
redos properly (and without hanging).
2008-09-26 21:32:43 -07:00
Wayne Davison
deea1f70bd Got rid of the check_for_io_err code, as it could cause a hang.
The io_error issue will be fixed in a better way in 3.1.0.
2008-08-31 09:51:29 -07:00
Wayne Davison
25a22d8501 Make the !flist_eof assumption explicit before the check_for_io_err
code calls wait_for_receiver().
2008-08-24 12:33:22 -07:00
Wayne Davison
9bed85542c Changed flist_for_ndx() to optionally die with an error
if the index isn't found.
2008-08-14 07:32:18 -07:00
Wayne Davison
7790ee3684 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:03:49 -07:00
Wayne Davison
9ed569486f Output an FERROR* for a general io_error, and an FWARNING for other
io_error flags.
2008-07-31 07:57:55 -07:00
Wayne Davison
ee03cb99d9 Fixed the timeout/flush loop-check logic to work properly with
incremental recursion.
2008-07-23 23:37:11 -07:00
Wayne Davison
a24d64bfaa Fixed a problem with a file descriptor being left open in the
generator when handling an empty file.
2008-06-26 08:14:11 -07:00
Wayne Davison
8bd77e7098 Fixed the sending of large files with older rsync versions by
handling the old block-size limit for protocols < 29.
2008-06-23 09:17:55 -07:00
Wayne Davison
67347196b1 Fix the problem with setting xattrs on a directory that has an
identical match found in a --link-dest/--copy-dest hierarchy.
2008-06-12 23:08:43 -07:00
Wayne Davison
ca7d17e41d Handle a solo_file of a directory for --delete-during. 2008-06-09 07:42:03 -07:00
Wayne Davison
7462c6ac39 Fixed an "Internal abbrev error" when dealing with an xattr value
that is unchanged on an early file, and changed on a later file.
Added 2 new test cases to ensure this stays fixed.
2008-06-08 20:40:11 -07:00
Wayne Davison
cc911409d6 Make sure the generator doesn't try to send a negative checksum count to
the sender (which would cause it to die with a cryptic error).  Instead,
warn the user when the file's size is too large for checksum processing.
2008-05-31 10:13:28 -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
Wayne Davison
f1ca7c4429 Preserve the right errno value when trying adjunct functions during
robust backup, copy, and renaming activities.
2008-05-17 08:25:22 -07:00
Wayne Davison
4616867b0d Don't allow '.' dir to be excluded by the daemon's filter rules. 2008-04-16 09:30:28 -07:00
Wayne Davison
b05c58cce6 Dump an extraneous empty line. 2008-03-28 10:30:11 -07:00
Wayne Davison
f6f74b93ef Ensure that a per-dir merge file is also loaded from implied directories
in the generator (for protocol 30, at least).
2008-03-26 14:01:26 -07:00
Wayne Davison
1df02d13d3 Don't send daemon-config filter-action messages back to the user. 2008-03-24 10:14:59 -07:00
Wayne Davison
819bfe4599 Changed the name of the server_filter_list to be
daemon_filter_list, for improved clarity.
2008-03-20 10:42:43 -07:00
Wayne Davison
6e0bf4d840 Some more minor changes for the skip/missing/dry_run code. 2008-03-19 08:59:44 -07:00
Matt McCutchen
83a8ca7b14 Unsnarl missing_below/dry_run logic.
The generator can skip a directory's contents altogether due to
--ignore-non-existing, a daemon exclude, or a mkdir failure.  On a
--dry-run, the generator can also note the missingness of a directory
while still scanning its contents.  These two scenarios were conflated
using a single set of missing_below/missing_dir variables in combination
with transient increments in dry_run; this caused at least three bugs.

Now recv_generator has separate variables for the two scenarios, called
skip_dir and dry_missing_dir, respectively.  For simplicity, we take the
F_DEPTH instead of having separate *_below variables.  We mark both
kinds of missing dirs with FLAG_MISSING_DIR.  (dry_run > 1) iff the
*root* of the destination does not exist; it is no longer incremented
for missing subdirs.  I added tests for the three fixed bugs in
missing.test.
2008-03-19 07:45:58 -07:00
Wayne Davison
cc12c488aa Use the missing_below code to make the daemon-exclusions
work better.
2008-03-18 10:10:13 -07:00
Wayne Davison
c9b62cf375 Fixed hard-linking when some of the files can get skipped. This adds
the FLAG_SKIP_HLINK flag, which gets set on any hard-linked file that
the user wants to skip (e.g. via --ignore-existing, --append, etc.).
The code in hlink.c now deals with the skipped files instead of
triggering an assert() error.
2008-03-16 19:47:35 -07:00
Wayne Davison
7bc595785e Made the FLAG_MOUNT_DIR bit only honored on a directory. 2008-03-16 17:52:31 -07:00
Wayne Davison
022dec7aba Moved the --append check so that files that don't need to be transferred
still get their non-content attributes updated, and combining --append
with --hard-links will not prevent the discovery of unchanged files.
2008-03-16 17:50:28 -07:00
Wayne Davison
ddaef70ced Make the --ignore-existing option not overwrite a regular file with
a dir/symlink/device/special-file, just like it already refuses to
overwrite a non-regular file with a regular file.
2008-03-16 17:17:38 -07:00
Wayne Davison
24ded29ff6 Fixed a hang when using --remove-source-files in dry-run mode. 2008-03-16 06:56:26 -07:00
Wayne Davison
ee39281d14 Fixed the 'T' itemized output for a symlink the right way this time. 2008-03-11 17:35:49 -07:00
Wayne Davison
0607c30700 - One more fix for the 'T' itemized output for a symlink when we're
the client on the receiving side of a protocol-29 connection.
2008-03-11 07:26:37 -07:00
Wayne Davison
1ed9018e69 Fixed some itemized logging failures:
- If a symlink/device/special-file changes its value without any
  attribute changes, the itemized event no longer gets dropped.
- We put a 'c' into the checksum/change field now to indicate when
  a symlink/device/special-file changes its value without changing
  its type.  This lets us properly interpret the --copy-links output
  to know which items are getting copied without changes and which
  are getting created with new content.
- Fixed the 'T' itemized output for a symlink when rsync tries to
  set the right time but fails due to lack of OS/disk support.
2008-03-10 21:39:01 -07:00
Wayne Davison
ff0e15804f Fixed the itemizing of perms with -E. 2008-03-09 19:50:51 -07:00
Wayne Davison
6226396c4a Don't call utimes() on a dir that doesn't need its mtime changed. 2008-03-04 22:48:01 -08:00