Add support for unidentified/system processes/profiles

This commit is contained in:
Daniel
2020-04-17 21:52:06 +02:00
parent 10ee7fd7db
commit 033dceab5b
16 changed files with 243 additions and 67 deletions

View File

@@ -23,7 +23,16 @@ func removeOpenDNSRequest(pid int, fqdn string) {
defer openDNSRequestsLock.Unlock()
key := strconv.Itoa(pid) + "/" + fqdn
delete(openDNSRequests, key)
_, ok := openDNSRequests[key]
if ok {
delete(openDNSRequests, key)
return
}
// check if there is an open dns request from an unidentified process
if pid >= 0 {
delete(openDNSRequests, "-1/"+fqdn)
}
}
// SaveOpenDNSRequest saves a dns request connection that was allowed to proceed.