-
Notifications
You must be signed in to change notification settings - Fork 587
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 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 do not start the prompting backends, and record a warning that prompting will be inactive until snapd is restarted. This avoids a situation where prompting is enabled but there is no client installed, resulting in snaps blocking while waiting for prompt replies which will never be received. Now, if there's no client installed, prompting will be inactive until a client is installed and snapd is restarted. There is a similar check for the presence of a handler-service client when one attempts to enable the "apparmor-prompting" feature flag in the first place. 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 are no subsequent checks for the presence of a handler-service, so snapd can end up in the situation described above if the user uninstalls the client snap without disabling the "apparmor-prompting" flag. We don't want killing the handler-service client to be sufficient to disable prompting. Instead, prompting can only be simultaneously enabled but inactive if the client snap either has disconnected the plug for the interfaces-requests-control interface, or has been uninstalled entirely. Both of these operations operations require elevated permissions, so confined snaps which lack the snapd-control interface should be unable to disable prompting. Signed-off-by: Oliver Calder <[email protected]>
- Loading branch information
1 parent
ecef4af
commit dabea71
Showing
4 changed files
with
212 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