aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/main.go b/main.go
index 381c3b5..5e9811d 100644
--- a/main.go
+++ b/main.go
@@ -359,7 +359,7 @@ func (server *Server) getAttribute(dn string, attr string) ([]string, error) {
}
if pair == nil {
- return nil, nil
+ return []string{}, nil
}
return parseValue(pair.Value)
@@ -448,9 +448,6 @@ func (server *Server) handleBindInternal(state *State, r *message.BindRequest) (
if err != nil {
return ldap.LDAPResultOperationsError, err
}
- if passwd == nil {
- return ldap.LDAPResultNoSuchObject, fmt.Errorf("%s has no password", string(r.Name()))
- }
for _, hash := range passwd {
valid := SSHAMatches(hash, []byte(r.AuthenticationSimple()))