feat(aa): handle appending value to defined variables.
This commit is contained in:
parent
264f30cf12
commit
7f1de3626e
4 changed files with 59 additions and 20 deletions
|
|
@ -42,8 +42,10 @@ 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()
|
||||
err := dstProfile.Parse(profiletoTransition)
|
||||
if err != nil {
|
||||
if err := dstProfile.Parse(profiletoTransition); err != nil {
|
||||
return "", err
|
||||
}
|
||||
if err := dstProfile.Resolve(); err != nil {
|
||||
return "", err
|
||||
}
|
||||
for _, variable := range dstProfile.Preamble.GetVariables() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue