diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-09-07 23:58:08 -0600 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-09-07 23:58:08 -0600 |
commit | b09ba2f9f42c44402d0bd641789af9c04e6d4ee6 (patch) | |
tree | e10be24b4dd512996f20f36d82c74db782ef83b2 /src/nshd/hackers_git/db_passwd.go | |
parent | b6f1fcb4f2d3cfb1eea95e9e0c6ae11f0659ba3a (diff) |
clean up
Diffstat (limited to 'src/nshd/hackers_git/db_passwd.go')
-rw-r--r-- | src/nshd/hackers_git/db_passwd.go | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/nshd/hackers_git/db_passwd.go b/src/nshd/hackers_git/db_passwd.go index 2cfaccd..719ff3f 100644 --- a/src/nshd/hackers_git/db_passwd.go +++ b/src/nshd/hackers_git/db_passwd.go @@ -69,19 +69,16 @@ func (o *allPasswdEnumerator) GenericGetNext() (n *interface{}, err error) { return } -func (o *Hackers) newAllPasswdEnumerator() *allPasswdEnumerator { +func (o *Hackers) Passwd_All(cred p.Ucred, req p.Request_Passwd_All) p.Passwd_Enumerator { o.lock.RLock() e := allPasswdEnumerator{ uids: make([]int32, len(o.users)), backend: o, done: false, } + i := uint(0) for uid, _ := range o.users { - e.uids = append(e.uids, uid) + e.uids[i] = uid } return &e } - -func (o *Hackers) Passwd_All(cred p.Ucred, req p.Request_Passwd_All) p.Passwd_Enumerator { - return o.newAllPasswdEnumerator() -} |