summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/apparmor/main.go16
-rw-r--r--contrib/apparmor/template.go2
2 files changed, 2 insertions, 16 deletions
diff --git a/contrib/apparmor/main.go b/contrib/apparmor/main.go
index f4a2978b86..d67890d265 100644
--- a/contrib/apparmor/main.go
+++ b/contrib/apparmor/main.go
@@ -6,13 +6,9 @@ import (
"os"
"path"
"text/template"
-
- "github.com/docker/docker/pkg/aaparser"
)
-type profileData struct {
- Version int
-}
+type profileData struct{}
func main() {
if len(os.Args) < 2 {
@@ -22,15 +18,6 @@ func main() {
// parse the arg
apparmorProfilePath := os.Args[1]
- version, err := aaparser.GetVersion()
- if err != nil {
- log.Fatal(err)
- }
- data := profileData{
- Version: version,
- }
- fmt.Printf("apparmor_parser is of version %+v\n", data)
-
// parse the template
compiled, err := template.New("apparmor_profile").Parse(dockerProfileTemplate)
if err != nil {
@@ -48,6 +35,7 @@ func main() {
}
defer f.Close()
+ data := profileData{}
if err := compiled.Execute(f, data); err != nil {
log.Fatalf("executing template failed: %v", err)
}
diff --git a/contrib/apparmor/template.go b/contrib/apparmor/template.go
index 4999ca5dc6..58afcbe845 100644
--- a/contrib/apparmor/template.go
+++ b/contrib/apparmor/template.go
@@ -149,9 +149,7 @@ profile /usr/bin/docker (attach_disconnected, complain) {
}
# xz works via pipes, so we do not need access to the filesystem.
profile /usr/bin/xz (complain) {
-{{if ge .Version 209000}}
signal (receive) peer=/usr/bin/docker,
-{{end}}
/etc/ld.so.cache r,
/lib/** rm,
/usr/bin/xz rm,