Skip to content

Add -y/--paranoid Option #5

@hohle

Description

@hohle

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions