summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pamldapd.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pamldapd.go b/src/pamldapd.go
index 9715ca1..e90b646 100644
--- a/src/pamldapd.go
+++ b/src/pamldapd.go
@@ -131,6 +131,9 @@ func (b Backend) Search(bindDN string, req ldap.SearchRequest, conn net.Conn) (r
return ldap.ServerSearchResult{ResultCode: ldap.LDAPResultOperationsError}, err
}
}
+ if req.BaseDN == "" {
+ return ldap.ServerSearchResult{make([]*ldap.Entry, 0), []string{}, []ldap.Control{}, ldap.LDAPResultSuccess}, nil
+ }
var entry *ldap.Entry
if filterObjectClass == "posixaccount" || filterObjectClass == "" {
if entry, err = b.makeSearchEntryAccount("cn="+username+","+b.PeopleDN, username); err != nil {