Skip to content

Commit

Permalink
polkit: ensure error is properly set if dialog is dismissed
Browse files Browse the repository at this point in the history
  • Loading branch information
azzar1 committed Mar 6, 2018
1 parent 275d1ca commit 1b05ab9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion polkit/authority.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func checkAuthorization(subject authSubject, actionId string, details map[string
err = authority.Call(
"org.freedesktop.PolicyKit1.Authority.CheckAuthorization", 0,
subject, actionId, details, flags, "").Store(&result)
if err != nil && !result.IsAuthorized {
if err != nil || !result.IsAuthorized {
if result.IsChallenge {
err = ErrInteraction
} else if result.Details["polkit.dismissed"] != "" {
Expand Down

0 comments on commit 1b05ab9

Please sign in to comment.