diff options
author | eisin <eisin@users.noreply.github.com> | 2018-12-24 17:41:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-24 17:41:48 +0100 |
commit | 64a67422d1925589be3595ed044921820d3b5df0 (patch) | |
tree | 30d165072a6585806e1750f7531076a1f1c40051 | |
parent | ldflags --hash-style=both (diff) | |
download | pamldapd-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 |
Diffstat (limited to '')
-rw-r--r-- | src/pamldapd.go | 3 |
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 { |