diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-09-05 00:43:54 -0600 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-09-05 00:43:54 -0600 |
commit | 955e8e2dc4bd7865f2b21139d61424a168e5a041 (patch) | |
tree | 89c135b5531d5562b84d250c78dc1422e4c0becf /src/nshd/hackers_git/db_passwd.go | |
parent | 79f7c721b7275208bb2bef0fec87e1a732353b74 (diff) |
The way nslcd_proto's GenericGetNext was designed, nil checks didn't work
Diffstat (limited to 'src/nshd/hackers_git/db_passwd.go')
-rw-r--r-- | src/nshd/hackers_git/db_passwd.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/nshd/hackers_git/db_passwd.go b/src/nshd/hackers_git/db_passwd.go index 8aad45e..2cfaccd 100644 --- a/src/nshd/hackers_git/db_passwd.go +++ b/src/nshd/hackers_git/db_passwd.go @@ -60,8 +60,13 @@ func (e *allPasswdEnumerator) GetNext() (*p.Passwd, error) { return nil, nil } -func (e *allPasswdEnumerator) GenericGetNext() (interface{}, error) { - return e.GetNext() +func (o *allPasswdEnumerator) GenericGetNext() (n *interface{}, err error) { + a, err := o.GetNext() + if a != nil { + b := (interface{})(*a) + n = &b + } + return } func (o *Hackers) newAllPasswdEnumerator() *allPasswdEnumerator { |