profiles/apparmor: remove use of aaparser.GetVersion()
commit 7008a51449
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>
This commit is contained in:
parent
c651a53558
commit
ecaab085db
1 changed files with 2 additions and 12 deletions
|
@ -14,10 +14,8 @@ import (
|
||||||
"github.com/docker/docker/pkg/aaparser"
|
"github.com/docker/docker/pkg/aaparser"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
// profileDirectory is the file store for apparmor profiles and macros.
|
||||||
// profileDirectory is the file store for apparmor profiles and macros.
|
const profileDirectory = "/etc/apparmor.d"
|
||||||
profileDirectory = "/etc/apparmor.d"
|
|
||||||
)
|
|
||||||
|
|
||||||
// profileData holds information about the given profile for generation.
|
// profileData holds information about the given profile for generation.
|
||||||
type profileData struct {
|
type profileData struct {
|
||||||
|
@ -29,8 +27,6 @@ type profileData struct {
|
||||||
Imports []string
|
Imports []string
|
||||||
// InnerImports defines the apparmor functions to import in the profile.
|
// InnerImports defines the apparmor functions to import in the profile.
|
||||||
InnerImports []string
|
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.
|
// 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>")
|
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)
|
return compiled.Execute(out, p)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue