AuthRequestor: Add NewAutoAuthRequestor#506
Open
chrisccoulson wants to merge 1 commit intocanonical:masterfrom
Open
AuthRequestor: Add NewAutoAuthRequestor#506chrisccoulson wants to merge 1 commit intocanonical:masterfrom
chrisccoulson wants to merge 1 commit intocanonical:masterfrom
Conversation
This adds a new implementation of AuthRequestor that selects the most appropriate implementation from either Plymouth or systemd, preferring Plymouth if it is available and currently running and then falling back to systemd-ask-password if it is available. Fixes: FR-12405
4733f65 to
cf86524
Compare
pedronis
reviewed
Feb 11, 2026
|
|
||
| // AutoAuthRequestorStringer is used by the auto selecting implementation | ||
| // of [AuthRequestor] to obtain translated strings. | ||
| type AutoAuthRequestorStringer interface { |
Collaborator
There was a problem hiding this comment.
is this different from the Plymouth one? should we just have one AuthRequestorStringer ?
| if r.lastUsed == nil { | ||
| return errors.New("no user credential requested yet") | ||
| } | ||
| return r.lastUsed.NotifyUserAuthResult(ctx, result, authTypes, exhaustedAuthTypes) |
Collaborator
There was a problem hiding this comment.
it seems because of the ping in the plymouth implementation that this could return ErrAuthRequestorNotAvailable ? is that expected, should it be documented? what should the caller do in that case?
Collaborator
There was a problem hiding this comment.
I think if plymouth stops in the middle, it is a weird enough context that we should completely fail and just log that error.
valentindavid
approved these changes
Feb 17, 2026
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.
This adds a new implementation of
AuthRequestorthat selects the mostappropriate implementation from either Plymouth or systemd, preferring
Plymouth if it is available and currently running and then falling back
to
systemd-ask-passwordif it is available.Fixes: FR-12405