summaryrefslogtreecommitdiff
path: root/src/nshd/hackers_git/db_shadow.go
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2015-09-05 00:43:54 -0600
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-09-05 00:43:54 -0600
commit955e8e2dc4bd7865f2b21139d61424a168e5a041 (patch)
tree89c135b5531d5562b84d250c78dc1422e4c0becf /src/nshd/hackers_git/db_shadow.go
parent79f7c721b7275208bb2bef0fec87e1a732353b74 (diff)
The way nslcd_proto's GenericGetNext was designed, nil checks didn't work
Diffstat (limited to 'src/nshd/hackers_git/db_shadow.go')
-rw-r--r--src/nshd/hackers_git/db_shadow.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/nshd/hackers_git/db_shadow.go b/src/nshd/hackers_git/db_shadow.go
index 468f79d..97af6e9 100644
--- a/src/nshd/hackers_git/db_shadow.go
+++ b/src/nshd/hackers_git/db_shadow.go
@@ -59,8 +59,13 @@ func (e *allShadowEnumerator) GetNext() (*p.Shadow, error) {
return nil, nil
}
-func (e *allShadowEnumerator) GenericGetNext() (interface{}, error) {
- return e.GetNext()
+func (o *allShadowEnumerator) GenericGetNext() (n *interface{}, err error) {
+ a, err := o.GetNext()
+ if a != nil {
+ b := (interface{})(*a)
+ n = &b
+ }
+ return
}
func (o *Hackers) newAllShadowEnumerator() *allShadowEnumerator {