apparmor: write & load the profile on every start

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
This commit is contained in:
unclejack
2014-06-04 00:56:35 +03:00
parent 5aeb77296a
commit 1ef3ca83d8
2 changed files with 4 additions and 37 deletions
+3 -4
View File
@@ -21,9 +21,8 @@ import (
)
const (
DriverName = "native"
Version = "0.2"
BackupApparmorProfilePath = "apparmor/docker.back" // relative to docker root
DriverName = "native"
Version = "0.2"
)
func init() {
@@ -72,7 +71,7 @@ func NewDriver(root, initPath string) (*driver, error) {
}
// native driver root is at docker_root/execdriver/native. Put apparmor at docker_root
if err := apparmor.InstallDefaultProfile(filepath.Join(root, "../..", BackupApparmorProfilePath)); err != nil {
if err := apparmor.InstallDefaultProfile(); err != nil {
return nil, err
}