-
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.
cmd/snap-confine, interfaces/udev: device cgroup support for non-stri…
…ct confinement (#13777) * interfaces/udev: add non-strict flag to snap cgroup device file Add a non-strict=true flag to the snap's cgroup device file, to inform snap-confine that the snap was indeed installed in a non-strict confinement mode (eg. devmode, or classic). This supplements an earlier mechanism in which snapd would not generate any rules tagging devices for a specific snap and can be used as an explicit indicator to avoid mandatory device cgroup even when using bare or core24 and later bases (as well as custom base snaps). Signed-off-by: Maciej Borzecki <[email protected]> * cmd/snap-confine: account for non-strict confinement when setting up device cgroup Snaps may be installed in a non-strict confinement mode. In which case, expect an explicit non-strict=true in the per snap /var/lib/snapd/cgroup/snap.*.file. This replaces an earlier mechanism of implicit non-strict confinement when no devices are assigned to the snap. Signed-off-by: Maciej Borzecki <[email protected]> * tests/main/security-device-cgroups-required-or-optional: update to check non-strict confinement Update the test to check that --devmode results in a non-strict confinement device cgroup setup. Signed-off-by: Maciej Borzecki <[email protected]> --------- Signed-off-by: Maciej Borzecki <[email protected]>
- Loading branch information
Showing
4 changed files
with
94 additions
and
19 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