-
Notifications
You must be signed in to change notification settings - Fork 601
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
interfaces: move lxd-support's use of AppArmor unconfined mode to an …
…interface attribute (#13514) * interfaces/apparmor: rework unconfined mode for dynamic enablement For an interface to use unconfined mode, it must both declare support for it as a static property and then enable it by an explicit call. This allows interfaces to enable this dynamically via an plug/slot attribute or similar as needed (or if not, it can be enabled the permanent plug/slot callback for the interface instead). Signed-off-by: Alex Murray <[email protected]> * interfaces/builtin/lxd-support: add an attr for unconfined mode The use of AppArmor unconfined mode requires a small amount of support in lxd itself, and so to ensure that we only use this when the lxd snap supports it, add a new interface attribute which the snap can set to specify that it has the required support and only enable this in the interface when that is present. Signed-off-by: Alex Murray <[email protected]> * interfaces/apparmor: check for error in unconfined mode unit test Signed-off-by: Alex Murray <[email protected]> * interfaces/apparmor: fixup comments documenting UnconfinedMode etc Signed-off-by: Alex Murray <[email protected]> * interfaces/builtin: test validation of attr in lxd-support Add a new unit test to check that the lxd-support interface validates the enable-unconfined-mode attribute as a boolean correctly. Signed-off-by: Alex Murray <[email protected]> * interfaces/builtin/lxd_support: clarify behaviour of unconfined mode Add some comments to clarify the behaviour and use of unconfined mode. Signed-off-by: Alex Murray <[email protected]> * interfaces/builtin/lxd_support: test unconfined mode enablement Signed-off-by: Alex Murray <[email protected]> * interfaces/builtin/lxd_support: explicitly ignore error Signed-off-by: Alex Murray <[email protected]> * interfaces/builtin/lxd_support: fixup gofmt in test Signed-off-by: Alex Murray <[email protected]> --------- Signed-off-by: Alex Murray <[email protected]>
- Loading branch information
1 parent
5d796f3
commit 1ebfd19
Showing
5 changed files
with
100 additions
and
12 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
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