aboutsummaryrefslogtreecommitdiff
path: root/ldapserver/client.go
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2021-07-07 01:49:33 +0200
committerQuentin Dufour <quentin@deuxfleurs.fr>2021-09-16 13:09:26 +0200
commit563fc272a36c8be317fbe95c8308ca2dfa29c3aa (patch)
tree0b6f9a6a15516e7234fc928ecbebbd32d3154074 /ldapserver/client.go
parentaa912b5ceb24cb8772709171ea9589b0771bbe54 (diff)
downloadbottin-563fc272a36c8be317fbe95c8308ca2dfa29c3aa.tar.gz
bottin-563fc272a36c8be317fbe95c8308ca2dfa29c3aa.zip
Vendor goldap, fix ASN.1 BER integer and length encoding
- Add tests for goldap to prevent regressions - Disable reconnection for our functional tests
Diffstat (limited to 'ldapserver/client.go')
-rw-r--r--ldapserver/client.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/ldapserver/client.go b/ldapserver/client.go
index 91a5980..3674ba4 100644
--- a/ldapserver/client.go
+++ b/ldapserver/client.go
@@ -6,7 +6,7 @@ import (
"sync"
"time"
- ldap "github.com/lor00x/goldap/message"
+ ldap "bottin/goldap"
)
type UserState interface{}
@@ -206,10 +206,14 @@ func (c *client) close() {
}
func (c *client) writeMessage(m *ldap.LDAPMessage) {
- data, _ := m.Write()
+ data, err := m.Write()
+ if err != nil {
+ Logger.Errorf("bottin: unable to marshal response message: %v", err)
+ }
//Logger.Printf(">>> %d - %s - hex=%x", c.Numero, m.ProtocolOpName(), data.Bytes())
Logger.Tracef(">>> [%d] %#v", c.Numero, m)
+ Logger.Tracef("%v", data.Bytes())
c.bw.Write(data.Bytes())
c.bw.Flush()