summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ldap/servers/slapd/schema.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/ldap/servers/slapd/schema.c b/ldap/servers/slapd/schema.c
index e331a946..c2600f41 100644
--- a/ldap/servers/slapd/schema.c
+++ b/ldap/servers/slapd/schema.c
@@ -2896,7 +2896,7 @@ read_oc_ldif ( const char *input, struct objclass **oc, char *errorbuf,
* XXXmcs: Since we do not yet support multiple superior objectclasses, we
* just grab the first OID in a parenthesized list.
*/
- if ( NULL == ( pOcSup = get_tagged_oid( " SUP ( ", &nextinput,
+ if ( NULL == ( pOcSup = get_tagged_oid( " SUP (", &nextinput,
keyword_strstr_fn ))) {
pOcSup = get_tagged_oid( " SUP ", &nextinput, keyword_strstr_fn );
}
@@ -4332,10 +4332,15 @@ get_flag_keyword( const char *keyword, int flag_value, const char **inputp,
* The `strstr_fn' function pointer is used to search for `tag', e.g., it
* could be PL_strcasestr().
*
- * The string passed in `tag' MUST include a trailing space, e.g.,
+ * The string passed in `tag' SHOULD generally include a trailing space, e.g.,
*
* pSuperior = get_tagged_oid( "SUP ", &input, PL_strcasestr );
*
+ * The exception to this is when the tag contains '(' as a trailing character.
+ * This is used to process lists of oids, such as the following:
+ *
+ * SUP (inetOrgPerson $ testUser)
+ *
* A malloc'd string is returned if `tag; is found and NULL if not.
*/
static char *
@@ -4350,7 +4355,7 @@ get_tagged_oid( const char *tag, const char **inputp,
PR_ASSERT( NULL != tag );
PR_ASSERT( '\0' != tag[ 0 ] );
if('(' !=tag[0])
- PR_ASSERT( ' ' == tag[ strlen( tag ) - 1 ] );
+ PR_ASSERT((' ' == tag[ strlen( tag ) - 1 ]) || ('(' == tag[ strlen( tag ) - 1 ]));
if ( NULL == strstr_fn ) {
strstr_fn = PL_strcasestr;