From 729080d46ae151261c034a8a850064cc6660fee6 Mon Sep 17 00:00:00 2001 From: "Guillaume J. Charmes" Date: Thu, 6 Mar 2014 12:04:51 -0800 Subject: [PATCH] Add buildflags to allow crosscompilation for apparmor Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes (github: creack) --- libcontainer/apparmor/apparmor.go | 2 ++ libcontainer/apparmor/apparmor_disabled.go | 13 +++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 libcontainer/apparmor/apparmor_disabled.go diff --git a/libcontainer/apparmor/apparmor.go b/libcontainer/apparmor/apparmor.go index c2954fd..d07c710 100644 --- a/libcontainer/apparmor/apparmor.go +++ b/libcontainer/apparmor/apparmor.go @@ -1,3 +1,5 @@ +// +build apparmor + package apparmor // #cgo LDFLAGS: -lapparmor diff --git a/libcontainer/apparmor/apparmor_disabled.go b/libcontainer/apparmor/apparmor_disabled.go new file mode 100644 index 0000000..489484f --- /dev/null +++ b/libcontainer/apparmor/apparmor_disabled.go @@ -0,0 +1,13 @@ +// +build !apparmor + +package apparmor + +import () + +func IsEnabled() bool { + return false +} + +func ApplyProfile(pid int, name string) error { + return nil +}