shw-merge
xSmurf 7 years ago
commit e5dd1cb538

1
.gitignore vendored

@ -1,3 +1,4 @@
*.iml *.iml
.idea/ .idea/
*~ *~
*.swp

19
TODO

@ -0,0 +1,19 @@
fw-daemon:
pc.socks() and getOptString() return overlapping information
remove all stale references to SANDBOX: rules/policyForPathAndSandbox()
fw-prompt:
scope returned by new rules is bad (always set to process)
Each duplicate prompt needs to be expandable into individual items
gnome-shell:
Start using new async DBus methods
new go-procsnitch vendor package changes should be pushed into main project

@ -47,13 +47,10 @@ func (r *Rule) String() string {
func (r *Rule) getString(redact bool) string { func (r *Rule) getString(redact bool) string {
rtype := RuleActionString[RULE_ACTION_DENY] rtype := RuleActionString[RULE_ACTION_DENY]
if r.rtype == RULE_ACTION_ALLOW { if r.rtype == RULE_ACTION_ALLOW || r.rtype == RULE_ACTION_ALLOW_TLSONLY {
rtype = RuleActionString[RULE_ACTION_ALLOW] rtype = RuleActionString[r.rtype]
} else if r.rtype == RULE_ACTION_ALLOW_TLSONLY {
rtype = RuleActionString[RULE_ACTION_ALLOW_TLSONLY]
} }
rmode := "|" + RuleModeString[r.mode] rmode := "|" + RuleModeString[r.mode]
protostr := "" protostr := ""
if r.proto != "tcp" { if r.proto != "tcp" {
@ -258,17 +255,17 @@ func (r *Rule) parse(s string) bool {
} else if parts[2] == "PERMANENT" { } else if parts[2] == "PERMANENT" {
r.mode = RULE_MODE_PERMANENT r.mode = RULE_MODE_PERMANENT
} else if parts[2] != "" { } else if parts[2] != "" {
log.Notice("invalid rule mode ", parts[2], " in line ", s) log.Warning("Error: invalid rule mode ", parts[2], " in line ", s)
return false return false
} }
if !r.parsePrivs(parts[3]) { if !r.parsePrivs(parts[3]) {
log.Notice("invalid privs ", parts[3], " in line ", s) log.Warning("Error: invalid privs ", parts[3], " in line ", s)
return false return false
} }
if !r.parseSandbox(parts[4]) { if !r.parseSandbox(parts[4]) {
log.Notice("invalid sandbox ", parts[4], "in line ", s) log.Warning("invalid sandbox ", parts[4], "in line ", s)
return false return false
} }

Loading…
Cancel
Save