From cb3d538ea337bb226d108a07cdf6d3734b2bb5b5 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Tue, 17 Feb 2004 12:39:42 +0000 Subject: [PATCH] allow no-user-modification propagations if back-ldap is used for replication (i.e. updatedn is defined) --- servers/slapd/back-ldap/add.c | 5 ++++- servers/slapd/back-ldap/modify.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/servers/slapd/back-ldap/add.c b/servers/slapd/back-ldap/add.c index d2f6a384f2..3aff8df61e 100644 --- a/servers/slapd/back-ldap/add.c +++ b/servers/slapd/back-ldap/add.c @@ -45,6 +45,7 @@ ldap_back_add( struct berval mdn = { 0, NULL }; ber_int_t msgid; dncookie dc; + int update; #ifdef LDAP_BACK_PROXY_AUTHZ LDAPControl **ctrls = NULL; int rc = LDAP_SUCCESS; @@ -88,8 +89,10 @@ ldap_back_add( #ifdef ENABLE_REWRITE dc.ctx = "addDnAttr"; #endif + + update = op->o_bd->be_update_ndn.bv_len; for (i=0, a=op->oq_add.rs_e->e_attrs; a; a=a->a_next) { - if ( a->a_desc->ad_type->sat_no_user_mod ) { + if ( !update && a->a_desc->ad_type->sat_no_user_mod ) { continue; } diff --git a/servers/slapd/back-ldap/modify.c b/servers/slapd/back-ldap/modify.c index edba521aad..2c54ceb7a1 100644 --- a/servers/slapd/back-ldap/modify.c +++ b/servers/slapd/back-ldap/modify.c @@ -46,6 +46,7 @@ ldap_back_modify( struct berval mdn = { 0, NULL }; ber_int_t msgid; dncookie dc; + int update; #ifdef LDAP_BACK_PROXY_AUTHZ LDAPControl **ctrls = NULL; #endif /* LDAP_BACK_PROXY_AUTHZ */ @@ -89,10 +90,12 @@ ldap_back_modify( #ifdef ENABLE_REWRITE dc.ctx = "modifyAttrDN"; #endif + + update = op->o_bd->be_update_ndn.bv_len; for (i=0, ml=op->oq_modify.rs_modlist; ml; ml=ml->sml_next) { int is_oc = 0; - if ( ml->sml_desc->ad_type->sat_no_user_mod ) { + if ( !update && ml->sml_desc->ad_type->sat_no_user_mod ) { continue; } -- 2.39.5