for ( i = 0; aoc->a_vals[i] != NULL; i++ ) {
if ( (oc = oc_find( aoc->a_vals[i]->bv_val )) == NULL ) {
Debug( LDAP_DEBUG_ANY,
- "Objectclass \"%s\" not defined",
+ "Objectclass \"%s\" not defined\n",
aoc->a_vals[i]->bv_val, 0, 0 );
}
else
"supportedControl",
"supportedSASLMechanisms",
"supportedLDAPversion",
+ "supportedACIMechanisms",
"subschemaSubentry", /* NO USER MOD */
NULL
AttributeType *at;
int i, j;
char **pp;
+ char *p, *t;
Debug( LDAP_DEBUG_TRACE,
"oc_check_allowed type \"%s\"\n", type, 0, 0 );
return( 0 );
}
+ /*
+ * The "type" we have received is actually an AttributeDescription.
+ * Let's find out the corresponding type.
+ */
+ p = strchr( type, ';' );
+ if ( p ) {
+ t = ch_malloc( p-type+1 );
+ strncpy( t, type, p-type );
+ t[p-type] = '\0';
+ Debug( LDAP_DEBUG_TRACE,
+ "oc_check_allowed type \"%s\" from \"%s\"\n",
+ t, type, 0 );
+
+ } else {
+ t = type;
+ }
+
/* check that the type appears as req or opt in at least one oc */
for ( i = 0; ocl[i] != NULL; i++ ) {
/* if we know about the oc */
oc->soc_required[j] != NULL; j++ ) {
at = oc->soc_required[j];
if ( at->sat_oid &&
- strcmp(at->sat_oid, type ) == 0 ) {
+ strcmp(at->sat_oid, t ) == 0 ) {
+ if ( t != type )
+ ldap_memfree( t );
return( 0 );
}
pp = at->sat_names;
if ( pp == NULL )
continue;
while ( *pp ) {
- if ( strcasecmp( *pp, type ) == 0 ) {
+ if ( strcasecmp( *pp, t ) == 0 ) {
+ if ( t != type )
+ ldap_memfree( t );
return( 0 );
}
pp++;
oc->soc_allowed[j] != NULL; j++ ) {
at = oc->soc_allowed[j];
if ( at->sat_oid &&
- strcmp(at->sat_oid, type ) == 0 ) {
+ strcmp( at->sat_oid, t ) == 0 ) {
+ if ( t != type )
+ ldap_memfree( t );
return( 0 );
}
pp = at->sat_names;
if ( pp == NULL )
continue;
while ( *pp ) {
- if ( strcasecmp( *pp, type ) == 0 ||
+ if ( strcasecmp( *pp, t ) == 0 ||
strcmp( *pp, "*" ) == 0 ) {
+ if ( t != type )
+ ldap_memfree( t );
return( 0 );
}
pp++;
}
/* maybe the next oc allows it */
+#ifdef OC_UNDEFINED_IMPLES_EXTENSIBLE
/* we don't know about the oc. assume it allows it */
} else {
+ if ( t != type )
+ ldap_memfree( t );
return( 0 );
+#endif
}
}
+ if ( t != type )
+ ldap_memfree( t );
/* not allowed by any oc */
return( 1 );
}
{"( 1.3.6.1.4.1.1466.115.121.1.25 DESC 'Guide' )", NULL},
{"( 1.3.6.1.4.1.1466.115.121.1.26 DESC 'IA5String' )", NULL},
{"( 1.3.6.1.4.1.1466.115.121.1.27 DESC 'Integer' )", NULL},
+ {"( 1.3.6.1.4.1.1466.115.121.1.28 DESC 'JPEG' )", NULL},
{"( 1.3.6.1.4.1.1466.115.121.1.30 DESC 'MatchingRuleDescription' )", NULL},
{"( 1.3.6.1.4.1.1466.115.121.1.31 DESC 'MatchingRuleUseDescription' )", NULL},
{"( 1.3.6.1.4.1.1466.115.121.1.32 DESC 'MailPreference' )", NULL},
e->e_attrs = NULL;
e->e_dn = ch_strdup( SLAPD_SCHEMA_DN );
e->e_ndn = ch_strdup( SLAPD_SCHEMA_DN );
- (void) dn_normalize_case( e->e_ndn );
+ (void) dn_normalize( e->e_ndn );
e->e_private = NULL;
{