( allow_quoted && kind == TK_QDSTRING ) ) {
res[pos++] = sval;
res[pos] = NULL;
+ } else if ( kind == TK_RIGHTPAREN ) {
+ /* FIXME: be liberal in what we accept... */
+ parse_whsp(sp);
+ LDAP_FREE(res);
+ return NULL;
} else {
*code = LDAP_SCHERR_UNEXPTOKEN;
LDAP_FREE(sval);
mru->mru_applies_oids = parse_oids(&ss,
code,
flags);
- if ( !mru->mru_applies_oids ) {
+ if ( !mru->mru_applies_oids && *code != LDAP_SUCCESS ) {
*errp = ss;
ldap_matchingruleuse_free(mru);
return NULL;
oc->oc_sup_oids = parse_oids(&ss,
code,
flags);
- if ( !oc->oc_sup_oids ) {
+ if ( !oc->oc_sup_oids && *code != LDAP_SUCCESS ) {
*errp = ss;
ldap_objectclass_free(oc);
return NULL;
}
seen_must = 1;
oc->oc_at_oids_must = parse_oids(&ss,code,0);
- if ( !oc->oc_at_oids_must ) {
+ if ( !oc->oc_at_oids_must && *code != LDAP_SUCCESS ) {
*errp = ss;
ldap_objectclass_free(oc);
return NULL;
}
seen_may = 1;
oc->oc_at_oids_may = parse_oids(&ss,code,0);
- if ( !oc->oc_at_oids_may ) {
+ if ( !oc->oc_at_oids_may && *code != LDAP_SUCCESS ) {
*errp = ss;
ldap_objectclass_free(oc);
return NULL;
}
seen_must = 1;
cr->cr_at_oids_must = parse_oids(&ss,code,0);
- if ( !cr->cr_at_oids_must ) {
+ if ( !cr->cr_at_oids_must && *code != LDAP_SUCCESS ) {
*errp = ss;
ldap_contentrule_free(cr);
return NULL;
}
seen_may = 1;
cr->cr_at_oids_may = parse_oids(&ss,code,0);
- if ( !cr->cr_at_oids_may ) {
+ if ( !cr->cr_at_oids_may && *code != LDAP_SUCCESS ) {
*errp = ss;
ldap_contentrule_free(cr);
return NULL;
}
seen_not = 1;
cr->cr_at_oids_not = parse_oids(&ss,code,0);
- if ( !cr->cr_at_oids_not ) {
+ if ( !cr->cr_at_oids_not && *code != LDAP_SUCCESS ) {
*errp = ss;
ldap_contentrule_free(cr);
return NULL;
}
seen_must = 1;
nf->nf_at_oids_must = parse_oids(&ss,code,0);
- if ( !nf->nf_at_oids_must ) {
+ if ( !nf->nf_at_oids_must && *code != LDAP_SUCCESS ) {
*errp = ss;
ldap_nameform_free(nf);
return NULL;
}
seen_may = 1;
nf->nf_at_oids_may = parse_oids(&ss,code,0);
- if ( !nf->nf_at_oids_may ) {
+ if ( !nf->nf_at_oids_may && *code != LDAP_SUCCESS ) {
*errp = ss;
ldap_nameform_free(nf);
return NULL;