-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cockpit.superuser: prevent 'any' from being set
ae5ce0a introduced a bug in the code that handled the case where the `any` superuser bridge was requested: previously, the code would set `self.current` to the name of the selected peer, but after the change, it would get set to `any` instead. Fix that up by ignoring the value of `name` after we use it for finding the peer. This allows us to simplify the condition for checking if the running bridge ought to be shut down when reloading packages. The current logic reads that we should shutdown the current bridge "if there's any bridge which has our name" (which is very likely, in case nothing changed). We need to change that to `not any`, but we can also simplify things by storing the original config object on the peer and checking if it appears in the new list (in its entirety). Thanks to Jelle for the testcase. Fixes #19327 Co-authored-by: Jelle van der Waa <[email protected]>
- Loading branch information
1 parent
18ce2d6
commit 755bc40
Showing
3 changed files
with
16 additions
and
16 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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