mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-31 20:19:34 -05:00
let special attrnames slip through (ITS#5760)
This commit is contained in:
parent
f83b4345dd
commit
8f96e64605
4 changed files with 30 additions and 0 deletions
|
|
@ -27,6 +27,10 @@
|
|||
#include "slap.h"
|
||||
#include "lutil.h"
|
||||
|
||||
static struct berval bv_no_attrs = BER_BVC( LDAP_NO_ATTRS );
|
||||
static struct berval bv_all_user_attrs = BER_BVC( "*" );
|
||||
static struct berval bv_all_operational_attrs = BER_BVC( "+" );
|
||||
|
||||
static AttributeName anlist_no_attrs[] = {
|
||||
{ BER_BVC( LDAP_NO_ATTRS ), NULL, 0, NULL },
|
||||
{ BER_BVNULL, NULL, 0, NULL }
|
||||
|
|
@ -53,6 +57,10 @@ AttributeName *slap_anlist_all_user_attributes = anlist_all_user_attributes;
|
|||
AttributeName *slap_anlist_all_operational_attributes = anlist_all_operational_attributes;
|
||||
AttributeName *slap_anlist_all_attributes = anlist_all_attributes;
|
||||
|
||||
struct berval * slap_bv_no_attrs = &bv_no_attrs;
|
||||
struct berval * slap_bv_all_user_attrs = &bv_all_user_attrs;
|
||||
struct berval * slap_bv_all_operational_attrs = &bv_all_operational_attrs;
|
||||
|
||||
typedef struct Attr_option {
|
||||
struct berval name; /* option name or prefix */
|
||||
int prefix; /* NAME is a tag and range prefix */
|
||||
|
|
|
|||
|
|
@ -119,6 +119,15 @@ ldap_back_mapping ( struct ldapmap *map, struct berval *s, struct ldapmapping **
|
|||
|
||||
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;
|
||||
|
||||
|
|
|
|||
|
|
@ -121,6 +121,15 @@ rwm_mapping( struct ldapmap *map, struct berval *s, struct ldapmapping **m, int
|
|||
|
||||
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 == RWM_REMAP ) {
|
||||
tree = map->remap;
|
||||
|
||||
|
|
|
|||
|
|
@ -191,6 +191,10 @@ LDAP_SLAPD_V( AttributeName * ) slap_anlist_all_user_attributes;
|
|||
LDAP_SLAPD_V( AttributeName * ) slap_anlist_all_operational_attributes;
|
||||
LDAP_SLAPD_V( AttributeName * ) slap_anlist_all_attributes;
|
||||
|
||||
LDAP_SLAPD_V( struct berval * ) slap_bv_no_attrs;
|
||||
LDAP_SLAPD_V( struct berval * ) slap_bv_all_user_attrs;
|
||||
LDAP_SLAPD_V( struct berval * ) slap_bv_all_operational_attrs;
|
||||
|
||||
/*
|
||||
* add.c
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue