mirror of
https://github.com/token2/snapd.git
synced 2026-03-13 11:15:47 -07:00
Introduce interfaces.SecurityBackendOptions for passing Preseed mode flag to backends via Initialize(). Change maybeRestart to a method of snap manager.
This commit is contained in:
@@ -30,7 +30,6 @@ import (
|
||||
"github.com/snapcore/snapd/interfaces/seccomp"
|
||||
"github.com/snapcore/snapd/interfaces/systemd"
|
||||
"github.com/snapcore/snapd/interfaces/udev"
|
||||
"github.com/snapcore/snapd/release"
|
||||
apparmor_sandbox "github.com/snapcore/snapd/sandbox/apparmor"
|
||||
)
|
||||
|
||||
@@ -72,11 +71,7 @@ func backends() []interfaces.SecurityBackend {
|
||||
// profiles that keep applications operational, in forced-devmode.
|
||||
switch apparmor_sandbox.ProbedLevel() {
|
||||
case apparmor_sandbox.Partial, apparmor_sandbox.Full:
|
||||
aa := &apparmor.Backend{}
|
||||
if release.PreseedMode() {
|
||||
aa.SetPreseedMode()
|
||||
}
|
||||
all = append(all, aa)
|
||||
all = append(all, &apparmor.Backend{})
|
||||
}
|
||||
return all
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user