Issue 8388 - broken schema after replacing objectClass
Summary: broken schema after replacing objectClass
Status: VERIFIED WONTFIX
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: 2.4.44
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-16 12:20 UTC by lessmian2@o2.pl
Modified: 2021-06-10 17:02 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description lessmian2@o2.pl 2016-03-16 12:20:48 UTC
Full_Name: Tomasz Leśniewski
Version: 2.4.44
OS: ubuntu
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (85.128.131.1)


accidentally i broke my openldap schema when i've changed one of objectClass
definitions. For example i have two objectClasses and one is a parent for
second:

olcObjectClasses: {0}( 1.2.3.4 NAME 'foo' DESC '' SUP top AUXILIARY X-ORIGIN
'user defined' )
olcObjectClasses: {1}( 1.2.3.5 NAME 'bar' DESC '' SUP foo AUXILIARY X-ORIGIN
'user defined' )

I've changed definition of foo - i've delete this object and (my mistake) put it
without any number at bottom of all classes:

dn: cn=config
changetype: modify
delete: olcObjectClasses
olcObjectClasses: {0}
-
add: olcObjectClasses
olcObjectClasses: ( 1.2.3.4 NAME 'foo' DESC '' SUP top AUXILIARY X-ORIGIN 'user
defined' )

So i have now class bar at top of schema and foo at bottom. After restart slapd
won't start. Slapcat says:

56d4678f olcObjectClasses: value #5 olcObjectClasses: ObjectClass not found:
"foo"
56d4678f config error processing cn=config: olcObjectClasses: ObjectClass not
found: "foo"
slapcat: bad configuration file! 

Should slapd allow to make something that could break schema? I thought that
there are some constraints that not allow to remove objectClass which is parent
for another class.
Comment 1 Quanah Gibson-Mount 2021-06-10 17:02:35 UTC
Should be fixable via slapdmodify with 2.5+