feat(aa): update parse definition to last changes.

This commit is contained in:
Alexandre Pujol 2024-06-19 23:24:43 +01:00
parent 163c5be61c
commit cd03640c10
No known key found for this signature in database
GPG Key ID: C5469996F0DF68EC
3 changed files with 3 additions and 3 deletions

View File

@ -153,7 +153,7 @@ func (f *AppArmorProfileFile) resolveInclude(include *Include) error {
if err != nil {
return err
}
if err := iFile.Parse(raw); err != nil {
if _, err := iFile.Parse(raw); err != nil {
return err
}
}

View File

@ -38,7 +38,7 @@ func (b Userspace) Apply(opt *Option, profile string) (string, error) {
}
f := aa.DefaultTunables()
if err := f.Parse(profile); err != nil {
if _, err := f.Parse(profile); err != nil {
return "", err
}
if err := f.Resolve(); err != nil {

View File

@ -42,7 +42,7 @@ func (d Exec) Apply(opt *Option, profileRaw string) (string, error) {
for name := range opt.ArgMap {
profiletoTransition := util.MustReadFile(cfg.RootApparmord.Join(name))
dstProfile := aa.DefaultTunables()
if err := dstProfile.Parse(profiletoTransition); err != nil {
if _, err := dstProfile.Parse(profiletoTransition); err != nil {
return "", err
}
if err := dstProfile.Resolve(); err != nil {