Skip to content

checksum: read data files without requiring metadata - #17072

Open
limadog9 wants to merge 1 commit into
uutils:mainfrom
limadog9:fix/checksum-input-read-errors
Open

limadog9 wants to merge 1 commit into
uutils:mainfrom
limadog9:fix/checksum-input-read-errors

Conversation

@limadog9

@limadog9 limadog9 commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

A failed metadata lookup could make cksum --check skip a readable file. Checksum generation and verification now use the actual open or read result.

Addresses the checksum cases in #10890 and #14705.

With GNU 9.12, checksum failures in misc/read-errors.sh fell from 17 to 0. The remaining 19 are in other utilities. All 21 dedicated GNU checksum tests passed before and after.

Use the actual open or read error when hashing a data operand. A readable file can still be verified when its metadata is unavailable. Keep a best-effort directory check on systems whose reads can expose directory data or return a bad descriptor.

Addresses the checksum cases in uutils#10890 and uutils#14705.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant