aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-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()},