summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreisin <eisin@users.noreply.github.com>2018-12-24 17:41:48 +0100
committerGitHub <noreply@github.com>2018-12-24 17:41:48 +0100
commit64a67422d1925589be3595ed044921820d3b5df0 (patch)
tree30d165072a6585806e1750f7531076a1f1c40051
parentldflags --hash-style=both (diff)
downloadpamldapd-64a67422d1925589be3595ed044921820d3b5df0.tar
pamldapd-64a67422d1925589be3595ed044921820d3b5df0.tar.gz
pamldapd-64a67422d1925589be3595ed044921820d3b5df0.tar.bz2
pamldapd-64a67422d1925589be3595ed044921820d3b5df0.tar.lz
pamldapd-64a67422d1925589be3595ed044921820d3b5df0.tar.xz
pamldapd-64a67422d1925589be3595ed044921820d3b5df0.tar.zst
pamldapd-64a67422d1925589be3595ed044921820d3b5df0.zip
-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 {