From fc5477dec17de5b52c7db1e02a474a8631dc82de Mon Sep 17 00:00:00 2001 From: Noriko Hosoi Date: Jun 21 2011 17:03:45 +0000 Subject: Bug 706179 - DS can not restart after create a new objectClass has entryusn attribute https://bugzilla.redhat.com/show_bug.cgi?id=706179 Description: entryusn used to be dynamically added in the backend init, which occurred after the schema initialization. And it made the server's start-up fail when an objectclass contains entryusn as its attribute type. This patch adds entryusn to the schema file. (cherry picked from commit 9cd075204d7d81a85835b5a42452c8467b0f3594) --- diff --git a/ldap/schema/01core389.ldif b/ldap/schema/01core389.ldif index 95607fc..07b3f74 100644 --- a/ldap/schema/01core389.ldif +++ b/ldap/schema/01core389.ldif @@ -125,6 +125,7 @@ attributeTypes: ( nsSSLActivation-oid NAME 'nsSSLActivation' DESC 'Netscape defi attributeTypes: ( 2.16.840.1.113730.3.1.2091 NAME 'nsslapd-suffix' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 X-ORIGIN 'Netscape' ) attributeTypes: ( 2.16.840.1.113730.3.1.2092 NAME 'nsslapd-ldapiautodnsuffix' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 X-ORIGIN 'Netscape' ) attributeTypes: ( 2.16.840.1.113730.3.1.2095 NAME 'connection' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape' ) +attributeTypes: ( 2.16.840.1.113730.3.1.2096 NAME 'entryusn' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE NO-USER-MODIFICATION USAGE directoryOperation X-ORIGIN 'Netscape' ) # # objectclasses # diff --git a/ldap/servers/slapd/back-ldbm/init.c b/ldap/servers/slapd/back-ldbm/init.c index c645444..f07f806 100644 --- a/ldap/servers/slapd/back-ldbm/init.c +++ b/ldap/servers/slapd/back-ldbm/init.c @@ -85,10 +85,6 @@ ldbm_back_add_schema( Slapi_PBlock *pb ) LDBM_ENTRYID_OID, DIRSTRING_SYNTAX_OID, CASEIGNOREMATCH_NAME, SLAPI_ATTR_FLAG_SINGLE ); - rc |= add_ldbm_internal_attr_syntax( SLAPI_ATTR_ENTRYUSN, - LDBM_ENTRYUSN_OID, INTEGER_SYNTAX_OID, INTFIRSTCOMPMATCH_NAME, - SLAPI_ATTR_FLAG_SINGLE|SLAPI_ATTR_FLAG_NOUSERMOD ); - return rc; }