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 return err
} }
pair, _, err := server.kv.Get(path+"/attribute=objectClass", nil) pair, _, err := server.kv.Get(path+"/attribute="+ATTR_OBJECTCLASS, nil)
if err != nil { if err != nil {
return err return err
} }
@ -275,8 +275,8 @@ func (server *Server) init() error {
} }
base_attributes := Entry{ base_attributes := Entry{
"objectClass": []string{"top", "dcObject", "organization"}, ATTR_OBJECTCLASS: []string{"top", "dcObject", "organization"},
"structuralObjectClass": []string{"organization"}, "structuralobjectclass": []string{"organization"},
ATTR_CREATORSNAME: []string{server.config.Suffix}, ATTR_CREATORSNAME: []string{server.config.Suffix},
ATTR_CREATETIMESTAMP: []string{genTimestamp()}, ATTR_CREATETIMESTAMP: []string{genTimestamp()},
ATTR_ENTRYUUID: []string{genUuid()}, ATTR_ENTRYUUID: []string{genUuid()},
@ -302,11 +302,11 @@ func (server *Server) init() error {
admin_dn := "cn=admin," + server.config.Suffix admin_dn := "cn=admin," + server.config.Suffix
admin_attributes := Entry{ admin_attributes := Entry{
"objectClass": []string{"simpleSecurityObject", "organizationalRole"}, ATTR_OBJECTCLASS: []string{"simpleSecurityObject", "organizationalRole"},
"displayname": []string{"LDAP administrator"}, "displayname": []string{"LDAP administrator"},
"description": []string{"Administrator account automatically created by Bottin"}, "description": []string{"Administrator account automatically created by Bottin"},
"cn": []string{"admin"}, "cn": []string{"admin"},
"structuralObjectClass": []string{"organizationalRole"}, "structuralobjectclass": []string{"organizationalRole"},
ATTR_USERPASSWORD: []string{admin_pass_hash}, ATTR_USERPASSWORD: []string{admin_pass_hash},
ATTR_CREATORSNAME: []string{server.config.Suffix}, ATTR_CREATORSNAME: []string{server.config.Suffix},
ATTR_CREATETIMESTAMP: []string{genTimestamp()}, ATTR_CREATETIMESTAMP: []string{genTimestamp()},