/* FIXME: should be an error */
snprintf( buf, sizeof( buf ),
- "unknown val.<style> \"%s\" "
- "for attributeType \"%s\" with DN syntax"
-#ifndef SLAPD_CONF_UNKNOWN_BAILOUT
- "; using \"base\""
-#endif /* ! SLAPD_CONF_UNKNOWN_BAILOUT */
- SLAPD_CONF_UNKNOWN_IGNORED ".",
+ "unknown val.<style> \"%s\" for attributeType \"%s\" "
+ "with DN syntax.",
style,
a->acl_attrs[0].an_desc->ad_cname.bv_val );
Debug( LDAP_DEBUG_CONFIG | LDAP_DEBUG_ACL,
"%s: line %d: %s\n",
fname, lineno, buf );
-#ifdef SLAPD_CONF_UNKNOWN_BAILOUT
return acl_usage();
-#endif /* SLAPD_CONF_UNKNOWN_BAILOUT */
a->acl_attrval_style = ACL_STYLE_BASE;
}
/* FIXME: should be an error */
snprintf( buf, sizeof( buf ),
- "unknown val.<style> \"%s\" "
- "for attributeType \"%s\""
-#ifndef SLAPD_CONF_UNKNOWN_BAILOUT
- "; using \"exact\""
-#endif /* ! SLAPD_CONF_UNKNOWN_BAILOUT */
- SLAPD_CONF_UNKNOWN_IGNORED ".",
+ "unknown val.<style> \"%s\" for attributeType \"%s\".",
style, a->acl_attrs[0].an_desc->ad_cname.bv_val );
Debug( LDAP_DEBUG_CONFIG | LDAP_DEBUG_ACL,
"%s: line %d: %s\n",
fname, lineno, buf );
-#ifdef SLAPD_CONF_UNKNOWN_BAILOUT
return acl_usage();
-#endif /* SLAPD_CONF_UNKNOWN_BAILOUT */
a->acl_attrval_style = ACL_STYLE_BASE;
}
}
#ifndef LDAP_PF_LOCAL
Debug( LDAP_DEBUG_CONFIG | LDAP_DEBUG_ACL,
"%s: line %d: "
- "\"path\" style modifier is useless without local"
- SLAPD_CONF_UNKNOWN_IGNORED ".\n",
+ "\"path\" style modifier is useless without local.\n",
fname, lineno, 0 );
-#ifdef SLAPD_CONF_UNKNOWN_BAILOUT
return acl_usage();
-#endif /* SLAPD_CONF_UNKNOWN_BAILOUT */
#endif /* LDAP_PF_LOCAL */
} else {
switch ( sty ) {
case ACL_STYLE_REGEX:
Debug( LDAP_DEBUG_ANY, "%s: line %d: "
- "\"regex\" style implies "
- "\"expand\" modifier"
- SLAPD_CONF_UNKNOWN_IGNORED ".\n",
+ "\"regex\" style implies \"expand\" modifier.\n",
fname, lineno, 0 );
-#ifdef SLAPD_CONF_UNKNOWN_BAILOUT
return acl_usage();
-#endif /* SLAPD_CONF_UNKNOWN_BAILOUT */
break;
case ACL_STYLE_EXPAND:
if ( ( sty == ACL_STYLE_EXPAND || expand )
&& a->acl_dn_style != ACL_STYLE_REGEX )
{
- Debug( LDAP_DEBUG_CONFIG | LDAP_DEBUG_ACL, "%s: line %d: "
- "\"expand\" style or modifier used "
- "in conjunction with "
- "a non-regex <what> clause"
- SLAPD_CONF_UNKNOWN_IGNORED ".\n",
+ Debug( LDAP_DEBUG_CONFIG | LDAP_DEBUG_ACL, "%s: line %d: \"expand\" style "
+ "or modifier used in conjunction with a non-regex <what> clause.\n",
fname, lineno, 0 );
-#ifdef SLAPD_CONF_UNKNOWN_BAILOUT
return acl_usage();
-#endif /* SLAPD_CONF_UNKNOWN_BAILOUT */
}
if ( strncasecmp( left, "real", STRLENOF( "real" ) ) == 0 ) {
int gotit = 0;
for ( exp = strchr( bdn->a_pat.bv_val, '$' );
- exp && (ber_len_t)(exp - bdn->a_pat.bv_val)
- < bdn->a_pat.bv_len;
- exp = strchr( exp, '$' ) )
+ exp && (ber_len_t)(exp - bdn->a_pat.bv_val)
+ < bdn->a_pat.bv_len;
+ exp = strchr( exp, '$' ) )
{
if ( isdigit( exp[ 1 ] ) ) {
gotit = 1;
bdn->a_expand = expand;
} else {
- Debug( LDAP_DEBUG_ANY,
- "%s: line %d: \"expand\" used "
- "with no expansions in \"pattern\""
- SLAPD_CONF_UNKNOWN_IGNORED ".\n",
+ Debug( LDAP_DEBUG_ANY, "%s: line %d: "
+ "\"expand\" used with no expansions in \"pattern\".\n",
fname, lineno, 0 );
-#ifdef SLAPD_CONF_UNKNOWN_BAILOUT
return acl_usage();
-#endif /* SLAPD_CONF_UNKNOWN_BAILOUT */
}
}
if ( sty == ACL_STYLE_SELF ) {
/* if we have no real access clause, complain and do nothing */
if ( a == NULL ) {
Debug( LDAP_DEBUG_ANY, "%s: line %d: "
- "warning: no access clause(s) "
- "specified in access line"
- SLAPD_CONF_UNKNOWN_IGNORED ".\n",
+ "warning: no access clause(s) specified in access line.\n",
fname, lineno, 0 );
-#ifdef SLAPD_CONF_UNKNOWN_BAILOUT
return acl_usage();
-#endif /* SLAPD_CONF_UNKNOWN_BAILOUT */
} else {
#ifdef LDAP_DEBUG
if ( a->acl_access == NULL ) {
Debug( LDAP_DEBUG_ANY, "%s: line %d: "
- "warning: no by clause(s) "
- "specified in access line"
- SLAPD_CONF_UNKNOWN_IGNORED ".\n",
+ "warning: no by clause(s) specified in access line.\n",
fname, lineno, 0 );
-#ifdef SLAPD_CONF_UNKNOWN_BAILOUT
return acl_usage();
-#endif /* SLAPD_CONF_UNKNOWN_BAILOUT */
}
if ( be != NULL ) {
ch_free( a );
continue;
}
- fprintf( stderr, "%s: line %d: duplicate index definition "
- "for attr \"%s\"" SLAPD_CONF_UNKNOWN_IGNORED ".\n",
+ fprintf( stderr,
+ "%s: line %d: duplicate index definition for attr \"%s\".\n",
fname, lineno, attrs[i] );
return LDAP_PARAM_ERROR;
ainfo_cmp, avl_dup_error );
if( rc ) {
- fprintf( stderr, "%s: line %d: duplicate index definition "
- "for attr \"%s\"" SLAPD_CONF_UNKNOWN_IGNORED ".\n",
+ fprintf( stderr,
+ "%s: line %d: duplicate index definition for attr \"%s\".\n",
fname, lineno, attrs[i] );
return LDAP_PARAM_ERROR;
fname, lineno );
return( 1 );
} else if ( argc > 3 ) {
- fprintf( stderr,
-"%s: line %d: extra junk after \"index <attr> [pres,eq,approx,sub]\" line" SLAPD_CONF_UNKNOWN_IGNORED ".\n",
+ fprintf( stderr, "%s: line %d: extra junk "
+ "after \"index <attr> [pres,eq,approx,sub]\" line.\n",
fname, lineno );
-#ifdef SLAPD_CONF_UNKNOWN_BAILOUT
return( 1 );
-#endif /* SLAPD_CONF_UNKNOWN_BAILOUT */
}
rc = attr_index_config( li, fname, lineno, argc - 1, &argv[1] );
|| avl_find( map->remap, (caddr_t)&mapping[ 1 ], mapping_cmp ) != NULL)
{
Debug( LDAP_DEBUG_ANY,
- "%s: line %d: duplicate mapping found" SLAPD_CONF_UNKNOWN_IGNORED ".\n",
+ "%s: line %d: duplicate mapping found.\n",
fname, lineno, 0 );
goto error_return;
}
default:
- Debug( SLAPD_DEBUG_CONFIG_ERROR,
- "%s: unknown CFG_TYPE %d"
- SLAPD_CONF_UNKNOWN_IGNORED ".\n",
+ Debug( LDAP_DEBUG_ANY,
+ "%s: unknown CFG_TYPE %d.\n",
c->log, c->type, 0 );
-#ifdef SLAPD_CONF_UNKNOWN_BAILOUT
return 1;
-#endif /* SLAPD_CONF_UNKNOWN_BAILOUT */
}
return(0);
}
if(c->argv[1][0] == '-' && overlay_config(c->be, &c->argv[1][1])) {
/* log error */
- Debug( SLAPD_DEBUG_CONFIG_ERROR, "%s: (optional) %s overlay \"%s\" configuration failed"
- SLAPD_CONF_UNKNOWN_IGNORED ".\n",
+ Debug( LDAP_DEBUG_ANY,
+ "%s: (optional) %s overlay \"%s\" configuration failed.\n",
c->log, c->be == frontendDB ? "global " : "", &c->argv[1][1]);
-#ifdef SLAPD_CONF_UNKNOWN_BAILOUT
return 1;
-#endif /* SLAPD_CONF_UNKNOWN_BAILOUT */
} else if(overlay_config(c->be, c->argv[1])) {
return(1);
}
ndn = c->value_ndn;
tbe = select_backend(&ndn, 0, 0);
if(tbe == c->be) {
- Debug( SLAPD_DEBUG_CONFIG_ERROR,
- "%s: suffix already served by this backend!"
- SLAPD_CONF_UNKNOWN_IGNORED ".\n",
+ Debug( LDAP_DEBUG_ANY, "%s: suffix already served by this backend!.\n",
c->log, 0, 0);
-#ifdef SLAPD_CONF_UNKNOWN_BAILOUT
return 1;
-#endif /* SLAPD_CONF_UNKNOWN_BAILOUT */
free(pdn.bv_val);
free(ndn.bv_val);
} else if(tbe) {
} else if(!strncasecmp(c->argv[i], "suffix=", STRLENOF( "suffix="))) {
switch(add_replica_suffix(c->be, nr, c->argv[i] + STRLENOF("suffix="))) {
case 1:
- Debug( SLAPD_DEBUG_CONFIG_ERROR, "%s: "
- "suffix \"%s\" in \"replica\" line is not valid for backend"
- SLAPD_CONF_UNKNOWN_IGNORED ".\n",
- c->log, c->argv[i] + STRLENOF("suffix="), 0);
-#ifdef SLAPD_CONF_UNKNOWN_BAILOUT
+ Debug( LDAP_DEBUG_ANY, "%s: "
+ "suffix \"%s\" in \"replica\" line is not valid for backend.\n",
+ c->log, c->argv[i] + STRLENOF("suffix="), 0);
return 1;
-#endif /* SLAPD_CONF_UNKNOWN_BAILOUT */
break;
case 2:
- Debug( SLAPD_DEBUG_CONFIG_ERROR, "%s: "
- "unable to normalize suffix in \"replica\" line"
- SLAPD_CONF_UNKNOWN_IGNORED ".\n",
- c->log, 0, 0);
-#ifdef SLAPD_CONF_UNKNOWN_BAILOUT
+ Debug( LDAP_DEBUG_ANY, "%s: "
+ "unable to normalize suffix in \"replica\" line.\n",
+ c->log, 0, 0);
return 1;
-#endif /* SLAPD_CONF_UNKNOWN_BAILOUT */
break;
}
}
if ( c->argc < 1 ) {
- Debug( SLAPD_DEBUG_CONFIG_ERROR, "%s: bad config line"
- SLAPD_CONF_UNKNOWN_IGNORED ".\n",
+ Debug( LDAP_DEBUG_ANY, "%s: bad config line.\n",
c->log, 0, 0);
-#ifdef SLAPD_CONF_UNKNOWN_BAILOUT
rc = 1;
goto done;
-#else /* ! SLAPD_CONF_UNKNOWN_BAILOUT */
- continue;
-#endif /* ! SLAPD_CONF_UNKNOWN_BAILOUT */
}
c->op = SLAP_CONFIG_ADD;
if ( rc ) {
switch(rc) {
case SLAP_CONF_UNKNOWN:
- Debug( SLAPD_DEBUG_CONFIG_ERROR, "%s: "
- "unknown directive <%s> inside backend info definition"
- SLAPD_CONF_UNKNOWN_IGNORED ".\n",
+ Debug( LDAP_DEBUG_ANY, "%s: unknown directive "
+ "<%s> inside backend info definition.\n",
c->log, *c->argv, 0);
-#ifndef SLAPD_CONF_UNKNOWN_BAILOUT
- continue;
-#endif /* ! SLAPD_CONF_UNKNOWN_BAILOUT */
default:
rc = 1;
goto done;
rc = (*c->be->be_config)(c->be, c->fname, c->lineno,
c->argc, c->argv);
}
- if ( rc == SLAP_CONF_UNKNOWN && SLAP_ISGLOBALOVERLAY( frontendDB ) ) {
+ if ( rc == SLAP_CONF_UNKNOWN && SLAP_ISGLOBALOVERLAY( frontendDB ) )
+ {
/* global overlays may need
* definitions inside other databases...
*/
- rc = (*frontendDB->be_config)(frontendDB, c->fname, (int)c->lineno, c->argc, c->argv);
+ rc = (*frontendDB->be_config)( frontendDB,
+ c->fname, (int)c->lineno, c->argc, c->argv );
}
switch ( rc ) {
break;
case SLAP_CONF_UNKNOWN:
- Debug( SLAPD_DEBUG_CONFIG_ERROR, "%s: "
- "unknown directive <%s> inside backend database "
- "definition" SLAPD_CONF_UNKNOWN_IGNORED ".\n",
+ Debug( LDAP_DEBUG_ANY, "%s: unknown directive "
+ "<%s> inside backend database definition.\n",
c->log, *c->argv, 0);
-#ifndef SLAPD_CONF_UNKNOWN_BAILOUT
- break;
-#endif /* ! SLAPD_CONF_UNKNOWN_BAILOUT */
default:
rc = 1;
}
} else if ( frontendDB->be_config ) {
- rc = (*frontendDB->be_config)(frontendDB, c->fname, (int)c->lineno, c->argc, c->argv);
+ rc = (*frontendDB->be_config)( frontendDB,
+ c->fname, (int)c->lineno, c->argc, c->argv);
if ( rc ) {
switch(rc) {
case SLAP_CONF_UNKNOWN:
- Debug( SLAPD_DEBUG_CONFIG_ERROR, "%s: "
- "unknown directive <%s> inside global database definition"
- SLAPD_CONF_UNKNOWN_IGNORED ".\n",
+ Debug( LDAP_DEBUG_ANY, "%s: unknown directive "
+ "<%s> inside global database definition.\n",
c->log, *c->argv, 0);
-#ifndef SLAPD_CONF_UNKNOWN_BAILOUT
- break;
-#endif /* ! SLAPD_CONF_UNKNOWN_BAILOUT */
default:
rc = 1;
}
} else {
- Debug( SLAPD_DEBUG_CONFIG_ERROR, "%s: "
- "unknown directive <%s> outside backend info and database definitions"
- SLAPD_CONF_UNKNOWN_IGNORED ".\n",
+ Debug( LDAP_DEBUG_ANY, "%s: unknown directive "
+ "<%s> outside backend info and database definitions.\n",
c->log, *c->argv, 0);
-#ifdef SLAPD_CONF_UNKNOWN_BAILOUT
rc = 1;
goto done;
-#else /* ! SLAPD_CONF_UNKNOWN_BAILOUT */
- continue;
-#endif /* ! SLAPD_CONF_UNKNOWN_BAILOUT */
}
}
int
verb_to_mask(const char *word, slap_verbmasks *v) {
int i;
- for(i = 0; !BER_BVISNULL(&v[i].word); i++)
- if(!strcasecmp(word, v[i].word.bv_val))
- break;
+ for(i = 0; !BER_BVISNULL(&v[i].word); i++) {
+ if(!strcasecmp(word, v[i].word.bv_val)) break;
+ }
return(i);
}
assert( *vp == NULL );
- for ( i = 0; !BER_BVISNULL( &v[ i ].word ); i++ )
- ;
+ for ( i = 0; !BER_BVISNULL( &v[ i ].word ); i++ ) /* EMPTY */;
*vp = ch_calloc( i + 1, sizeof( slap_verbmasks ) );
|| avl_find( map->remap, (caddr_t)&mapping[1], rwm_mapping_cmp ) != NULL)
{
fprintf( stderr,
- "%s: line %d: duplicate mapping found" SLAPD_CONF_UNKNOWN_IGNORED ".\n",
+ "%s: line %d: duplicate mapping found.\n",
fname, lineno );
/* FIXME: free stuff */
goto error_return;
#define LDAP_DYNAMIC_OBJECTS
#define LDAP_SYNC_TIMESTAMP
#define LDAP_COLLECTIVE_ATTRIBUTES
-#define SLAPD_CONF_UNKNOWN_BAILOUT
#define SLAP_CONTROL_X_TREE_DELETE LDAP_CONTROL_X_TREE_DELETE
#define SLAP_ORDERED_PRETTYNORM
#define SLAP_OVERLAY_ACCESS
#endif
-/*
- * ITS#3705: bail out if unknown config directives appear in slapd.conf
- */
-#ifdef SLAPD_CONF_UNKNOWN_BAILOUT
-#define SLAPD_CONF_UNKNOWN_IGNORED ""
-#define SLAPD_DEBUG_CONFIG_ERROR LDAP_DEBUG_ANY
-#else /* ! SLAPD_CONF_UNKNOWN_BAILOUT */
-#define SLAPD_CONF_UNKNOWN_IGNORED " (ignored)"
-#define SLAPD_DEBUG_CONFIG_ERROR LDAP_DEBUG_CONFIG
-#endif /* ! SLAPD_CONF_UNKNOWN_BAILOUT */
-
/*
* SLAPD Memory allocation macros
*