aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-02-01 15:09:09 +0100
committerAlex Auvolat <alex@adnab.me>2020-02-01 15:09:09 +0100
commite8ce6e33e59b37bdf441e6294d8b28ccdaee5879 (patch)
tree1f60cd37dd742ea8f2d4a2f669020d420b85251c
parentda2c37bb955bbdfceb95bbcc48e1267716152804 (diff)
downloadbottin-e8ce6e33e59b37bdf441e6294d8b28ccdaee5879.tar.gz
bottin-e8ce6e33e59b37bdf441e6294d8b28ccdaee5879.zip
Something that actually works
-rw-r--r--bottin.hcl.example2
-rw-r--r--ldapserver/packet.go3
-rw-r--r--write.go2
3 files changed, 4 insertions, 3 deletions
diff --git a/bottin.hcl.example b/bottin.hcl.example
index d10394b..8305a01 100644
--- a/bottin.hcl.example
+++ b/bottin.hcl.example
@@ -12,7 +12,7 @@ job "directory" {
task "server" {
driver = "docker"
config {
- image = "lxpz/bottin_amd64:3"
+ image = "lxpz/bottin_amd64:4"
readonly_rootfs = true
port_map {
ldap_port = 389
diff --git a/ldapserver/packet.go b/ldapserver/packet.go
index bd0f6e5..a87035c 100644
--- a/ldapserver/packet.go
+++ b/ldapserver/packet.go
@@ -86,7 +86,8 @@ func readTagAndLength(conn *bufio.Reader, bytes *[]byte) (ret ldap.TagAndLength,
// }
// We are expecting the LDAP sequence tag 0x30 as first byte
if b != 0x30 {
- return nil, fmt.Errorf("Expecting 0x30 as first byte, but got %#x instead", b)
+ err = fmt.Errorf("Expecting 0x30 as first byte, but got %#x instead", b)
+ return
}
b, err = readBytes(conn, bytes, 1)
diff --git a/write.go b/write.go
index 492ac99..4da1a53 100644
--- a/write.go
+++ b/write.go
@@ -337,7 +337,7 @@ func (server *Server) handleModifyInternal(state *State, r *message.ModifyReques
continue
}
if itemDN != dn {
- logger.Fatal("itemDN != dn in handleModifyInternal")
+ server.logger.Fatal("itemDN != dn in handleModifyInternal")
}
vals, err := parseValue(item.Value)
if err != nil {