From 755e0088c5b41d7d48e5bdcb3c9d2c7794d9b956 Mon Sep 17 00:00:00 2001 From: xSmurf Date: Tue, 12 Sep 2017 18:24:02 +0000 Subject: [PATCH] typo and fmt... --- sgfw/policy.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sgfw/policy.go b/sgfw/policy.go index 39e7c01..cdccb19 100644 --- a/sgfw/policy.go +++ b/sgfw/policy.go @@ -587,7 +587,7 @@ func GetRealRoot(pathname string, pid int) string { if lnk == "/" { return pathname } - + if strings.HasPrefix(pathname, 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" { res = procsnitch.LookupICMPSocketProcessAll(srcip, dstip, icode, rlines) } else { - fmt.Printf("unknown proto: %s",proto) + fmt.Printf("unknown proto: %s", proto) } 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.ExePath = GetRealRoot(res.ExePath, OzInitPids[i].Pid) break - } - else { + } else { fmt.Printf("Couldn't find sandbox name.\n") } }