NULL, NULL );
goto done;
-#if defined( SLAPD_SCHEMA_DN )
} else if ( bvmatch( &e->e_nname, &global_schemandn ) ) {
send_ldap_result( conn, op, rc = LDAP_ALREADY_EXISTS,
NULL, "subschema subentry already exists",
NULL, NULL );
goto done;
-#endif
}
manageDSAit = get_manageDSAit( op );
}
#endif
-#if defined( SLAPD_SCHEMA_DN )
int
at_schema_info( Entry *e )
{
if( at->sat_flags & SLAP_AT_HIDE ) continue;
-#if 0
- Debug( LDAP_DEBUG_TRACE, "Merging at [%ld] %s\n",
- (long) vals[0].bv_len, vals[0].bv_val, 0 );
-#endif
attr_merge( e, ad_attributeTypes, vals );
ldap_memfree( vals[0].bv_val );
}
return 0;
}
-#endif
* and the backend supports specific operational attributes,
* add them to the attribute list
*/
-#ifdef SLAPD_SCHEMA_DN
if ( opattrs || ( attrs &&
ad_inlist( slap_schema.si_ad_subschemaSubentry, attrs )) ) {
*ap = slap_operational_subschemaSubentry( be );
ap = &(*ap)->a_next;
}
-#endif
+
if ( ( opattrs || attrs ) && be && be->be_operational != NULL ) {
( void )be->be_operational( be, conn, op, e, attrs, opattrs, ap );
}
goto cleanup;
}
-#ifdef SLAPD_SCHEMA_DN
} else if ( bvmatch( &ndn, &global_schemandn ) ) {
#ifdef NEW_LOGGING
LDAP_LOG( OPERATION, ARGS,
rc = 0;
goto cleanup;
}
-#endif /* SLAPD_SCHEMA_DN */
}
if( entry ) {
struct berval default_search_base = { 0, NULL };
struct berval default_search_nbase = { 0, NULL };
unsigned num_subordinates = 0;
-#ifdef SLAPD_SCHEMA_DN
struct berval global_schemadn = { 0, NULL };
struct berval global_schemandn = { 0, NULL };
-#endif
ber_len_t sockbuf_max_incoming = SLAP_SB_MAX_INCOMING_DEFAULT;
ber_len_t sockbuf_max_incoming_auth= SLAP_SB_MAX_INCOMING_AUTH;
return 1;
#endif /* HAVE_CYRUS_SASL */
-#ifdef SLAPD_SCHEMA_DN
} else if ( strcasecmp( cargv[0], "schemadn" ) == 0 ) {
struct berval dn;
if ( cargc < 2 ) {
#endif
return 1;
}
-#endif /* SLAPD_SCHEMA_DN */
+
/* set UCDATA path */
} else if ( strcasecmp( cargv[0], "ucdata-path" ) == 0 ) {
int err;
if ( depth == 0 ) ch_free( cargv );
-#ifdef SLAPD_SCHEMA_DN
if ( !global_schemadn.bv_val ) {
ber_str2bv( SLAPD_SCHEMA_DN, sizeof(SLAPD_SCHEMA_DN)-1, 1,
&global_schemadn );
dnNormalize2( NULL, &global_schemadn, &global_schemandn );
}
-#endif
if ( load_ucdata( NULL ) < 0 ) return 1;
return( 0 );
config_destroy( )
{
ucdata_unload( UCDATA_ALL );
-#ifdef SLAPD_SCHEMA_DN
free( global_schemandn.bv_val );
free( global_schemadn.bv_val );
-#endif
free( line );
if ( slapd_args_file )
free ( slapd_args_file );
NULL, "cannot delete the root DSE", NULL, NULL );
goto cleanup;
-#ifdef SLAPD_SCHEMA_DN
-
} else if ( bvmatch( &ndn, &global_schemandn ) ) {
#ifdef NEW_LOGGING
LDAP_LOG( OPERATION, INFO, "do_delete: conn %d: "
send_ldap_result( conn, op, rc = LDAP_UNWILLING_TO_PERFORM,
NULL, "cannot delete the root DSE", NULL, NULL );
goto cleanup;
-
-#endif
}
Statslog( LDAP_DEBUG_STATS, "conn=%lu op=%lu DEL dn=\"%s\"\n",
NULL, "modify upon the root DSE not supported", NULL, NULL );
goto cleanup;
-#if defined( SLAPD_SCHEMA_DN )
} else if ( bvmatch( &ndn, &global_schemandn ) ) {
#ifdef NEW_LOGGING
LDAP_LOG( OPERATION, ERR,
NULL, "modification of subschema subentry not supported",
NULL, NULL );
goto cleanup;
-#endif
}
#ifdef LDAP_DEBUG
NULL, "cannot rename the root DSE", NULL, NULL );
goto cleanup;
-#ifdef SLAPD_SCHEMA_DN
} else if ( bvmatch( &ndn, &global_schemandn ) ) {
#ifdef NEW_LOGGING
LDAP_LOG( OPERATION, ERR,
send_ldap_result( conn, op, rc = LDAP_UNWILLING_TO_PERFORM,
NULL, "cannot rename subschema subentry", NULL, NULL );
goto cleanup;
-#endif
}
/* FIXME: should have/use rdnPretty / rdnNormalize routines */
return 0;
}
-#if defined( SLAPD_SCHEMA_DN )
-
int mr_schema_info( Entry *e )
{
MatchingRule *mr;
}
return 0;
}
-
-#endif
}
#ifdef LDAP_DEBUG
-
static void
oc_print( ObjectClass *oc )
{
printf( "\n" );
}
}
-
#endif
-
-#if defined( SLAPD_SCHEMA_DN )
-
int
oc_schema_info( Entry *e )
{
}
return 0;
}
-
-#endif
* helpers for on-the-fly operational attribute generation
*/
-#ifdef SLAPD_SCHEMA_DN
Attribute *
slap_operational_subschemaSubentry( Backend *be )
{
return a;
}
-#endif /* SLAPD_SCHEMA_DN */
Attribute *
slap_operational_hasSubordinate( int hs )
LDAP_SLAPD_V (struct berval) default_search_base;
LDAP_SLAPD_V (struct berval) default_search_nbase;
-#ifdef SLAPD_SCHEMA_DN
LDAP_SLAPD_V (struct berval) global_schemadn;
LDAP_SLAPD_V (struct berval) global_schemandn;
-#endif
LDAP_SLAPD_V (ldap_pvt_thread_mutex_t) num_sent_mutex;
LDAP_SLAPD_V (unsigned long) num_bytes_sent;
#include "lutil.h"
-#if defined( SLAPD_SCHEMA_DN )
-
int
schema_info( Entry **entry, const char **text )
{
*entry = e;
return LDAP_SUCCESS;
}
-#endif
}
rc = root_dse_info( conn, &entry, &text );
- }
-#if defined( SLAPD_SCHEMA_DN )
- else if ( bvmatch( &nbase, &global_schemandn ) ) {
+ } else if ( bvmatch( &nbase, &global_schemandn ) ) {
/* check restrictions */
rc = backend_check_restrictions( NULL, conn, op, NULL, &text ) ;
if( rc != LDAP_SUCCESS ) {
rc = schema_info( &entry, &text );
}
-#endif
if( rc != LDAP_SUCCESS ) {
send_ldap_result( conn, op, rc,
struct sockaddr sa_addr;
struct sockaddr_in sa_in_addr;
#ifdef LDAP_PF_INET6
+ struct sockaddr_storage sa_storage;
struct sockaddr_in6 sa_in6_addr;
#endif
#ifdef LDAP_PF_LOCAL
BerVarray be_suffix; /* the DN suffixes of data in this backend */
BerVarray be_nsuffix; /* the normalized DN suffixes in this backend */
BerVarray be_suffixAlias; /* pairs of DN suffix aliases and deref values */
-#ifdef SLAPD_SCHEMA_DN
struct berval be_schemadn; /* per-backend subschema subentry DN */
struct berval be_schemandn; /* normalized subschema DN */
-#endif
struct berval be_rootdn; /* the magic "root" name (DN) for this db */
struct berval be_rootndn; /* the magic "root" normalized name (DN) for this db */
struct berval be_rootpw; /* the magic "root" password for this db */
return( 0 );
}
-#if defined( SLAPD_SCHEMA_DN )
-
int
syn_schema_info( Entry *e )
{
return 0;
}
-#endif