options can be overridden in a backend (for options that appear more
than once, the last appearance in the
.B slapd.conf
-file is used). Blank lines and comment lines beginning with a `#'
-character are ignored. If a line begins with white space, it is
-considered a continuation of the previous line.
+file is used).
+.LP
+If a line begins with white space, it is considered a continuation
+of the previous line. Blank lines and comment lines beginning with
+a `#' character are ignored. (Note: continuation lines are unwrapped
+before comment processing is applied.)
.LP
Arguments on configuration lines are separated by white space. If an
argument contains white space, the argument should be enclosed in
#endif
}
-#ifdef SLAP_EXTENDED_SCHEMA
} else if ( strcasecmp( cargv[0], "ditcontentrule" ) == 0 ) {
char * p;
p = strchr(saveline,'(' /*')'*/);
rc = parse_cr( fname, lineno, p, cargv );
if( rc ) return rc;
-#endif
/* specify an attribute type */
} else if (( strcasecmp( cargv[0], "attributetype" ) == 0 )
#include "slap.h"
#include "ldap_pvt.h"
-#ifdef SLAP_EXTENDED_SCHEMA
-
struct cindexrec {
struct berval cir_name;
ContentRule *cir_cr;
const struct cindexrec *cir1 = v_cir1;
const struct cindexrec *cir2 = v_cir2;
int i = cir1->cir_name.bv_len - cir2->cir_name.bv_len;
- if (i)
- return i;
+ if (i) return i;
return strcasecmp( cir1->cir_name.bv_val, cir2->cir_name.bv_val );
}
const struct berval *name = v_name;
const struct cindexrec *cir = v_cir;
int i = name->bv_len - cir->cir_name.bv_len;
- if (i)
- return i;
+ if (i) return i;
return strncasecmp( name->bv_val, cir->cir_name.bv_val, name->bv_len );
}
return SLAP_SCHERR_CLASS_NOT_FOUND;
}
- if( soc->soc_flags & SLAP_OC_OPERATIONAL ) (*op)++;
+ if( soc->soc_flags & SLAP_OC_OPERATIONAL &&
+ soc != slap_schema.si_oc_extensibleObject )
+ {
+ (*op)++;
+ }
if( soc->soc_kind != LDAP_SCHEMA_AUXILIARY ) {
*err = scr->scr_oc_oids_aux[naux];
}
scr->scr_auxiliaries[naux] = NULL;
-
return 0;
}
code = cr_create_precluded( scr, &op, err );
if ( code != 0 ) return code;
- if( user && op ) return SLAP_SCHERR_CR_BAD_AUX;
+ if( user && op ) {
+ return SLAP_SCHERR_CR_BAD_AUX;
+ }
code = cr_insert(scr,err);
return code;
}
-#endif
-
int
cr_schema_info( Entry *e )
{
-#ifdef SLAP_EXTENDED_SCHEMA
AttributeDescription *ad_ditContentRules
= slap_schema.si_ad_ditContentRules;
ContentRule *cr;
}
ldap_memfree( val.bv_val );
}
-#endif
return 0;
}
{
Attribute *a, *asc, *aoc;
ObjectClass *sc, *oc;
-#ifdef SLAP_EXTENDED_SCHEMA
AttributeType *at;
ContentRule *cr;
-#endif
int rc, i;
struct berval nsc;
AttributeDescription *ad_structuralObjectClass
/* Glue Entry */
}
-#ifdef SLAP_EXTENDED_SCHEMA
/* find the content rule for the structural class */
cr = cr_find( sc->soc_oid );
}
}
}
-#endif /* SLAP_EXTENDED_SCHEMA */
/* check that the entry has required attrs for each oc */
for ( i = 0; aoc->a_vals[i].bv_val != NULL; i++ ) {
} else if ( oc->soc_kind != LDAP_SCHEMA_STRUCTURAL || oc == sc ) {
char *s;
-#ifdef SLAP_EXTENDED_SCHEMA
if( oc->soc_kind == LDAP_SCHEMA_AUXILIARY ) {
int k;
return LDAP_OBJECT_CLASS_VIOLATION;
}
}
-#endif /* SLAP_EXTENDED_SCHEMA */
s = oc_check_required( e, oc, &aoc->a_vals[i] );
if (s != NULL) {
for ( a = e->e_attrs; a != NULL; a = a->a_next ) {
int ret;
-#ifdef SLAP_EXTENDED_SCHEMA
ret = LDAP_OBJECT_CLASS_VIOLATION;
if( cr && cr->scr_required ) {
}
if( ret != LDAP_SUCCESS )
-#endif /* SLAP_EXTENDED_SCHEMA */
{
ret = oc_check_allowed( a->a_desc->ad_type, aoc->a_vals, sc );
}
"OID could not be expanded",
"Duplicate Content Rule",
"Content Rule not for STRUCTURAL object class",
- "Content Rule AUX contains non-AUXILIARY object class"
+ "Content Rule AUX contains inappropriate object class",
"Content Rule attribute type list contains duplicate"
};
return 0;
}
-#ifdef SLAP_EXTENDED_SCHEMA
-
static void
cr_usage( void )
{
return 0;
}
-#endif
-
int
parse_oc(
const char *fname,
#include "ldap_pvt_thread.h"
#include "ldap_queue.h"
-#define SLAP_EXTENDED_SCHEMA 1
-
LDAP_BEGIN_DECL
/*
* SLAPD Memory allocation macros
--- /dev/null
+# $OpenLDAP$
+ditcontentrule ( 2.5.6.4 NAME 'organization' AUX domainRelatedObject )
+ditcontentrule ( 2.5.6.5 NAME 'organizationalUnit' AUX extensibleObject )
+ditcontentrule ( 2.5.6.9 NAME 'groupOfNames' )
+ditcontentrule ( 2.5.6.17 NAME 'groupOfUniqueNames' )
include ./schema/inetorgperson.schema
include ./schema/openldap.schema
include ./schema/nis.schema
+
+include ./testdata/ditcontentrules.conf
+
pidfile ./testrun/slapd.1.pid
argsfile ./testrun/slapd.1.args
include ./schema/inetorgperson.schema
include ./schema/openldap.schema
include ./schema/nis.schema
+
#
pidfile ./testrun/slapd.1.pid
argsfile ./testrun/slapd.1.args