passdriver: fix errors "no such secret" errors#948
Open
inknos wants to merge 1 commit into
Open
Conversation
mtrmac
reviewed
Jun 29, 2026
mtrmac
left a comment
Contributor
There was a problem hiding this comment.
Just a quick drive-by, I have never read this code.
When gpg --decrypt fails for any reason other than the file being absent, Lookup() was returning ErrNoSuchSecret. GPG's stderr was also discarded, making the real cause invisible. Four issues found: - Lookup: use fileutils.Exists to separate "file absent" (ErrNoSuchSecret) from "decrypt failed" - gpg: always capture stderr and fold it into the returned error so all callers get diagnostic output on failure - Store: check file existence via fileutils.Exists instead of Lookup, so a secret that exists but is temporarily unreadable is not silently overwritten - List: skip directories and non-.gpg files. The previous slice would panic on or return as garbage IDs Fixes: podman-container-tools/podman#28938 Signed-off-by: Nicola Sella <nsella@redhat.com>
df118b6 to
2d5a297
Compare
mtrmac
reviewed
Jun 30, 2026
mtrmac
left a comment
Contributor
There was a problem hiding this comment.
Thanks! Looks good briefly looking at the diff; I think a proper careful review by someone else would be nice but perhaps not blocking.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When gpg --decrypt fails for any reason other than the file being absent, Lookup() was returning ErrNoSuchSecret.
GPG's stderr was also discarded, making the real cause invisible.
Four issues found:
Fixes: podman-container-tools/podman#28938