reload default apparmor profile if it is unloaded
Signed-off-by: Xianglin Gao <xlgao@zju.edu.cn>
This commit is contained in:
parent
8547c0dbd9
commit
cb5ed1ce9d
8 changed files with 95 additions and 48 deletions
|
@ -393,6 +393,11 @@ func (s *Server) getAppArmorProfileName(annotations map[string]string, ctrName s
|
|||
}
|
||||
|
||||
if profile == apparmor.ProfileRuntimeDefault {
|
||||
// reload default apparmor profile if it is unloaded.
|
||||
if s.appArmorProfile == apparmor.DefaultApparmorProfile {
|
||||
apparmor.LoadDefaultAppArmorProfile()
|
||||
}
|
||||
|
||||
// If the value is runtime/default, then return default profile.
|
||||
return s.appArmorProfile
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue