typo and fmt...

shw-merge
xSmurf 7 years ago
parent 6e6e265fae
commit 755e0088c5

@ -587,7 +587,7 @@ func GetRealRoot(pathname string, pid int) string {
if lnk == "/" { if lnk == "/" {
return pathname return pathname
} }
if strings.HasPrefix(pathname, lnk) { if strings.HasPrefix(pathname, lnk) {
return pathname[len(lnk):] return pathname[len(lnk):]
} }
@ -638,7 +638,7 @@ func LookupSandboxProc(srcip net.IP, srcp uint16, dstip net.IP, dstp uint16, pro
} else if proto == "icmp" { } else if proto == "icmp" {
res = procsnitch.LookupICMPSocketProcessAll(srcip, dstip, icode, rlines) res = procsnitch.LookupICMPSocketProcessAll(srcip, dstip, icode, rlines)
} else { } else {
fmt.Printf("unknown proto: %s",proto) fmt.Printf("unknown proto: %s", proto)
} }
if res != nil { if res != nil {
@ -646,8 +646,7 @@ func LookupSandboxProc(srcip net.IP, srcp uint16, dstip net.IP, dstp uint16, pro
res.Sandbox = OzInitPids[i].Name res.Sandbox = OzInitPids[i].Name
res.ExePath = GetRealRoot(res.ExePath, OzInitPids[i].Pid) res.ExePath = GetRealRoot(res.ExePath, OzInitPids[i].Pid)
break break
} } else {
else {
fmt.Printf("Couldn't find sandbox name.\n") fmt.Printf("Couldn't find sandbox name.\n")
} }
} }

Loading…
Cancel
Save