Skip to content

Commit ecaab08

Browse files
committed
profiles/apparmor: remove use of aaparser.GetVersion()
commit 7008a51 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 <[email protected]>
1 parent c651a53 commit ecaab08

1 file changed

Lines changed: 2 additions & 12 deletions

File tree

profiles/apparmor/apparmor.go

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,8 @@ import (
1414
"github.com/docker/docker/pkg/aaparser"
1515
)
1616

17-
var (
18-
// profileDirectory is the file store for apparmor profiles and macros.
19-
profileDirectory = "/etc/apparmor.d"
20-
)
17+
// profileDirectory is the file store for apparmor profiles and macros.
18+
const profileDirectory = "/etc/apparmor.d"
2119

2220
// profileData holds information about the given profile for generation.
2321
type profileData struct {
@@ -29,8 +27,6 @@ type profileData struct {
2927
Imports []string
3028
// InnerImports defines the apparmor functions to import in the profile.
3129
InnerImports []string
32-
// Version is the {major, minor, patch} version of apparmor_parser as a single number.
33-
Version int
3430
}
3531

3632
// generateDefault creates an apparmor profile from ProfileData.
@@ -50,12 +46,6 @@ func (p *profileData) generateDefault(out io.Writer) error {
5046
p.InnerImports = append(p.InnerImports, "#include <abstractions/base>")
5147
}
5248

53-
ver, err := aaparser.GetVersion()
54-
if err != nil {
55-
return err
56-
}
57-
p.Version = ver
58-
5949
return compiled.Execute(out, p)
6050
}
6151

0 commit comments

Comments
 (0)