|
|
@ -52,13 +52,7 @@ func (r *Rule) getString(redact bool) string {
|
|
|
|
} else if r.rtype == RULE_ACTION_ALLOW_TLSONLY {
|
|
|
|
} else if r.rtype == RULE_ACTION_ALLOW_TLSONLY {
|
|
|
|
rtype = RuleActionString[RULE_ACTION_ALLOW_TLSONLY]
|
|
|
|
rtype = RuleActionString[RULE_ACTION_ALLOW_TLSONLY]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
rmode := ""
|
|
|
|
rmode := "|" + RuleModeString[r.mode]
|
|
|
|
if r.mode == RULE_MODE_SYSTEM {
|
|
|
|
|
|
|
|
rmode = "|" + RuleModeString[RULE_MODE_SYSTEM]
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if r.mode == RULE_MODE_PERMANENT {
|
|
|
|
|
|
|
|
rmode = "|" + RuleModeString[RULE_MODE_PERMANENT]
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protostr := ""
|
|
|
|
protostr := ""
|
|
|
|
|
|
|
|
|
|
|
@ -450,7 +444,7 @@ func savePolicy(f *os.File, p *Policy) {
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for _, r := range p.rules {
|
|
|
|
for _, r := range p.rules {
|
|
|
|
if r.mode != RULE_MODE_SESSION {
|
|
|
|
if r.mode == RULE_MODE_PERMANENT || r.mode == RULE_MODE_SYSTEM {
|
|
|
|
if !writeLine(f, r.String()) {
|
|
|
|
if !writeLine(f, r.String()) {
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|