fix: sec was not used
This commit is contained in:
parent
b2d863d466
commit
e40111a276
|
@ -75,8 +75,8 @@ func (a *PolicyAdapter) AddPolicy(sec string, ptype string, rule []string) error
|
||||||
a.lock.Lock()
|
a.lock.Lock()
|
||||||
defer a.lock.Unlock()
|
defer a.lock.Unlock()
|
||||||
|
|
||||||
// Create a line representing the policy rule
|
// Create a line representing the policy rule with the section
|
||||||
line := ptype + ", " + strings.Join(rule, ", ")
|
line := sec + ", " + ptype + ", " + strings.Join(rule, ", ")
|
||||||
|
|
||||||
// Check if the policy rule already exists
|
// Check if the policy rule already exists
|
||||||
for _, existingLine := range a.policy {
|
for _, existingLine := range a.policy {
|
||||||
|
|
Loading…
Reference in New Issue