From: Pierangelo Masarati Date: Wed, 17 Aug 2005 19:40:02 +0000 (+0000) Subject: allow noUserMod attrs write proxying when manageDIT is set (still to work in frontend... X-Git-Tag: OPENLDAP_REL_ENG_2_2_MP~680 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=557f5eb2ca68258d4b82e8135c30a24b4a3a8504;p=openldap allow noUserMod attrs write proxying when manageDIT is set (still to work in frontend for add) --- diff --git a/servers/slapd/back-ldap/add.c b/servers/slapd/back-ldap/add.c index e27e6a0255..96a9c3b94d 100644 --- a/servers/slapd/back-ldap/add.c +++ b/servers/slapd/back-ldap/add.c @@ -69,7 +69,8 @@ ldap_back_add( isupdate = be_shadow_update( op ); for ( i = 0, a = op->oq_add.rs_e->e_attrs; a; a = a->a_next ) { - if ( !isupdate && a->a_desc->ad_type->sat_no_user_mod ) { + if ( !isupdate && !get_manageDIT( op ) && 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 6ba89953ea..adc0b649ad 100644 --- a/servers/slapd/back-ldap/modify.c +++ b/servers/slapd/back-ldap/modify.c @@ -64,7 +64,8 @@ ldap_back_modify( isupdate = be_shadow_update( op ); for ( i = 0, ml = op->oq_modify.rs_modlist; ml; ml = ml->sml_next ) { - if ( !isupdate && ml->sml_desc->ad_type->sat_no_user_mod ) { + if ( !isupdate && !!get_manageDIT( op ) && ml->sml_desc->ad_type->sat_no_user_mod ) + { continue; } diff --git a/servers/slapd/back-meta/add.c b/servers/slapd/back-meta/add.c index 9628cdd6ec..fe383f230c 100644 --- a/servers/slapd/back-meta/add.c +++ b/servers/slapd/back-meta/add.c @@ -83,7 +83,8 @@ meta_back_add( Operation *op, SlapReply *rs ) for ( i = 0, a = op->ora_e->e_attrs; a; a = a->a_next ) { int j, is_oc = 0; - if ( !isupdate && a->a_desc->ad_type->sat_no_user_mod ) { + if ( !isupdate && !get_manageDIT( op ) && a->a_desc->ad_type->sat_no_user_mod ) + { continue; } diff --git a/servers/slapd/back-meta/modify.c b/servers/slapd/back-meta/modify.c index f2b40d24a4..f6d2e9f428 100644 --- a/servers/slapd/back-meta/modify.c +++ b/servers/slapd/back-meta/modify.c @@ -89,7 +89,8 @@ meta_back_modify( Operation *op, SlapReply *rs ) for ( i = 0, ml = op->orm_modlist; ml; ml = ml->sml_next ) { int j, is_oc = 0; - if ( !isupdate && ml->sml_desc->ad_type->sat_no_user_mod ) { + if ( !isupdate && !get_manageDIT( op ) && ml->sml_desc->ad_type->sat_no_user_mod ) + { continue; } diff --git a/servers/slapd/overlays/rwm.c b/servers/slapd/overlays/rwm.c index ebe9815438..de1f5a830c 100644 --- a/servers/slapd/overlays/rwm.c +++ b/servers/slapd/overlays/rwm.c @@ -154,7 +154,8 @@ rwm_op_add( Operation *op, SlapReply *rs ) } } - } else if ( !isupdate && (*ap)->a_desc->ad_type->sat_no_user_mod ) { + } else if ( !isupdate && !get_manageDIT( op ) && (*ap)->a_desc->ad_type->sat_no_user_mod ) + { goto next_attr; } else { @@ -437,7 +438,8 @@ rwm_op_modify( Operation *op, SlapReply *rs ) { is_oc = 1; - } else if ( !isupdate && (*mlp)->sml_desc->ad_type->sat_no_user_mod ) { + } else if ( !isupdate && !get_manageDIT( op ) && (*mlp)->sml_desc->ad_type->sat_no_user_mod ) + { goto next_mod; } else { @@ -895,6 +897,7 @@ rwm_attrs( Operation *op, SlapReply *rs, Attribute** a_first, int stripEntryDN ) } } else if ( !isupdate + && !get_manageDIT( op ) && (*ap)->a_desc->ad_type->sat_no_user_mod && (*ap)->a_desc->ad_type != slap_schema.si_at_undefined ) {