}
tmp->a_type = ch_strdup( a->a_type );
-#ifdef SLAPD_SCHEMA_NOT_COMPAT
- tmp->a_at = a->a_at;
-#else
+#ifdef SLAPD_SCHEMA_COMPAT
tmp->a_syntax = a->a_syntax;
#endif
tmp->a_next = NULL;
const char *name
)
{
- struct aindexrec *air = NULL;
- char *p, *tmpname = NULL;
+ struct aindexrec *air;
+ char *tmpname;
+#ifdef SLAPD_SCHEMA_COMPAT
/*
* The name may actually be an AttributeDescription, i.e. it may
- * contain options. Let's deal with it.
+ * contain options.
*/
- p = strchr( name, ';' );
+ /* Treat any attribute type with option as an unknown attribute type */
+ char *p = strchr( name, ';' );
if ( p ) {
tmpname = ch_malloc( p-name+1 );
strncpy( tmpname, name, p-name );
tmpname[p-name] = '\0';
- } else {
+ } else
+#endif
+ {
tmpname = (char *)name;
}
send_ldap_result( conn, op, rc = LDAP_UNWILLING_TO_PERFORM,
NULL, "Function not implemented", NULL, NULL );
}
+
cleanup:
free( dn );
free( ndn );
int
oc_check_op_attr( const char *type )
{
-#ifdef SLAPD_SCHEMA_COMPAT
+#ifndef SLAPD_SCHEMA_NOT_COMPAT
return charray_inlist( oc_op_attrs, type )
|| charray_inlist( oc_op_usermod_attrs, type )
|| charray_inlist( oc_op_no_usermod_attrs, type );
if( at == NULL ) return 0;
- return at->sat_usage != 0;
+ return at->sat_usage != LDAP_SCHEMA_USER_APPLICATIONS;
#endif
}
return( 0 );
}
+#ifdef SLAPD_SCHEMA_COMPAT
+ /* Treat any attribute type with option as an unknown attribute type */
/*
* The "type" we have received is actually an AttributeDescription.
* Let's find out the corresponding type.
"oc_check_allowed type \"%s\" from \"%s\"\n",
t, type, 0 );
- } else {
+ } else
+#endif
+ {
t = type;
}
+
/*
* All operational attributions are allowed by schema rules.
*/
typedef struct slap_attr {
char *a_type; /* description */
struct berval **a_vals;
-#ifdef SLAPD_SCHEMA_NOT_COMPAT
- AttributeType *a_at; /* attribute type */
-#else
+#ifdef SLAPD_SCHEMA_COMPAT
int a_syntax;
#endif
struct slap_attr *a_next;