]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/schemaparse.c
Modify ad_cmp() macro to support use as an ordering function.
[openldap] / servers / slapd / schemaparse.c
index 2fdbe3489161225b27243173be612f4b2615615c..1ae61e0b65922068918466f2d5a47227703e8b65 100644 (file)
@@ -101,9 +101,8 @@ parse_oc(
        LDAPObjectClass *oc;
        int             code;
        const char      *err;
-       char            *oid = NULL;
 
-       oc = ldap_str2objectclass(line,&code,&err,LDAP_SCHEMA_ALLOW_ALL);
+       oc = ldap_str2objectclass(line, &code, &err, LDAP_SCHEMA_ALLOW_ALL );
        if ( !oc ) {
                fprintf( stderr, "%s: line %d: %s before %s\n",
                         fname, lineno, ldap_scherr2str(code), err );
@@ -119,21 +118,6 @@ parse_oc(
                return 1;
        }
 
-       if ( !OID_LEADCHAR( oc->oc_oid[0] )) {
-               /* Expand OID macros */
-               oid = oidm_find( oc->oc_oid );
-               if ( !oid ) {
-                       fprintf( stderr,
-                               "%s: line %d: OID %s not recognized\n",
-                               fname, lineno, oc->oc_oid);
-                       return 1;
-               }
-               if ( oid != oc->oc_oid ) {
-                       ldap_memfree( oc->oc_oid );
-                       oc->oc_oid = oid;
-               }
-       }
-
        code = oc_add(oc,&err);
        if ( code ) {
                fprintf( stderr, "%s: line %d: %s: \"%s\"\n",
@@ -200,7 +184,6 @@ parse_at(
        LDAPAttributeType *at;
        int             code;
        const char      *err;
-       char            *oid = NULL;
 
        at = ldap_str2attributetype( line, &code, &err, LDAP_SCHEMA_ALLOW_ALL );
        if ( !at ) {
@@ -218,14 +201,12 @@ parse_at(
                return 1;
        }
 
-#if 0
        /* operational attributes should be defined internally */
        if ( at->at_usage ) {
                fprintf( stderr, "%s: line %d: attribute type \"%s\" is operational\n",
                         fname, lineno, at->at_oid );
                return 1;
        }
-#endif
 
        code = at_add(at,&err);
        if ( code ) {