summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nshd/hackers_git/db_passwd.go3
-rw-r--r--src/nshd/hackers_git/hackers.go1
2 files changed, 1 insertions, 3 deletions
diff --git a/src/nshd/hackers_git/db_passwd.go b/src/nshd/hackers_git/db_passwd.go
index 719ff3f..750e458 100644
--- a/src/nshd/hackers_git/db_passwd.go
+++ b/src/nshd/hackers_git/db_passwd.go
@@ -52,8 +52,7 @@ func (e *allPasswdEnumerator) GetNext() (*p.Passwd, error) {
passwd.PwHash = "x" // only put actual hashes in the Shadow DB
e.uids = e.uids[1:]
return &passwd, nil
- }
- if len(e.uids) == 0 && !e.done {
+ } else if !e.done {
e.done = true
e.backend.lock.RUnlock()
}
diff --git a/src/nshd/hackers_git/hackers.go b/src/nshd/hackers_git/hackers.go
index 9e3976b..446351d 100644
--- a/src/nshd/hackers_git/hackers.go
+++ b/src/nshd/hackers_git/hackers.go
@@ -55,7 +55,6 @@ func (o *Hackers) Close() {
logger.Info("Closing hackers.git session")
o.lock.Lock()
defer o.lock.Unlock()
-
o.close()
}