-
Notifications
You must be signed in to change notification settings - Fork 591
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
o/c/configcore,o/ifacestate: check for presence of handler-service on…
… startup (#14843) * o/c/configcore,o/ifacestate: check for presence of handler-service on startup During snapd startup, if the "apparmor-prompting" flag is enabled but there is no snap with an interfaces-requests-control connection and an app app declared as a "handler-service", then record a warning that prompts will be auto-denied until a prompting client is installed. Such a situation could arise if the user uninstalled the prompting client snap without disabling the "apparmor-prompting" feature flag, or if they disconnected the plug for the interfaces-requests-control interface. There is a check for the presence of a handler-service client when one attempts to enable the "apparmor-prompting" feature flag in the first place: when enabling the flag, if there is no handler-service app present, or it cannot be successfully started, then the flag is left disabled. Before this commit, however, there were no subsequent checks for the presence of a handler-service, so the user would have no indication of why snaps may be blocking on syscalls or having syscalls denied. Now, we make this check again at snapd startup, but rather than disabling prompting, we instead simply record a warning to the user. Signed-off-by: Oliver Calder <[email protected]> * o/ifacestate: simplify mocking of function to check handler service presence Signed-off-by: Oliver Calder <[email protected]> * o/ifacestate: improve comment around handler service presence error Co-authored-by: Miguel Pires <[email protected]> --------- Signed-off-by: Oliver Calder <[email protected]> Co-authored-by: Miguel Pires <[email protected]>
- Loading branch information
1 parent
a6866a7
commit 2fa4796
Showing
5 changed files
with
385 additions
and
44 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
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
Oops, something went wrong.