Prior to the final atomic swap, a "paranoid" option would do a byte-wise comparison of the cloned file with the original. If this check fails, the cloned file should be byte-wise compared with the clone source. If the second check fails, the cloned tmp file should be deleted, an error reported, and dedup should exit immediately as their may be filesystem corruption, out of band modification, or other issues that should not be handled by dedup.
This isn't done by default for the same reason it isn't done by default in utilities like cp, mv, etc. It is expected that the underlying system APIs will return an error if there is a problem, and otherwise are assumed to succeed. There are other situations where abundance of caution may be desired.
If the second check succeeds, a message should tell the user to run shasum -a 256 on those files, save them, make duplicates, and contact Bruce Schneier or djb and tell them what they've found.
Prior to the final atomic swap, a "paranoid" option would do a byte-wise comparison of the cloned file with the original. If this check fails, the cloned file should be byte-wise compared with the clone source. If the second check fails, the cloned tmp file should be deleted, an error reported, and
dedupshould exit immediately as their may be filesystem corruption, out of band modification, or other issues that should not be handled bydedup.This isn't done by default for the same reason it isn't done by default in utilities like
cp,mv, etc. It is expected that the underlying system APIs will return an error if there is a problem, and otherwise are assumed to succeed. There are other situations where abundance of caution may be desired.If the second check succeeds, a message should tell the user to run
shasum -a 256on those files, save them, make duplicates, and contact Bruce Schneier or djb and tell them what they've found.