diff options
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -205,6 +205,9 @@ func (server *Server) init() error { base_attributes := Entry{ "objectClass": []string{"top", "dcObject", "organization"}, "structuralObjectClass": []string{"Organization"}, + ATTR_CREATORSNAME: []string{server.config.Suffix}, + ATTR_CREATETIMESTAMP: []string{genTimestamp()}, + ATTR_ENTRYUUID: []string{genUuid()}, } suffix_dn, err := parseDN(server.config.Suffix) if err != nil { @@ -227,9 +230,11 @@ func (server *Server) init() error { "objectClass": []string{"simpleSecurityObject", "organizationalRole"}, "description": []string{"LDAP administrator"}, "cn": []string{"admin"}, - ATTR_USERPASSWORD: []string{admin_pass_hash}, "structuralObjectClass": []string{"organizationalRole"}, - "permissions": []string{"read", "write"}, + ATTR_USERPASSWORD: []string{admin_pass_hash}, + ATTR_CREATORSNAME: []string{server.config.Suffix}, + ATTR_CREATETIMESTAMP: []string{genTimestamp()}, + ATTR_ENTRYUUID: []string{genUuid()}, } err = server.addElements(admin_dn, admin_attributes) @@ -373,5 +378,3 @@ func (server *Server) handleBindInternal(state *State, r *message.BindRequest) ( } return ldap.LDAPResultInvalidCredentials, nil } - - |