|
@@ -12,6 +12,7 @@ import (
|
|
"syscall"
|
|
"syscall"
|
|
|
|
|
|
"github.com/docker/libcontainer"
|
|
"github.com/docker/libcontainer"
|
|
|
|
+ "github.com/docker/libcontainer/apparmor"
|
|
"github.com/docker/libcontainer/cgroups"
|
|
"github.com/docker/libcontainer/cgroups"
|
|
"github.com/docker/libcontainer/label"
|
|
"github.com/docker/libcontainer/label"
|
|
"github.com/docker/libcontainer/syncpipe"
|
|
"github.com/docker/libcontainer/syncpipe"
|
|
@@ -96,6 +97,10 @@ func FinalizeSetns(container *libcontainer.Config, args []string) error {
|
|
return err
|
|
return err
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if err := apparmor.ApplyProfile(container.AppArmorProfile); err != nil {
|
|
|
|
+ return fmt.Errorf("set apparmor profile %s: %s", container.AppArmorProfile, err)
|
|
|
|
+ }
|
|
|
|
+
|
|
if container.ProcessLabel != "" {
|
|
if container.ProcessLabel != "" {
|
|
if err := label.SetProcessLabel(container.ProcessLabel); err != nil {
|
|
if err := label.SetProcessLabel(container.ProcessLabel); err != nil {
|
|
return err
|
|
return err
|