Improve System DNS matching on Windows

This commit is contained in:
Daniel 2021-03-29 13:37:39 +02:00
parent 986e868c27
commit 3abaca1d90

View file

@ -59,7 +59,7 @@ func (p *Process) GetProfile(ctx context.Context) (changed bool, err error) {
switch runtime.GOOS {
case "windows":
if (p.Path == `C:\Windows\System32\svchost.exe` || p.Path == `C:\Windows\system32\svchost.exe`) &&
(strings.Contains(p.SpecialDetail, "Dnscache") || strings.Contains(p.CmdLine, "-k NetworkService")) {
(strings.Contains(p.SpecialDetail, "Dnscache") || strings.Contains(p.CmdLine, "-s Dnscache")) {
profileID = profile.SystemResolverProfileID
}
case "linux":