Use lowercase attributes objectclass and structuralobjectclass

This commit is contained in:
Alex 2020-02-14 21:26:43 +01:00
parent fd6a555216
commit afcad41e85

10
main.go
View file

@ -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()},