diff options
author | Sebastiaan van Stijn <github@gone.nl> | 2023-05-08 13:49:59 +0200 |
---|---|---|
committer | Sebastiaan van Stijn <github@gone.nl> | 2023-05-09 16:48:58 +0200 |
commit | e28bc0d271a2eeb66a5f768443ae43fc2535c537 (patch) | |
tree | 2ebad632c7111855620d2f8bc132a234d13becd0 | |
parent | d169a5730649e2661c48221f583f8f3c771c7c16 (diff) | |
download | docker-e28bc0d271a2eeb66a5f768443ae43fc2535c537.tar.gz |
profiles/apparmor: remove use of aaparser.GetVersion()
commit 7008a514493a83a1342f30afca6726ffea14f50f removed version-conditional
rules from the template, so we no longer need the apparmor_parser Version.
This patch removes the call to `aaparser.GetVersion()`
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit ecaab085db4b4a7a0ba5bbf224ec483aefa9ee09)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
-rw-r--r-- | profiles/apparmor/apparmor.go | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/profiles/apparmor/apparmor.go b/profiles/apparmor/apparmor.go index b3566b2f73..d0f2361605 100644 --- a/profiles/apparmor/apparmor.go +++ b/profiles/apparmor/apparmor.go @@ -14,10 +14,8 @@ import ( "github.com/docker/docker/pkg/aaparser" ) -var ( - // profileDirectory is the file store for apparmor profiles and macros. - profileDirectory = "/etc/apparmor.d" -) +// profileDirectory is the file store for apparmor profiles and macros. +const profileDirectory = "/etc/apparmor.d" // profileData holds information about the given profile for generation. type profileData struct { @@ -29,8 +27,6 @@ type profileData struct { Imports []string // InnerImports defines the apparmor functions to import in the profile. InnerImports []string - // Version is the {major, minor, patch} version of apparmor_parser as a single number. - Version int } // generateDefault creates an apparmor profile from ProfileData. @@ -50,12 +46,6 @@ func (p *profileData) generateDefault(out io.Writer) error { p.InnerImports = append(p.InnerImports, "#include <abstractions/base>") } - ver, err := aaparser.GetVersion() - if err != nil { - return err - } - p.Version = ver - return compiled.Execute(out, p) } |