Matt McCutchen
2007-Dec-14 17:35 UTC
Rsync lets user corrupt dest by applying non-inplace batch in inplace mode
Wayne, I noticed that rsync will let me apply a non-inplace batch file in inplace mode. This corrupts the destination file if the batch file copies any data forward (from earlier offsets to later ones). Of course, the post-transfer checksum detects the corruption and gives the "ERROR: <file> failed verification" message, but rsync doesn't give the user a clue why the corruption occurred. I think rsync should at least warn the user and possibly refuse outright to apply a non-inplace batch in inplace mode. However, existing batch files don't indicate which mode they were written in, and it would be nice to let a user apply a non-inplace batch if it happened not to use any forward copies. Thus, the best thing to do might be to issue an error like this the first time a forward copy is seen for each file (followed, of course, by the post-transfer checksum failure): rsync: error: batch file delta for <file> contains a forward copy, which cannot be performed in --inplace mode (probably the batch file was written without --inplace); the update will probably be corrupted Matt
Apparently Analagous Threads
- DO NOT REPLY [Bug 5201] New: Rsync lets user corrupt dest by applying non-inplace batch in inplace mode
- DO NOT REPLY [Bug 5051] New: --copy-dest copies should use a temporary file unless --inplace
- --link-dest --inplace updates files without unlinking. What to do?
- --link-dest --inplace updates files without unlinking. What to do?
- --link-dest --inplace updates files without unlinking. What to do?