summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorPaul Buetow <pbuetow@mimecast.com>2020-03-06 18:48:13 +0000
committerPaul Buetow <pbuetow@mimecast.com>2020-03-06 18:48:13 +0000
commit427e5c14454804c28bd6fa2205bb4121f52c1fbd (patch)
tree6ba857b2184c3b09401845a6dff67224cfbe1417 /internal
parentdac4449cfb308819b5c44c3895d5a83228eeaf16 (diff)
parenta4f8e0926a1a6888cbab1cfd94229cf1cc5cba7d (diff)
merge master
Diffstat (limited to 'internal')
-rw-r--r--internal/config/common.go9
-rw-r--r--internal/server/server.go8
2 files changed, 10 insertions, 7 deletions
diff --git a/internal/config/common.go b/internal/config/common.go
index a09a3ad..103b390 100644
--- a/internal/config/common.go
+++ b/internal/config/common.go
@@ -10,9 +10,12 @@ type CommonConfig struct {
// stdout: only log to stdout (useful when used with systemd)
// daily: create a log file for every day
LogStrategy string
- LogDir string
- CacheDir string
- TmpDir string `json:",omitempty"`
+ // The log directory
+ LogDir string
+ // The cache directory
+ CacheDir string
+ // The temp directory
+ TmpDir string `json:",omitempty"`
}
// Create a new default configuration.
diff --git a/internal/server/server.go b/internal/server/server.go
index eb0cdd7..8e791c8 100644
--- a/internal/server/server.go
+++ b/internal/server/server.go
@@ -264,15 +264,15 @@ func (s *Server) schedueleUserCanHaveSSHSession(addr string, user *user.User, jo
continue
}
for _, myAddr := range job.AllowFrom {
- myIps, err := net.LookupIP(myAddr)
+ myIPs, err := net.LookupIP(myAddr)
if err != nil {
logger.Error(user, myAddr, err)
continue
}
- for _, myIp := range myIps {
- logger.Debug("schedueleUserCanHaveSSHSession", "Comparing IP addresses", ip, myIp.String())
- if ip == myIp.String() {
+ for _, myIP := range myIPs {
+ logger.Debug("schedueleUserCanHaveSSHSession", "Comparing IP addresses", ip, myIP.String())
+ if ip == myIP.String() {
return true
}
}