aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-02-14 21:26:43 +0100
committerAlex Auvolat <alex@adnab.me>2020-02-14 21:26:43 +0100
commitafcad41e8532a307875067d72a2b68b476988007 (patch)
tree809de32bb0d1c155d911e68e026ce3a32f1b6e95
parentfd6a555216c82ac00f269c3ca3b7ab9b5d5184f0 (diff)
downloadbottin-afcad41e8532a307875067d72a2b68b476988007.tar.gz
bottin-afcad41e8532a307875067d72a2b68b476988007.zip
Use lowercase attributes objectclass and structuralobjectclass
-rw-r--r--main.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/main.go b/main.go
index 70fad65..9de5f3a 100644
--- a/main.go
+++ b/main.go
@@ -265,7 +265,7 @@ func (server *Server) init() error {
return err
}
- pair, _, err := server.kv.Get(path+"/attribute=objectClass", nil)
+ pair, _, err := server.kv.Get(path+"/attribute="+ATTR_OBJECTCLASS, nil)
if err != nil {
return err
}
@@ -275,8 +275,8 @@ func (server *Server) init() error {
}
base_attributes := Entry{
- "objectClass": []string{"top", "dcObject", "organization"},
- "structuralObjectClass": []string{"organization"},
+ ATTR_OBJECTCLASS: []string{"top", "dcObject", "organization"},
+ "structuralobjectclass": []string{"organization"},
ATTR_CREATORSNAME: []string{server.config.Suffix},
ATTR_CREATETIMESTAMP: []string{genTimestamp()},
ATTR_ENTRYUUID: []string{genUuid()},
@@ -302,11 +302,11 @@ func (server *Server) init() error {
admin_dn := "cn=admin," + server.config.Suffix
admin_attributes := Entry{
- "objectClass": []string{"simpleSecurityObject", "organizationalRole"},
+ ATTR_OBJECTCLASS: []string{"simpleSecurityObject", "organizationalRole"},
"displayname": []string{"LDAP administrator"},
"description": []string{"Administrator account automatically created by Bottin"},
"cn": []string{"admin"},
- "structuralObjectClass": []string{"organizationalRole"},
+ "structuralobjectclass": []string{"organizationalRole"},
ATTR_USERPASSWORD: []string{admin_pass_hash},
ATTR_CREATORSNAME: []string{server.config.Suffix},
ATTR_CREATETIMESTAMP: []string{genTimestamp()},