Commit b54780f9 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Add initial support for modify/increment. No over/under flow detection.

Currently discovered via a "feature", but should use a control.
Start of a control made, but needs to be better integrated (with
auto use in ldapmodify(1)).
parent 1251d801
......@@ -181,15 +181,16 @@ typedef struct ldapcontrol {
} LDAPControl;
/* LDAP Controls */
#define LDAP_CONTROL_ASSERT "1.3.6.1.4.1.4203.666.5.9"
#define LDAP_CONTROL_PRE_READ_BACK "1.3.6.1.4.1.4203.666.5.10.1"
#define LDAP_CONTROL_POST_READ_BACK "1.3.6.1.4.1.4203.666.5.10.2"
#define LDAP_CONTROL_ASSERT "1.3.6.1.4.1.4203.666.5.9"
#define LDAP_CONTROL_PRE_READ_BACK "1.3.6.1.4.1.4203.666.5.10.1"
#define LDAP_CONTROL_POST_READ_BACK "1.3.6.1.4.1.4203.666.5.10.2"
#define LDAP_CONTROL_MODIFY_INCREMENT "1.3.6.1.4.1.4203.666.5.11"
#define LDAP_CONTROL_VALUESRETURNFILTER "1.2.826.0.1.334810.2.3"
#define LDAP_CONTROL_SUBENTRIES "1.3.6.1.4.1.4203.1.10.1"
#define LDAP_CONTROL_NOOP "1.3.6.1.4.1.4203.1.10.2"
#define LDAP_CONTROL_MANAGEDSAIT "2.16.840.1.113730.3.4.2"
#define LDAP_CONTROL_PROXY_AUTHZ "2.16.840.1.113730.3.4.18"
#define LDAP_CONTROL_VALUESRETURNFILTER "1.2.826.0.1.334810.2.3"
#define LDAP_CONTROL_SUBENTRIES "1.3.6.1.4.1.4203.1.10.1"
#define LDAP_CONTROL_NOOP "1.3.6.1.4.1.4203.1.10.2"
#define LDAP_CONTROL_MANAGEDSAIT "2.16.840.1.113730.3.4.2"
#define LDAP_CONTROL_PROXY_AUTHZ "2.16.840.1.113730.3.4.18"
#if 0
#define LDAP_CONTROL_DUPENT_REQUEST "2.16.840.1.113719.1.27.101.1"
......@@ -198,7 +199,7 @@ typedef struct ldapcontrol {
#define LDAP_CONTROL_DUPENT LDAP_CONTROL_DUPENT_REQUEST
#endif
#define LDAP_CONTROL_PAGEDRESULTS "1.2.840.113556.1.4.319"
#define LDAP_CONTROL_PAGEDRESULTS "1.2.840.113556.1.4.319"
#define LDAP_SYNC 2
#ifdef LDAP_SYNC
......@@ -248,7 +249,7 @@ typedef struct ldapcontrol {
#define LDAP_FEATURE_ABSOLUTE_FILTERS "1.3.6.1.4.1.4203.1.5.3" /* (&) (|) */
#define LDAP_FEATURE_LANGUAGE_TAG_OPTIONS "1.3.6.1.4.1.4203.1.5.4"
#define LDAP_FEATURE_LANGUAGE_RANGE_OPTIONS "1.3.6.1.4.1.4203.1.5.5"
#define LDAP_FEATURE_MODIFY_INCREMENT "1.3.6.1.4.1.4203.1.5.6"
#define LDAP_FEATURE_MODIFY_INCREMENT "1.3.6.1.4.1.4203.666.5.6"
/*
* specific LDAP instantiations of BER types we know about
......
......@@ -68,6 +68,7 @@ bdb_db_init( BackendDB *be )
/* indicate system schema supported */
be->be_flags |=
SLAP_BFLAG_INCREMENT |
#ifdef BDB_SUBENTRIES
SLAP_BFLAG_SUBENTRIES |
#endif
......
......@@ -112,6 +112,28 @@ int bdb_modify_internal(
}
break;
case LDAP_MOD_INCREMENT:
#ifdef NEW_LOGGING
LDAP_LOG ( OPERATION, DETAIL1,
"bdb_modify_internal: increment\n", 0, 0, 0 );
#else
Debug(LDAP_DEBUG_ARGS,
"bdb_modify_internal: increment\n", 0, 0, 0);
#endif
err = modify_increment_values( e, mod, get_permissiveModify(op),
text, textbuf, textlen );
if( err != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
LDAP_LOG ( OPERATION, ERR,
"bdb_modify_internal: %d %s\n", err, *text, 0 );
#else
Debug(LDAP_DEBUG_ARGS,
"bdb_modify_internal: %d %s\n",
err, *text, 0);
#endif
}
break;
case SLAP_MOD_SOFTADD:
#ifdef NEW_LOGGING
LDAP_LOG ( OPERATION, DETAIL1,
......
......@@ -129,6 +129,7 @@ ldbm_back_db_init(
/* indicate system schema supported */
be->be_flags |=
SLAP_BFLAG_INCREMENT |
#ifdef LDBM_SUBENTRIES
SLAP_BFLAG_SUBENTRIES |
#endif
......
......@@ -116,6 +116,28 @@ int ldbm_modify_internal(
}
break;
case LDAP_MOD_INCREMENT:
#ifdef NEW_LOGGING
LDAP_LOG( BACK_LDBM, DETAIL1,
"ldbm_modify_internal: increment\n",0,0,0);
#else
Debug(LDAP_DEBUG_ARGS,
"ldbm_modify_internal: increment\n",0,0,0);
#endif
rc = modify_increment_values( e, mod, get_permissiveModify( op ),
text, textbuf, textlen );
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
LDAP_LOG( BACK_LDBM, INFO,
"ldbm_modify_internal: failed %d (%s)\n", rc, *text, 0 );
#else
Debug(LDAP_DEBUG_ARGS, "ldbm_modify_internal: %d %s\n",
rc, *text, 0);
#endif
}
break;
case SLAP_MOD_SOFTADD:
#ifdef NEW_LOGGING
LDAP_LOG( BACK_LDBM, DETAIL1,
......
......@@ -821,8 +821,8 @@ backend_check_controls(
if( ctrls ) {
for( ; *ctrls != NULL ; ctrls++ ) {
if( (*ctrls)->ldctl_iscritical &&
!ldap_charray_inlist( op->o_bd->be_controls, (*ctrls)->ldctl_oid ) )
if( (*ctrls)->ldctl_iscritical && !ldap_charray_inlist(
op->o_bd->be_controls, (*ctrls)->ldctl_oid ) )
{
rs->sr_text = "control unavailable in context";
rs->sr_err = LDAP_UNAVAILABLE_CRITICAL_EXTENSION;
......
......@@ -22,6 +22,7 @@
static SLAP_CTRL_PARSE_FN parseAssert;
static SLAP_CTRL_PARSE_FN parseProxyAuthz;
static SLAP_CTRL_PARSE_FN parseManageDSAit;
static SLAP_CTRL_PARSE_FN parseModifyIncrement;
static SLAP_CTRL_PARSE_FN parseNoOp;
static SLAP_CTRL_PARSE_FN parsePagedResults;
static SLAP_CTRL_PARSE_FN parseValuesReturnFilter;
......@@ -102,6 +103,9 @@ static struct slap_control control_defs[] = {
SLAP_CTRL_HIDE|SLAP_CTRL_SEARCH, NULL,
parseLdupSync, LDAP_SLIST_ENTRY_INITIALIZER(next) },
#endif
{ LDAP_CONTROL_MODIFY_INCREMENT,
SLAP_CTRL_MODIFY, NULL,
parseModifyIncrement, LDAP_SLIST_ENTRY_INITIALIZER(next) },
{ LDAP_CONTROL_MANAGEDSAIT,
SLAP_CTRL_ACCESS, NULL,
parseManageDSAit, LDAP_SLIST_ENTRY_INITIALIZER(next) },
......@@ -632,6 +636,32 @@ return_results:
return rs->sr_err;
}
static int parseModifyIncrement (
Operation *op,
SlapReply *rs,
LDAPControl *ctrl )
{
#if 0
if ( op->o_parseModifyIncrement != SLAP_NO_CONTROL ) {
rs->sr_text = "modifyIncrement control specified multiple times";
return LDAP_PROTOCOL_ERROR;
}
#endif
if ( ctrl->ldctl_value.bv_len ) {
rs->sr_text = "modifyIncrement control value not empty";
return LDAP_PROTOCOL_ERROR;
}
#if 0
op->o_parseModifyIncrement = ctrl->ldctl_iscritical
? SLAP_CRITICAL_CONTROL
: SLAP_NONCRITICAL_CONTROL;
#endif
return LDAP_SUCCESS;
}
static int parseManageDSAit (
Operation *op,
SlapReply *rs,
......
......@@ -50,6 +50,7 @@ do_modify(
Slapi_PBlock *pb = op->o_pb;
#endif
int manageDSAit;
int increment = 0;
#ifdef NEW_LOGGING
LDAP_LOG( OPERATION, ENTRY, "do_modify: enter\n", 0, 0, 0 );
......@@ -147,14 +148,53 @@ do_modify(
case LDAP_MOD_REPLACE:
break;
case LDAP_MOD_INCREMENT:
if( op->o_protocol >= LDAP_VERSION3 ) {
increment++;
if ( mod->sml_values == NULL ) {
#ifdef NEW_LOGGING
LDAP_LOG( OPERATION, ERR, "do_modify: "
"modify/increment operation (%ld) requires value\n",
(long)mop, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "do_modify: "
"modify/increment operation (%ld) requires value\n",
(long) mop, 0, 0 );
#endif
send_ldap_error( op, rs, LDAP_PROTOCOL_ERROR,
"modify/increment operation requires value" );
goto cleanup;
}
if( mod->sml_values[1].bv_val ) {
#ifdef NEW_LOGGING
LDAP_LOG( OPERATION, ERR, "do_modify: modify/increment "
"operation (%ld) requires single value\n",
(long)mop, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "do_modify: modify/increment "
"operation (%ld) requires single value\n",
(long) mop, 0, 0 );
#endif
send_ldap_error( op, rs, LDAP_PROTOCOL_ERROR,
"modify/increment operation requires single value" );
goto cleanup;
}
break;
}
/* fall thru */
default: {
#ifdef NEW_LOGGING
LDAP_LOG( OPERATION, ERR,
"do_modify: invalid modify operation (%ld)\n",
"do_modify: unrecognized modify operation (%ld)\n",
(long)mop, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"do_modify: invalid modify operation (%ld)\n",
"do_modify: unrecognized modify operation (%ld)\n",
(long) mop, 0, 0 );
#endif
......@@ -227,9 +267,10 @@ do_modify(
for ( tmp = modlist; tmp != NULL; tmp = tmp->sml_next ) {
#ifdef NEW_LOGGING
LDAP_LOG( OPERATION, DETAIL1, "\t%s: %s\n",
tmp->sml_op == LDAP_MOD_ADD ?
"add" : (tmp->sml_op == LDAP_MOD_DELETE ?
"delete" : "replace"), tmp->sml_type.bv_val, 0 );
tmp->sml_op == LDAP_MOD_ADD ? "add" :
(tmp->sml_op == LDAP_MOD_INCREMENT ? "increment" :
(tmp->sml_op == LDAP_MOD_DELETE ? "delete" :
"replace")), tmp->sml_type.bv_val, 0 );
if ( tmp->sml_values == NULL ) {
LDAP_LOG( OPERATION, DETAIL1, "\t\tno values", 0, 0, 0 );
......@@ -243,9 +284,10 @@ do_modify(
#else
Debug( LDAP_DEBUG_ARGS, "\t%s: %s\n",
tmp->sml_op == LDAP_MOD_ADD
? "add" : (tmp->sml_op == LDAP_MOD_DELETE
? "delete" : "replace"), tmp->sml_type.bv_val, 0 );
tmp->sml_op == LDAP_MOD_ADD ? "add" :
(tmp->sml_op == LDAP_MOD_INCREMENT ? "increment" :
(tmp->sml_op == LDAP_MOD_DELETE ? "delete" :
"replace")), tmp->sml_type.bv_val, 0 );
if ( tmp->sml_values == NULL ) {
Debug( LDAP_DEBUG_ARGS, "%s\n",
......@@ -311,7 +353,7 @@ do_modify(
if (rs->sr_ref != default_referral) ber_bvarray_free( rs->sr_ref );
} else {
send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM,
"referral missing" );
"referral missing" );
}
goto cleanup;
}
......@@ -327,6 +369,12 @@ do_modify(
goto cleanup;
}
/* check for modify/increment support */
if( increment && !SLAP_INCREMENT( op->o_bd ) ) {
send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM,
"modify/increment not supported in context" );
}
#if defined( LDAP_SLAPI )
slapi_x_pblock_set_operation( pb, op );
slapi_pblock_set( pb, SLAPI_MODIFY_TARGET, (void *)dn.bv_val );
......@@ -399,7 +447,7 @@ do_modify(
*/
#if defined(LDAP_SYNCREPL) && !defined(SLAPD_MULTIMASTER)
if ( !op->o_bd->syncinfo &&
( !op->o_bd->be_update_ndn.bv_len || repl_user ))
( !op->o_bd->be_update_ndn.bv_len || repl_user ))
#elif defined(LDAP_SYNCREPL) && defined(SLAPD_MULTIMASTER)
if ( !op->o_bd->syncinfo ) /* LDAP_SYNCREPL overrides MM */
#elif !defined(LDAP_SYNCREPL) && !defined(SLAPD_MULTIMASTER)
......@@ -572,7 +620,9 @@ int slap_mods_check(
}
if ( is_at_obsolete( ad->ad_type ) &&
( ml->sml_op == LDAP_MOD_ADD || ml->sml_values != NULL ) )
(( ml->sml_op != LDAP_MOD_REPLACE &&
ml->sml_op != LDAP_MOD_DELETE ) ||
ml->sml_values != NULL ))
{
/*
* attribute is obsolete,
......@@ -585,6 +635,22 @@ int slap_mods_check(
return LDAP_CONSTRAINT_VIOLATION;
}
if ( ml->sml_op == LDAP_MOD_INCREMENT &&
#ifdef SLAPD_REAL_SYNTAX
!is_at_syntax( ad->ad_type, SLAPD_REAL_SYNTAX ) &&
#endif
!is_at_syntax( ad->ad_type, SLAPD_INTEGER_SYNTAX ) )
{
/*
* attribute values must be INTEGER or REAL
*/
snprintf( textbuf, textlen,
"%s: attribute syntax inappropriate for increment",
ml->sml_type.bv_val );
*text = textbuf;
return LDAP_CONSTRAINT_VIOLATION;
}
/*
* check values
*/
......@@ -679,8 +745,6 @@ int slap_mods_check(
ml->sml_nvalues[nvals].bv_val = NULL;
ml->sml_nvalues[nvals].bv_len = 0;
} else {
}
}
}
......@@ -747,9 +811,7 @@ int slap_mods_opattrs(
if( global_schemacheck ) {
int rc = mods_structural_class( mods, &tmpval,
text, textbuf, textlen );
if( rc != LDAP_SUCCESS ) {
return rc;
}
if( rc != LDAP_SUCCESS ) return rc;
mod = (Modifications *) ch_malloc( sizeof( Modifications ) );
mod->sml_op = mop;
......
......@@ -16,6 +16,8 @@
#include "portable.h"
#include <ac/string.h>
#include "slap.h"
int
......@@ -40,8 +42,7 @@ modify_add_values(
Modification *mod,
int permissive,
const char **text,
char *textbuf, size_t textlen
)
char *textbuf, size_t textlen )
{
int i, j;
int matched;
......@@ -176,8 +177,8 @@ modify_add_values(
} else {
rc = modify_check_duplicates( mod->sm_desc, mr,
a ? a->a_vals : NULL, mod->sm_bvalues,
permissive, text, textbuf, textlen );
a ? a->a_vals : NULL, mod->sm_bvalues,
permissive, text, textbuf, textlen );
if ( permissive && rc == LDAP_TYPE_OR_VALUE_EXISTS ) {
return LDAP_SUCCESS;
......@@ -190,8 +191,7 @@ modify_add_values(
}
/* no - add them */
if( attr_merge( e, mod->sm_desc, mod->sm_values, mod->sm_nvalues ) != 0 )
{
if( attr_merge( e, mod->sm_desc, mod->sm_values, mod->sm_nvalues ) != 0 ) {
/* this should return result of attr_merge */
*text = textbuf;
snprintf( textbuf, textlen,
......@@ -263,8 +263,7 @@ modify_delete_values(
for ( i = 0; mod->sm_values[i].bv_val != NULL; i++ ) {
int found = 0;
for ( j = 0; a->a_vals[j].bv_val != NULL; j++ )
{
for ( j = 0; a->a_vals[j].bv_val != NULL; j++ ) {
int match;
if( mod->sm_nvalues ) {
......@@ -312,7 +311,6 @@ modify_delete_values(
break;
}
if ( found == 0 ) {
*text = textbuf;
snprintf( textbuf, textlen,
......@@ -324,8 +322,7 @@ modify_delete_values(
}
/* compact array skipping dummies */
for ( k = 0, j = 0; a->a_vals[k].bv_val != NULL; k++ )
{
for ( k = 0, j = 0; a->a_vals[k].bv_val != NULL; k++ ) {
/* skip dummies */
if( a->a_vals[k].bv_val == &dummy ) {
assert( a->a_nvals == NULL || a->a_nvals[k].bv_val == &dummy );
......@@ -366,8 +363,7 @@ modify_replace_values(
Modification *mod,
int permissive,
const char **text,
char *textbuf, size_t textlen
)
char *textbuf, size_t textlen )
{
(void) attr_delete( &e->e_attrs, mod->sm_desc );
......@@ -378,11 +374,67 @@ modify_replace_values(
return LDAP_SUCCESS;
}
int
modify_increment_values(
Entry *e,
Modification *mod,
int permissive,
const char **text,
char *textbuf, size_t textlen )
{
Attribute *a;
a = attr_find( e->e_attrs, mod->sm_desc );
if( a == NULL ) {
*text = textbuf;
snprintf( textbuf, textlen,
"modify/increment: %s: no such attribute",
mod->sm_desc->ad_cname.bv_val );
return LDAP_NO_SUCH_ATTRIBUTE;
}
if ( !strcmp( a->a_desc->ad_type->sat_syntax_oid, SLAPD_INTEGER_SYNTAX )) {
int i;
char str[sizeof(long)*3 + 2]; /* overly long */
long incr = atol( mod->sm_bvalues[0].bv_val );
/* treat zero and errors as a no-op */
if( incr == 0 ) {
return LDAP_SUCCESS;
}
for( i=0; a->a_nvals[i].bv_val != NULL; i++ ) {
char *tmp;
long value = atol( a->a_nvals[i].bv_val );
size_t strln = snprintf( str, sizeof(str), "%ld", value+incr );
tmp = SLAP_REALLOC( a->a_nvals[i].bv_val, strln+1 );
if( tmp == NULL ) {
*text = "modify/increment: reallocation error";
return LDAP_OTHER;;
}
a->a_nvals[i].bv_val = tmp;
a->a_nvals[i].bv_len = strln;
AC_MEMCPY( a->a_nvals[i].bv_val, str, strln+1 );
}
} else {
snprintf( textbuf, textlen,
"modify/increment: %s: increment not supported for value syntax %s",
mod->sm_desc->ad_cname.bv_val,
a->a_desc->ad_type->sat_syntax_oid );
return LDAP_CONSTRAINT_VIOLATION;
}
return LDAP_SUCCESS;
}
void
slap_mod_free(
Modification *mod,
int freeit
)
int freeit )
{
if ( mod->sm_values != NULL ) ber_bvarray_free( mod->sm_values );
mod->sm_values = NULL;
......@@ -395,8 +447,7 @@ slap_mod_free(
void
slap_mods_free(
Modifications *ml
)
Modifications *ml )
{
Modifications *next;
......
......@@ -619,6 +619,10 @@ LDAP_SLAPD_F( int ) modify_replace_values( Entry *e,
Modification *mod,
int permissive,
const char **text, char *textbuf, size_t textlen );
LDAP_SLAPD_F( int ) modify_increment_values( Entry *e,
Modification *mod,
int permissive,
const char **text, char *textbuf, size_t textlen );
LDAP_SLAPD_F( void ) slap_mod_free( Modification *mod, int freeit );
LDAP_SLAPD_F( void ) slap_mods_free( Modifications *mods );
......
......@@ -285,7 +285,9 @@ replog1(
if ( ri && ri->ri_attrs ) {
int is_in = ad_inlist( ml->sml_desc, ri->ri_attrs );
if ( ( !is_in && !ri->ri_exclude ) || ( is_in && ri->ri_exclude ) ) {
if ( ( !is_in && !ri->ri_exclude )
|| ( is_in && ri->ri_exclude ) )
{
continue;
}
}
......@@ -302,9 +304,14 @@ replog1(
case LDAP_MOD_REPLACE:
fprintf( fp, "replace: %s\n", type );
break;
case LDAP_MOD_INCREMENT:
fprintf( fp, "increment: %s\n", type );
break;
}
if ( ml->sml_bvalues )
if ( ml->sml_bvalues ) {
print_vals( fp, &ml->sml_desc->ad_cname, ml->sml_bvalues );
}
fprintf( fp, "-\n" );
}
break;
......
/* $OpenLDAP$ */
/* root_dse.c - Provides the ROOT DSA-Specific Entry
/* root_dse.c - Provides the Root DSA-Specific Entry
*
* Copyright 1999-2003 The OpenLDAP Foundation.
* All rights reserved.
......@@ -25,11 +25,12 @@
#endif
static struct berval supportedFeatures[] = {
BER_BVC(LDAP_FEATURE_ALL_OPERATIONAL_ATTRS), /* all Operational Attributes ("+") */
BER_BVC(LDAP_FEATURE_OBJECTCLASS_ATTRS), /* OCs in Attributes List */
BER_BVC(LDAP_FEATURE_ALL_OPERATIONAL_ATTRS), /* All Op Attrs (+) */
BER_BVC(LDAP_FEATURE_OBJECTCLASS_ATTRS), /* OCs in Attrs List (+person) */
BER_BVC(LDAP_FEATURE_ABSOLUTE_FILTERS), /* (&) and (|) search filters */
BER_BVC(LDAP_FEATURE_LANGUAGE_TAG_OPTIONS), /* Language Tag Options */
BER_BVC(LDAP_FEATURE_LANGUAGE_RANGE_OPTIONS), /* Language Range Options */
BER_BVC(LDAP_FEATURE_MODIFY_INCREMENT), /* Modify/increment */
{0,NULL}
};
......@@ -96,24 +97,24 @@ root_dse_info(
vals[0].bv_val = "top";
vals[0].bv_len = sizeof("top")-1;
if( attr_merge( e, ad_objectClass, vals, NULL ) )
{
if( attr_merge( e, ad_objectClass, vals, NULL ) ) {
return LDAP_OTHER;
}
vals[0].bv_val = "OpenLDAProotDSE";
vals[0].bv_len = sizeof("OpenLDAProotDSE")-1;
if( attr_merge( e, ad_objectClass, vals, NULL ) )
if( attr_merge( e, ad_objectClass, vals, NULL ) ) {
return LDAP_OTHER;
if( attr_merge( e, ad_structuralObjectClass, vals, NULL ) )
}
if( attr_merge( e, ad_structuralObjectClass, vals, NULL ) ) {
return LDAP_OTHER;
}
for ( i = 0; i < nbackends; i++ ) {
if ( backends[i].be_flags & SLAP_BFLAG_MONITOR ) {
vals[0] = backends[i].be_suffix[0];
nvals[0] = backends[i].be_nsuffix[0];
if( attr_merge( e, ad_monitorContext, vals, nvals ) )
{
if( attr_merge( e, ad_monitorContext, vals, nvals ) ) {
return LDAP_OTHER;
}
continue;
......@@ -124,8 +125,7 @@ root_dse_info(
for ( j = 0; backends[i].be_suffix[j].bv_val != NULL; j++ ) {
vals[0] = backends[i].be_suffix[j];
nvals[0] = backends[i].be_nsuffix[0];
if( attr_merge( e, ad_namingContexts, vals, nvals ) )
{
if( attr_merge( e, ad_namingContexts, vals, nvals ) ) {
return LDAP_OTHER;
}
}
......@@ -170,8 +170,7 @@ root_dse_info(
snprintf(buf, sizeof buf, "%d", i);
vals[0].bv_val = buf;
vals[0].bv_len = strlen( vals[0].bv_val );
if( attr_merge( e, ad_supportedLDAPVersion, vals, NULL ) )
{
if( attr_merge( e, ad_supportedLDAPVersion, vals, NULL ) ) {
return LDAP_OTHER;
}
}
......@@ -183,8 +182,7 @@ root_dse_info(
for ( i=0; supportedSASLMechanisms[i] != NULL; i++ ) {
vals[0].bv_val = supportedSASLMechanisms[i];