Commit 0039cb2a authored by Howard Chu's avatar Howard Chu
Browse files

More dnPrettyNormal

parent 699a0929
......@@ -37,8 +37,8 @@ do_compare(
{
Entry *entry = NULL;
struct berval dn = { 0, NULL };
struct berval *pdn = NULL;
struct berval *ndn = NULL;
struct berval pdn = { 0, NULL };
struct berval ndn = { 0, NULL };
struct berval desc = { 0, NULL };
struct berval value = { 0, NULL };
struct berval *nvalue;
......@@ -116,22 +116,7 @@ do_compare(
goto cleanup;
}
rc = dnPretty( NULL, &dn, &pdn );
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
"do_compare: conn %d invalid dn (%s)\n",
conn->c_connid, dn.bv_val ));
#else
Debug( LDAP_DEBUG_ANY,
"do_compare: invalid dn (%s)\n", dn.bv_val, 0, 0 );
#endif
send_ldap_result( conn, op, rc = LDAP_INVALID_DN_SYNTAX, NULL,
"invalid DN", NULL, NULL );
goto cleanup;
}
rc = dnNormalize( NULL, &dn, &ndn );
rc = dnPrettyNormal( NULL, &dn, &pdn, &ndn );
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
......@@ -160,20 +145,20 @@ do_compare(
ava.aa_value = nvalue;
if( strcasecmp( ndn->bv_val, LDAP_ROOT_DSE ) == 0 ) {
if( strcasecmp( ndn.bv_val, LDAP_ROOT_DSE ) == 0 ) {
#ifdef NEW_LOGGING
LDAP_LOG(( "operation", LDAP_LEVEL_ARGS,
"do_compare: conn %d dn (%s) attr(%s) value (%s)\n",
conn->c_connid, pdn->bv_val,
conn->c_connid, pdn.bv_val,
ava.aa_desc->ad_cname.bv_val, ava.aa_value->bv_val ));
#else
Debug( LDAP_DEBUG_ARGS, "do_compare: dn (%s) attr (%s) value (%s)\n",
pdn->bv_val, ava.aa_desc->ad_cname.bv_val, ava.aa_value->bv_val );
pdn.bv_val, ava.aa_desc->ad_cname.bv_val, ava.aa_value->bv_val );
#endif
Statslog( LDAP_DEBUG_STATS,
"conn=%ld op=%d CMP dn=\"%s\" attr=\"%s\"\n",
op->o_connid, op->o_opid, pdn->bv_val,
op->o_connid, op->o_opid, pdn.bv_val,
ava.aa_desc->ad_cname.bv_val, 0 );
rc = backend_check_restrictions( NULL, conn, op, NULL, &text ) ;
......@@ -188,20 +173,20 @@ do_compare(
goto cleanup;
}
} else if ( strcasecmp( ndn->bv_val, SLAPD_SCHEMA_DN ) == 0 ) {
} else if ( strcasecmp( ndn.bv_val, SLAPD_SCHEMA_DN ) == 0 ) {
#ifdef NEW_LOGGING
LDAP_LOG(( "operation", LDAP_LEVEL_ARGS,
"do_compare: conn %d dn (%s) attr(%s) value (%s)\n",
conn->c_connid, pdn->bv_val, ava.aa_desc->ad_cname.bv_val,
conn->c_connid, pdn.bv_val, ava.aa_desc->ad_cname.bv_val,
ava.aa_value->bv_val ));
#else
Debug( LDAP_DEBUG_ARGS, "do_compare: dn (%s) attr (%s) value (%s)\n",
pdn->bv_val, ava.aa_desc->ad_cname.bv_val, ava.aa_value->bv_val );
pdn.bv_val, ava.aa_desc->ad_cname.bv_val, ava.aa_value->bv_val );
#endif
Statslog( LDAP_DEBUG_STATS,
"conn=%ld op=%d CMP dn=\"%s\" attr=\"%s\"\n",
op->o_connid, op->o_opid, pdn->bv_val,
op->o_connid, op->o_opid, pdn.bv_val,
ava.aa_desc->ad_cname.bv_val, 0 );
rc = backend_check_restrictions( NULL, conn, op, NULL, &text ) ;
......@@ -239,9 +224,9 @@ do_compare(
* appropriate one, or send a referral to our "referral server"
* if we don't hold it.
*/
if ( (be = select_backend( ndn, manageDSAit, 0 )) == NULL ) {
if ( (be = select_backend( &ndn, manageDSAit, 0 )) == NULL ) {
struct berval **ref = referral_rewrite( default_referral,
NULL, pdn, LDAP_SCOPE_DEFAULT );
NULL, &pdn, LDAP_SCOPE_DEFAULT );
send_ldap_result( conn, op, rc = LDAP_REFERRAL,
NULL, NULL, ref ? ref : default_referral, NULL );
......@@ -260,7 +245,7 @@ do_compare(
}
/* check for referrals */
rc = backend_check_referrals( be, conn, op, pdn, ndn );
rc = backend_check_referrals( be, conn, op, &pdn, &ndn );
if ( rc != LDAP_SUCCESS ) {
goto cleanup;
}
......@@ -268,23 +253,23 @@ do_compare(
#ifdef NEW_LOGGING
LDAP_LOG(( "operation", LDAP_LEVEL_ARGS,
"do_compare: conn %d dn (%s) attr(%s) value (%s)\n",
conn->c_connid, pdn->bv_val, ava.aa_desc->ad_cname.bv_val,
conn->c_connid, pdn.bv_val, ava.aa_desc->ad_cname.bv_val,
ava.aa_value->bv_val ));
#else
Debug( LDAP_DEBUG_ARGS, "do_compare: dn (%s) attr (%s) value (%s)\n",
pdn->bv_val, ava.aa_desc->ad_cname.bv_val, ava.aa_value->bv_val );
pdn.bv_val, ava.aa_desc->ad_cname.bv_val, ava.aa_value->bv_val );
#endif
Statslog( LDAP_DEBUG_STATS, "conn=%ld op=%d CMP dn=\"%s\" attr=\"%s\"\n",
op->o_connid, op->o_opid, pdn->bv_val,
op->o_connid, op->o_opid, pdn.bv_val,
ava.aa_desc->ad_cname.bv_val, 0 );
/* deref suffix alias if appropriate */
suffix_alias( be, ndn );
suffix_alias( be, &ndn );
if ( be->be_compare ) {
(*be->be_compare)( be, conn, op, pdn, ndn, &ava );
(*be->be_compare)( be, conn, op, &pdn, &ndn, &ava );
} else {
send_ldap_result( conn, op, rc = LDAP_UNWILLING_TO_PERFORM,
NULL, "operation not supported within namingContext",
......@@ -293,8 +278,8 @@ do_compare(
cleanup:
free( dn.bv_val );
ber_bvfree( pdn );
ber_bvfree( ndn );
free( pdn.bv_val );
free( ndn.bv_val );
free( desc.bv_val );
free( value.bv_val );
......
......@@ -395,26 +395,15 @@ read_config( const char *fname )
if ( load_ucdata( NULL ) < 0 ) return 1;
{
struct berval dn, *pdn, *ndn;
struct berval dn;
dn.bv_val = cargv[1];
dn.bv_len = strlen( dn.bv_val );
rc = dnPretty( NULL, &dn, &pdn );
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
"%s: line %d: defaultSearchBase DN is invalid.\n",
fname, lineno ));
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: defaultSearchBase DN is invalid\n",
fname, lineno, 0 );
#endif
return( 1 );
}
rc = dnPrettyNormal( NULL, &dn,
&default_search_base,
&default_search_nbase );
rc = dnNormalize( NULL, &dn, &ndn );
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
......@@ -425,15 +414,8 @@ read_config( const char *fname )
"%s: line %d: defaultSearchBase DN is invalid\n",
fname, lineno, 0 );
#endif
ber_bvfree( ndn );
return( 1 );
}
default_search_base = *pdn;
default_search_nbase = *ndn;
free( pdn );
free( ndn );
}
/* set maximum threads in thread pool */
......@@ -930,22 +912,10 @@ read_config( const char *fname )
dn.bv_val = cargv[1];
dn.bv_len = strlen( cargv[1] );
pdn = ch_malloc( sizeof( struct berval ));
ndn = ch_malloc( sizeof( struct berval ));
rc = dnPretty( NULL, &dn, &pdn );
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
"%s: line %d: suffix DN is invalid.\n",
fname, lineno ));
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: suffix DN is invalid\n",
fname, lineno, 0 );
#endif
return( 1 );
}
rc = dnNormalize( NULL, &dn, &ndn );
rc = dnPrettyNormal( NULL, &dn, pdn, ndn );
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
......@@ -956,7 +926,6 @@ read_config( const char *fname )
"%s: line %d: suffix DN is invalid\n",
fname, lineno, 0 );
#endif
ber_bvfree( ndn );
return( 1 );
}
......@@ -1009,8 +978,8 @@ read_config( const char *fname )
/* set database suffixAlias */
} else if ( strcasecmp( cargv[0], "suffixAlias" ) == 0 ) {
Backend *tmp_be;
struct berval alias, *palias, *nalias;
struct berval aliased, *paliased, *naliased;
struct berval alias, *palias, nalias;
struct berval aliased, *paliased, naliased;
if ( cargc < 2 ) {
#ifdef NEW_LOGGING
......@@ -1070,8 +1039,9 @@ read_config( const char *fname )
alias.bv_val = cargv[1];
alias.bv_len = strlen( cargv[1] );
palias = ch_malloc(sizeof(struct berval));
rc = dnPretty( NULL, &alias, &palias );
rc = dnPrettyNormal( NULL, &alias, palias, &nalias );
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
......@@ -1085,23 +1055,8 @@ read_config( const char *fname )
return( 1 );
}
rc = dnNormalize( NULL, &alias, &nalias );
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
"%s: line %d: alias DN is invalid.\n",
fname, lineno ));
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: alias DN is invalid\n",
fname, lineno, 0 );
#endif
ber_bvfree( palias );
return( 1 );
}
tmp_be = select_backend( nalias, 0, 0 );
ber_bvfree( nalias );
tmp_be = select_backend( &nalias, 0, 0 );
free( nalias.bv_val );
if ( tmp_be != be ) {
#ifdef NEW_LOGGING
LDAP_LOG(( "config", LDAP_LEVEL_INFO,
......@@ -1120,8 +1075,9 @@ read_config( const char *fname )
aliased.bv_val = cargv[2];
aliased.bv_len = strlen( cargv[2] );
paliased = ch_malloc(sizeof(struct berval));
rc = dnPretty( NULL, &aliased, &paliased );
rc = dnPrettyNormal( NULL, &aliased, paliased, &naliased );
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
......@@ -1136,24 +1092,8 @@ read_config( const char *fname )
return( 1 );
}
rc = dnNormalize( NULL, &aliased, &naliased );
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
"%s: line %d: aliased DN is invalid.\n",
fname, lineno ));
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: aliased DN is invalid\n",
fname, lineno, 0 );
#endif
ber_bvfree( palias );
ber_bvfree( paliased );
return( 1 );
}
tmp_be = select_backend( naliased, 0, 0 );
ber_bvfree( naliased );
tmp_be = select_backend( &naliased, 0, 0 );
free( naliased.bv_val );
if ( tmp_be != be ) {
#ifdef NEW_LOGGING
LDAP_LOG(( "config", LDAP_LEVEL_INFO,
......@@ -1245,28 +1185,17 @@ read_config( const char *fname )
#endif
} else {
struct berval dn, *pdn = NULL, *ndn = NULL;
struct berval dn;
if ( load_ucdata( NULL ) < 0 ) return 1;
dn.bv_val = cargv[1];
dn.bv_len = strlen( cargv[1] );
rc = dnPretty( NULL, &dn, &pdn );
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
"%s: line %d: rootdn DN is invalid.\n",
fname, lineno ));
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: rootdn DN is invalid\n",
fname, lineno, 0 );
#endif
return( 1 );
}
rc = dnPrettyNormal( NULL, &dn,
&be->be_rootdn,
&be->be_rootndn );
rc = dnNormalize( NULL, &dn, &ndn );
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
......@@ -1277,15 +1206,8 @@ read_config( const char *fname )
"%s: line %d: rootdn DN is invalid\n",
fname, lineno, 0 );
#endif
ber_bvfree( ndn );
return( 1 );
}
be->be_rootdn = *pdn;
be->be_rootndn = *ndn;
free( pdn );
free( ndn );
}
/* set super-secret magic database password */
......
......@@ -32,8 +32,8 @@ do_delete(
)
{
struct berval dn = { 0, NULL };
struct berval *ndn = NULL;
struct berval *pdn = NULL;
struct berval pdn = { 0, NULL };
struct berval ndn = { 0, NULL };
const char *text;
Backend *be;
int rc;
......@@ -74,7 +74,7 @@ do_delete(
goto cleanup;
}
rc = dnPretty( NULL, &dn, &pdn );
rc = dnPrettyNormal( NULL, &dn, &pdn, &ndn );
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
......@@ -89,22 +89,7 @@ do_delete(
goto cleanup;
}
rc = dnNormalize( NULL, &dn, &ndn );
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
"do_delete: conn %d invalid dn (%s)\n",
conn->c_connid, dn.bv_val ));
#else
Debug( LDAP_DEBUG_ANY,
"do_delete: invalid dn (%s)\n", dn.bv_val, 0, 0 );
#endif
send_ldap_result( conn, op, rc = LDAP_INVALID_DN_SYNTAX, NULL,
"invalid DN", NULL, NULL );
goto cleanup;
}
if( ndn->bv_len == 0 ) {
if( ndn.bv_len == 0 ) {
#ifdef NEW_LOGGING
LDAP_LOG(( "operation", LDAP_LEVEL_INFO, "do_delete: conn %d: "
"Attempt to delete root DSE.\n", conn->c_connid ));
......@@ -118,7 +103,7 @@ do_delete(
#ifdef SLAPD_SCHEMA_DN
} else if ( strcasecmp( ndn->bv_val, SLAPD_SCHEMA_DN ) == 0 ) {
} else if ( strcasecmp( ndn.bv_val, SLAPD_SCHEMA_DN ) == 0 ) {
#ifdef NEW_LOGGING
LDAP_LOG(( "operation", LDAP_LEVEL_INFO, "do_delete: conn %d: "
"Attempt to delete subschema subentry.\n", conn->c_connid ));
......@@ -134,7 +119,7 @@ do_delete(
}
Statslog( LDAP_DEBUG_STATS, "conn=%ld op=%d DEL dn=\"%s\"\n",
op->o_connid, op->o_opid, pdn->bv_val, 0, 0 );
op->o_connid, op->o_opid, pdn.bv_val, 0, 0 );
manageDSAit = get_manageDSAit( op );
......@@ -143,9 +128,9 @@ do_delete(
* appropriate one, or send a referral to our "referral server"
* if we don't hold it.
*/
if ( (be = select_backend( ndn, manageDSAit, 0 )) == NULL ) {
if ( (be = select_backend( &ndn, manageDSAit, 0 )) == NULL ) {
struct berval **ref = referral_rewrite( default_referral,
NULL, pdn, LDAP_SCOPE_DEFAULT );
NULL, &pdn, LDAP_SCOPE_DEFAULT );
send_ldap_result( conn, op, rc = LDAP_REFERRAL,
NULL, NULL, ref ? ref : default_referral, NULL );
......@@ -163,13 +148,13 @@ do_delete(
}
/* check for referrals */
rc = backend_check_referrals( be, conn, op, pdn, ndn );
rc = backend_check_referrals( be, conn, op, &pdn, &ndn );
if ( rc != LDAP_SUCCESS ) {
goto cleanup;
}
/* deref suffix alias if appropriate */
suffix_alias( be, ndn );
suffix_alias( be, &ndn );
/*
* do the delete if 1 && (2 || 3)
......@@ -184,12 +169,12 @@ do_delete(
if ( !be->be_update_ndn.bv_len || repl_user )
#endif
{
if ( (*be->be_delete)( be, conn, op, pdn, ndn ) == 0 ) {
if ( (*be->be_delete)( be, conn, op, &pdn, &ndn ) == 0 ) {
#ifdef SLAPD_MULTIMASTER
if ( !be->be_update_ndn.bv_len || !repl_user )
#endif
{
replog( be, op, pdn, ndn, NULL );
replog( be, op, &pdn, &ndn, NULL );
}
}
#ifndef SLAPD_MULTIMASTER
......@@ -197,7 +182,7 @@ do_delete(
struct berval **defref = be->be_update_refs
? be->be_update_refs : default_referral;
struct berval **ref = referral_rewrite( default_referral,
NULL, pdn, LDAP_SCOPE_DEFAULT );
NULL, &pdn, LDAP_SCOPE_DEFAULT );
send_ldap_result( conn, op, rc = LDAP_REFERRAL, NULL, NULL,
ref ? ref : defref, NULL );
......@@ -213,7 +198,7 @@ do_delete(
cleanup:
free( dn.bv_val );
if( pdn != NULL ) ber_bvfree( pdn );
if( ndn != NULL ) ber_bvfree( ndn );
if( pdn.bv_val != NULL ) ber_bvfree( pdn.bv_val );
if( ndn.bv_val != NULL ) ber_bvfree( ndn.bv_val );
return rc;
}
......@@ -138,7 +138,7 @@ str2entry( char *s )
return NULL;
}
rc = dnPretty( NULL, &value, &pdn );
rc = dnPrettyNormal( NULL, &value, &e->e_name, &e->e_nname );
free( value.bv_val );
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
......@@ -155,11 +155,6 @@ str2entry( char *s )
entry_free( e );
return NULL;
}
e->e_name.bv_val = ( pdn->bv_val != NULL )
? pdn->bv_val : ch_strdup( "" );
e->e_name.bv_len = pdn->bv_len;
free( pdn );
continue;
}
......@@ -288,29 +283,6 @@ str2entry( char *s )
return( NULL );
}
/* generate normalized dn */
{
struct berval *ndn = NULL;
rc = dnNormalize( NULL, &e->e_name, &ndn );
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
"str2entry: entry %ld has invalid dn: %s\n",
(long) e->e_id, e->e_dn ));
#else
Debug( LDAP_DEBUG_ANY,
"str2entry: entry %ld has invalid dn: %s\n",
(long) e->e_id, e->e_dn, 0 );
#endif
entry_free( e );
return NULL;
}
e->e_nname = *ndn;
free( ndn );
}
#ifdef NEW_LOGGING
LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL2,
"str2entry(%s) -> 0x%lx\n", e->e_dn, (unsigned long)e ));
......
......@@ -34,8 +34,8 @@ do_modify(
Operation *op )
{
struct berval dn = { 0, NULL };
struct berval *pdn = NULL;
struct berval *ndn = NULL;
struct berval pdn = { 0, NULL };
struct berval ndn = { 0, NULL };
char *last;
ber_tag_t tag;
ber_len_t len;
......@@ -177,7 +177,7 @@ do_modify(
goto cleanup;
}
rc = dnPretty( NULL, &dn, &pdn );
rc = dnPrettyNormal( NULL, &dn, &pdn, &ndn );
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
......@@ -192,22 +192,7 @@ do_modify(
goto cleanup;
}
rc = dnNormalize( NULL, &dn, &ndn );
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
"do_modify: conn %d invalid dn (%s)\n",
conn->c_connid, dn.bv_val ));
#else
Debug( LDAP_DEBUG_ANY,
"do_modify: invalid dn (%s)\n", dn.bv_val, 0, 0 );
#endif
send_ldap_result( conn, op, rc = LDAP_INVALID_DN_SYNTAX, NULL,
"invalid DN", NULL, NULL );
goto cleanup;
}
if( ndn->bv_len == 0 ) {
if( ndn.bv_len == 0 ) {
#ifdef NEW_LOGGING
LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
"do_modify: attempt to modify root DSE.\n" ));
......@@ -220,7 +205,7 @@ do_modify(
goto cleanup;
#if defined( SLAPD_SCHEMA_DN )
} else if ( strcasecmp( ndn->bv_val, SLAPD_SCHEMA_DN ) == 0 ) {
} else if ( strcasecmp( ndn.bv_val, SLAPD_SCHEMA_DN ) == 0 ) {
#ifdef NEW_LOGGING
LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
"do_modify: attempt to modify subschema subentry.\n" ));
......@@ -297,9 +282,9 @@ do_modify(
* appropriate one, or send a referral to our "referral server"
* if we don't hold it.
*/
if ( (be = select_backend( ndn, manageDSAit, 0 )) == NULL ) {
if ( (be = select_backend( &ndn, manageDSAit, 0 )) == NULL ) {
struct berval **ref = referral_rewrite( default_referral,
NULL, pdn, LDAP_SCOPE_DEFAULT );
NULL, &pdn, LDAP_SCOPE_DEFAULT );
send_ldap_result( conn, op, rc = LDAP_REFERRAL,
NULL, NULL, ref ? ref : default_referral, NULL );
......@@ -317,13 +302,13 @@ do_modify(
}
/* check for referrals */
rc = backend_check_referrals( be, conn, op, pdn, ndn );
rc = backend_check_referrals( be, conn, op, &pdn, &ndn );
if ( rc != LDAP_SUCCESS ) {
goto cleanup;
}
/* deref suffix alias if appropriate */
suffix_alias( be, ndn );
suffix_alias( be, &ndn );
/*
* do the modify if 1 && (2 || 3)
......@@ -376,13 +361,13 @@ do_modify(
}
}
if ( (*be->be_modify)( be, conn, op, pdn, ndn, mods ) == 0
if ( (*be->be_modify)( be, conn, op, &pdn, &ndn, mods ) == 0
#ifdef SLAPD_MULTIMASTER
&& !repl_user
#endif
) {
/* but we log only the ones not from a replicator user */
replog( be, op, pdn, ndn, mods );
replog( be, op, &pdn, &ndn, mods );