/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 1998-2006 The OpenLDAP Foundation.
+ * Copyright 1998-2007 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
**sp != '$' &&
**sp != '\'' &&
/* for suggested minimum upper bound on the number
- * of characters <draft-ietf-ldapbis-syntaxes> */
+ * of characters (RFC 4517) */
**sp != '{' &&
**sp != '\0' )
(*sp)++;
seen_obsolete = 1;
nf->nf_obsolete = LDAP_SCHEMA_YES;
parse_whsp(&ss);
+ } else if ( !strcasecmp(sval,"OC") ) {
+ LDAP_FREE(sval);
+ if ( seen_class ) {
+ *code = LDAP_SCHERR_DUPOPT;
+ *errp = ss;
+ ldap_nameform_free(nf);
+ return(NULL);
+ }
+ seen_class = 1;
+ nf->nf_objectclass = parse_woid(&ss,code);
+ if ( !nf->nf_objectclass ) {
+ *errp = ss;
+ ldap_nameform_free(nf);
+ return NULL;
+ }
} else if ( !strcasecmp(sval,"MUST") ) {
LDAP_FREE(sval);
if ( seen_must ) {