fix: sec was not used

This commit is contained in:
Derrick Hammer 2024-01-15 23:15:57 -05:00
parent b2d863d466
commit e40111a276
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 2 additions and 2 deletions

View File

@ -75,8 +75,8 @@ func (a *PolicyAdapter) AddPolicy(sec string, ptype string, rule []string) error
a.lock.Lock()
defer a.lock.Unlock()
// Create a line representing the policy rule
line := ptype + ", " + strings.Join(rule, ", ")
// Create a line representing the policy rule with the section
line := sec + ", " + ptype + ", " + strings.Join(rule, ", ")
// Check if the policy rule already exists
for _, existingLine := range a.policy {