/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 1998-2008 The OpenLDAP Foundation.
+ * Copyright 1998-2009 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
assert( m != NULL );
+ /* let special attrnames slip through (ITS#5760) */
+ if ( bvmatch( s, slap_bv_no_attrs )
+ || bvmatch( s, slap_bv_all_user_attrs )
+ || bvmatch( s, slap_bv_all_operational_attrs ) )
+ {
+ *m = NULL;
+ return 0;
+ }
+
if ( remap == BACKLDAP_REMAP ) {
tree = map->remap;
int remap )
{
struct ldapmapping *mapping;
+ int drop_missing;
/* map->map may be NULL when mapping is configured,
* but map->remap can't */
}
BER_BVZERO( bv );
- ( void )ldap_back_mapping( map, s, &mapping, remap );
+ drop_missing = ldap_back_mapping( map, s, &mapping, remap );
if ( mapping != NULL ) {
if ( !BER_BVISNULL( &mapping->dst ) ) {
*bv = mapping->dst;
return;
}
- if ( !map->drop_missing ) {
+ if ( !drop_missing ) {
*bv = *s;
}
}